/* The music site (cloudflare/listen/, docs/listen.md). Dark unless the device asks for light. No external fonts or images but Google's covers. */
:root {
  --bg: #0b0b0d;
  --bg-2: #121215;
  --panel: #18181c;
  --panel-2: #232328;
  --line: #2a2a31;
  --text: #f3f3f5;
  --muted: #9d9ea8;
  --faint: #6e6f79;
  --accent: #f7b54a;
  --accent-ink: #1d1606;
  --good: #57c68a;
  --bad: #f07a6a;
  --shadow: 0 10px 30px rgb(0 0 0 / 45%);
  /* The floating player's glass: see-through over a deep blur, a hair of light along its top edge. */
  --glass: rgb(34 34 40 / 58%);
  --glass-line: rgb(255 255 255 / 12%);
  --glass-shadow: 0 14px 40px rgb(0 0 0 / 50%), inset 0 1px 0 rgb(255 255 255 / 10%);
  /* The bubble under the chosen tab: clearer glass, lit along its top edge and faintly along its bottom. */
  --bubble: linear-gradient(180deg, rgb(255 255 255 / 16%), rgb(255 255 255 / 6%));
  --bubble-line: rgb(255 255 255 / 16%);
  --bubble-base: color-mix(in srgb, var(--bg) 86%, transparent);
  --bubble-shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 3px 10px rgb(0 0 0 / 26%), inset 0 1px 0 rgb(255 255 255 / 28%), inset 0 -1px 0 rgb(255 255 255 / 6%);
  --radius: 14px;
  --gutter: 28px;
  --bar: 64px;
  /* The page's widest, bar and content alike. */
  --wide: 1180px;
  /* How far the corner's things sit from the bottom of the screen. */
  --corner: max(20px, env(safe-area-inset-bottom));
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f6f3;
    --bg-2: #efede8;
    --panel: #ffffff;
    --panel-2: #ecebe6;
    --line: #e2dfd8;
    --text: #17181c;
    --muted: #5d616d;
    --faint: #8a8e99;
    --accent: #a96b00;
    --accent-ink: #ffffff;
    --good: #1f8a52;
    --bad: #c2412f;
    --shadow: 0 10px 30px rgb(40 30 10 / 12%);
    --glass: rgb(255 255 255 / 62%);
    --glass-line: rgb(60 45 20 / 11%);
    --glass-shadow: 0 14px 40px rgb(40 30 10 / 16%), inset 0 1px 0 rgb(255 255 255 / 90%);
    --bubble: linear-gradient(180deg, rgb(255 255 255 / 92%), rgb(255 255 255 / 62%));
    --bubble-line: rgb(60 45 20 / 10%);
    --bubble-base: color-mix(in srgb, var(--bg) 80%, transparent);
    --bubble-shadow: 0 1px 2px rgb(40 30 10 / 10%), 0 3px 10px rgb(40 30 10 / 8%), inset 0 1px 0 rgb(255 255 255 / 100%), inset 0 -1px 0 rgb(60 45 20 / 6%);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
/* The scrollbar's room is kept on a short page too, so nothing hops sideways as a page grows (search results arriving). */
html { scrollbar-gutter: stable; }
/* A browser without that keeps the scrollbar itself. */
@supports not (scrollbar-gutter: stable) { html { overflow-y: scroll; } }
body {
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Hebrew", "Arial Hebrew", sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
button, input, textarea { font: inherit; color: inherit; }
/* A phone's browser zooms the whole page in when a field under 16px is tapped, and leaves it zoomed (cut off at the right, the bars
   out of place): every field is at least 16px on a touch screen. */
@media (pointer: coarse), (max-width: 760px) {
  input, textarea, select { font-size: max(16px, 1em); }
}
a { color: inherit; text-decoration: none; }
img { display: block; }
[hidden] { display: none !important; }
.pad { padding: var(--gutter); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.loading { padding: 40px var(--gutter); color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The tints behind an artist's or an album's head reach past the page's column: never a sideways scroll. */
.app { overflow-x: clip; min-height: 100vh; }
.grow { flex: 1; }

/* ---------- the bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.bar-in { display: flex; align-items: center; gap: 14px; height: var(--bar); max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .2px; flex-shrink: 0; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; }
/* The logo's bars are always the name's own colour, so the two change together between light and dark. */
.brand-bars { fill: var(--accent); }
.brand-name { font-size: 19px; color: var(--accent); }
.history { display: flex; gap: 8px; margin-left: 8px; }
.tabs { position: relative; display: flex; gap: 4px; margin-left: 10px; min-width: 0; }
.tabs .tab { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; transition: color .15s, background .15s; }
.tabs .tab svg { width: 18px; height: 18px; }
@media (hover: hover) { .tab:hover { color: var(--text); background: var(--panel); } }
.tab[aria-current="page"] { color: var(--accent); }
/* The chosen tab's glass bubble (placeGlass in app.js): over the tabs, showing them through it (clicks pass through to them). */
.tab { position: relative; }
@media (hover: hover) { .tab[aria-current="page"]:hover { background: transparent; } }
.tab-glass {
  position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; opacity: 0; border-radius: 999px;
  background: var(--bubble), var(--bubble-base); border: 1px solid var(--bubble-line); box-shadow: var(--bubble-shadow);
  backdrop-filter: blur(14px) saturate(180%); -webkit-backdrop-filter: blur(14px) saturate(180%);
  transition: opacity .2s;
}
/* The tabs seen through the glass: a copy, magnified and bent at the rim (placeGlass, lensFilter). */
.tab-lens { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; }
.tab-lens-row { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.tab-glass .tab-lens-row .tab { position: absolute; margin: 0; pointer-events: none; }
/* The light along the rim, over what the glass shows. */
.tab-glass::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; box-shadow: inset 0 1px 0 rgb(255 255 255 / 30%), inset 0 -1px 0 rgb(255 255 255 / 8%), inset 1px 0 0 rgb(255 255 255 / 6%), inset -1px 0 0 rgb(255 255 255 / 6%); }
.lens-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.tab-glass.shown { opacity: 1; }
.search { flex: 1 1 auto; position: relative; max-width: 620px; min-width: 0; margin-left: 10px; }
.search-field { position: relative; display: flex; align-items: center; }
.search input {
  width: 100%; height: 42px; padding: 0 16px 0 44px; border-radius: 12px;
  border: 1px solid transparent; background: var(--panel); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search input:focus { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.search input::-webkit-search-cancel-button { filter: grayscale(1); }
.search-icon { position: absolute; left: 15px; width: 18px; height: 18px; pointer-events: none; color: var(--muted); }
.search-icon svg { width: 18px; height: 18px; }
.bar.is-searching .tabs { display: none; }
.bar.is-searching .grow { flex: 1 100 0; }
.bar-actions { display: flex; align-items: center; }
.account { display: flex; align-items: center; gap: 4px; padding: 2px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; color: var(--muted); }
@media (hover: hover) { .account:hover { color: var(--text); } }
.account svg { width: 18px; height: 18px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff;
  background: linear-gradient(135deg, hsl(var(--hue, 40) 55% 42%), hsl(calc(var(--hue, 40) + 40) 60% 28%)); }
/* The panel under the search box, over whatever page is shown: recent searches, then suggestions. While it is open the bar sits over
   the player and a phone's tabs. */
.bar.has-panel { z-index: 33; }
.search-panel {
  position: absolute; top: calc(100% + 8px); left: 0; width: max(100%, 440px);
  max-height: min(560px, max(160px, calc(100dvh - var(--bar) - env(safe-area-inset-top) - var(--kb, 0px) - 16px))); overflow-y: auto; overscroll-behavior: contain;
  padding: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); animation: fade .12s;
}
.sg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 2px 4px 10px; }
.sg-head h2 { margin: 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.sg-item { display: flex; align-items: center; gap: 4px; }
.sg-item .icon-btn { flex-shrink: 0; }
.sg-row { flex: 1; width: 100%; min-width: 0; min-height: 48px; display: flex; align-items: center; gap: 12px; padding: 5px 10px 5px 6px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font: inherit; text-align: start; cursor: pointer; }
@media (hover: hover) { .sg-row:hover { background: var(--panel-2); } }
.sg-row[aria-selected="true"] { background: var(--panel-2); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent); }
.sg-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sg-sign { width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; color: var(--muted); }
.sg-sign svg { width: 18px; height: 18px; }
.sg-row .thumb { width: 38px; height: 38px; flex-shrink: 0; border-radius: 6px; }
.sg-row .thumb .fallback svg { width: 18px; height: 18px; }
.sg-row .dot { width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; font-size: 13px;
  background: linear-gradient(135deg, hsl(var(--hue, 40) 55% 42%), hsl(calc(var(--hue, 40) + 40) 60% 28%)); }
.sg-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sg-name, .sg-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-line { font-size: 13px; color: var(--muted); }
.sg-note { margin: 0; padding: 8px 10px; font-size: 14px; color: var(--muted); }
/* What a search looks through: everything, the music alone or the videos alone. In the bar, once something is searched. */
.scopes { display: inline-flex; flex-shrink: 0; gap: 2px; padding: 3px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); }
.scope { height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; }
@media (hover: hover) { .scope:hover { color: var(--text); } }
.scope[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.scope:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.arrow { width: 36px; height: 36px; flex-shrink: 0; display: inline-grid; place-items: center; border: 0; border-radius: 50%; background: var(--panel-2); cursor: pointer; color: var(--text); }
@media (hover: hover) { .arrow:hover { filter: brightness(1.18); } }
.arrow:disabled { opacity: .35; cursor: default; filter: none; }
.arrow svg { width: 20px; height: 20px; }

/* The tabs along the bottom of a phone. */
.tabbar { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); cursor: pointer; white-space: nowrap; font-weight: 600; font-size: 14px;
  transition: background .15s, border-color .15s, transform .05s;
}
@media (hover: hover) { .btn:hover { background: var(--panel-2); } }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
@media (hover: hover) { .btn.primary:hover { filter: brightness(1.06); } }
.btn.quiet { background: transparent; border-color: transparent; color: var(--muted); }
@media (hover: hover) { .btn.quiet:hover { color: var(--text); background: var(--panel); } }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid transparent; background: transparent;
  display: inline-grid; place-items: center; cursor: pointer; color: var(--muted); flex-shrink: 0;
}
@media (hover: hover) { .icon-btn:hover { background: var(--panel-2); color: var(--text); } }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.done { color: var(--good); }
.icon-btn.busy { color: var(--accent); }
.btn.big { height: 46px; min-width: 220px; font-size: 15px; }
.icon-btn:focus-visible, .btn:focus-visible, .card:focus-visible, .row:focus-visible, .chip:focus-visible, .tab:focus-visible, .arrow:focus-visible, .banner:focus-visible, .tile:focus-visible, .view-all:focus-visible, .latest:focus-visible, .side a:focus-visible, .account:focus-visible, .dots button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- the page ---------- */
.view { padding: 8px var(--gutter) 130px; max-width: var(--wide); margin: 0 auto; outline: none; }
.hero { padding: 28px 0 8px; }
.hero h1 { font-size: clamp(26px, 4vw, 36px); margin: 0 0 6px; letter-spacing: -.4px; }
.hero p { margin: 0; color: var(--muted); }
.hero-link { color: var(--text); font-weight: 600; }
.hero-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.section { margin-top: 40px; }
.section-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; min-height: 36px; }
.section-head h2 { font-size: 22px; margin: 0; letter-spacing: -.3px; }
.section-head .muted { font-size: 13px; }
.view-all { border: 0; background: none; padding: 4px 2px; color: var(--accent); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; border-radius: 6px; }
@media (hover: hover) { .view-all:hover { text-decoration: underline; text-underline-offset: 3px; } }
.arrows { display: flex; gap: 10px; }
.notice { margin-top: 18px; padding: 12px 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); }
.notice.bad { border-color: color-mix(in srgb, var(--bad) 50%, var(--line)); color: var(--text); }
.empty { padding: 26px 0; color: var(--muted); }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.searching { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; padding: 12px 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 22px; }
.filters .chip { height: 36px; padding: 0 18px; font-size: 14px; }
.about { max-width: 70ch; margin: 18px 0 0; color: var(--muted); }

/* ---------- banners ---------- */
.banners { margin-top: 22px; }
.banner-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 18px) / 2); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.banner-track::-webkit-scrollbar { display: none; }
.banner { position: relative; isolation: isolate; display: flex; align-items: center; justify-content: space-between; gap: 18px; height: 220px; padding: 22px 24px; overflow: hidden; border-radius: 18px; background: var(--panel); color: #fff; scroll-snap-align: start; }
.banner-back { position: absolute; inset: -40px; z-index: -2; width: calc(100% + 80px); height: calc(100% + 80px); max-width: none; object-fit: cover; filter: blur(30px) saturate(1.3); }
.banner-back.plain { filter: none; background: linear-gradient(120deg, hsl(var(--hue, 40) 55% 34%), hsl(calc(var(--hue, 40) + 60) 55% 18%)); }
.banner::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(0 0 0 / 74%), rgb(0 0 0 / 34%)); }
.banner-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kicker { font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: #ffd28a; }
.banner-title { font-size: clamp(19px, 2.4vw, 28px); font-weight: 800; line-height: 1.15; letter-spacing: -.3px; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow-wrap: anywhere; }
.banner-sub { font-size: 14px; color: rgb(255 255 255 / 78%); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.banner > .cover { width: 168px; flex-shrink: 0; border-radius: 12px; box-shadow: 0 12px 30px rgb(0 0 0 / 50%); transition: transform .2s; }
@media (hover: hover) { .banner:hover > .cover { transform: scale(1.03); } }
.dots { display: flex; justify-content: center; gap: 12px; margin-top: 14px; }
.dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: var(--faint); cursor: pointer; }
.dots button[aria-current="true"] { background: var(--accent); transform: scale(1.25); }

/* ---------- shelves and grids ---------- */
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 4 * 20px) / 5); gap: 0 20px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 10px; margin: -10px; scroll-padding: 10px; }
.shelf::-webkit-scrollbar { display: none; }
.shelf > * { scroll-snap-align: start; min-width: 0; }
.shelf > .card { margin: 0; padding: 0; }
@media (hover: hover) { .shelf > .card:hover { background: transparent; } }
.shelf.faces { grid-auto-columns: calc((100% - 6 * 20px) / 7); }
.shelf.wide { grid-auto-columns: calc((100% - 2 * 20px) / 3); }
.shelf.tiles { grid-auto-columns: calc((100% - 3 * 20px) / 4); }
.shelf.columns { grid-template-rows: repeat(3, auto); grid-auto-columns: calc((100% - 32px) / 2); gap: 0 32px; }
.shelf.columns > .row { margin: 0; padding: 11px 4px; border-radius: 0; border-bottom: 1px solid var(--line); }
.shelf.columns > .row.unnumbered, .shelf.columns > .row { grid-template-columns: 52px minmax(0, 1fr) auto auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 26px 20px; }
.grid.faces { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.grid.videos { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { display: block; border-radius: var(--radius); padding: 10px; margin: -10px; cursor: pointer; transition: background .15s; min-width: 0; }
@media (hover: hover) { .card:hover { background: var(--panel); } }
.card.video { cursor: default; }
.cover {
  position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--panel-2);
  box-shadow: 0 4px 14px rgb(0 0 0 / 22%);
}
.cover img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s; }
/* Not all here yet: the empty box shows until it is. */
.cover img.arriving { opacity: 0; }
a.card .cover img { transition: transform .25s, opacity .25s; }
@media (hover: hover) { a.card:hover .cover img { transform: scale(1.04); } }
.cover.wide { aspect-ratio: 16 / 9; }
.cover.round { border-radius: 50%; }
.cover .fallback { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: 34px; color: #fff;
  background: linear-gradient(135deg, hsl(var(--hue, 40) 55% 42%), hsl(calc(var(--hue, 40) + 40) 60% 28%)); }
.cover .fallback svg { width: 38%; height: 38%; }
.cover .length { position: absolute; right: 8px; bottom: 8px; padding: 1px 7px; border-radius: 6px; background: rgb(0 0 0 / 75%); color: #fff; font-size: 12px; font-weight: 600; }
.card-title { margin-top: 12px; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub { margin-top: 3px; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.artist { text-align: center; }
.video-row { display: flex; align-items: flex-start; gap: 6px; }
.video-row > div { flex: 1; min-width: 0; }
.video-row .icon-btn { margin-top: 10px; }
.tile { display: grid; place-items: center; height: 96px; padding: 10px; border-radius: 14px; text-align: center; font-weight: 800; font-size: 16px; color: #fff;
  background: linear-gradient(125deg, hsl(var(--hue, 40) 62% 40%), hsl(calc(var(--hue, 40) + 55) 62% 22%)); transition: filter .15s, transform .15s; }
@media (hover: hover) { .tile:hover { filter: brightness(1.12); transform: translateY(-1px); } }

/* ---------- videos: where they come from, shorts, and the Shorts player ---------- */
.group-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); }
.group-head h2 { margin: 0; font-size: 26px; letter-spacing: -.4px; }
.group-head + .section { margin-top: 18px; }
.video-row .icon-btn.sound { margin-left: -4px; }
.cover.tall { aspect-ratio: 9 / 16; }
.shelf.tall { grid-auto-columns: calc((100% - 5 * 20px) / 6); }
.short-card .play-mark { position: absolute; right: 8px; bottom: 8px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: rgb(0 0 0 / 60%); color: #fff; }
.short-card .play-mark svg { width: 16px; height: 16px; }

body.watching .view { padding-bottom: 0; }
body.watching .report-fab, body.watching .tray { display: none; }
.shorts {
  height: calc(100dvh - var(--bar) - env(safe-area-inset-top) - 10px); overflow-y: auto; overscroll-behavior: contain;
  scroll-snap-type: y mandatory; scrollbar-width: none; outline: none; margin: 0 calc(-1 * var(--gutter));
}
.shorts::-webkit-scrollbar { display: none; }
.short { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 14px; padding: 10px 0; scroll-snap-align: start; scroll-snap-stop: always; }
.short-frame { position: relative; height: 100%; aspect-ratio: 9 / 16; max-width: calc(100% - 80px); border-radius: 16px; overflow: hidden; background: #000; cursor: pointer; box-shadow: var(--shadow); }
.short-frame > video, .short-frame > .cover { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
.short-frame > video { object-fit: contain; background: #000; }
.short-frame > .cover img { object-fit: cover; filter: brightness(.75); }
.short-frame > .spinner.big { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px; border-width: 3px; }
.short-frame > .paused-mark { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; color: #fff; }
.short-frame > .paused-mark svg { width: 72px; height: 72px; padding: 14px; border-radius: 50%; background: rgb(0 0 0 / 45%); }
.short-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 16px 16px; color: #fff; pointer-events: none; background: linear-gradient(transparent, rgb(0 0 0 / 75%)); }
.short-channel { font-weight: 700; font-size: 15px; }
.short-title { margin-top: 4px; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.short-error { position: absolute; inset: 0; display: grid; place-content: center; gap: 10px; padding: 24px; text-align: center; color: #fff; background: rgb(0 0 0 / 72%); }
.short-error p { margin: 0; }
.short-actions { display: flex; flex-direction: column; gap: 14px; padding-bottom: 6px; }
.short-actions .icon-btn { width: 48px; height: 48px; background: var(--panel); color: var(--text); }
@media (hover: hover) { .short-actions .icon-btn:hover { background: var(--panel-2); } }
.short-actions .icon-btn.done { color: var(--good); }
.short-nav { position: fixed; top: 50%; right: max(24px, calc((100vw - var(--wide)) / 2 + 12px)); transform: translateY(-50%); display: flex; flex-direction: column; gap: 14px; z-index: 5; }
.short-nav .arrow { width: 48px; height: 48px; }

/* ---------- song rows ---------- */
.rows { display: flex; flex-direction: column; }
.row {
  display: grid; grid-template-columns: auto 52px minmax(0, 1fr) auto auto; align-items: center; gap: 14px;
  padding: 9px 10px; margin: 0 -10px; border-radius: 10px; cursor: default;
}
@media (hover: hover) { .row:hover { background: var(--panel); } }
.row .num { width: 28px; text-align: center; color: var(--faint); font-variant-numeric: tabular-nums; font-size: 14px; }
.thumb { width: 52px; height: 52px; border-radius: 8px; overflow: hidden; background: var(--panel-2); position: relative; }
.thumb img { position: relative; width: 100%; height: 100%; object-fit: cover; }
.thumb .fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); }
.thumb .fallback svg { width: 22px; height: 22px; }
.row .meta { min-width: 0; }
.row .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .time { color: var(--faint); font-size: 13px; font-variant-numeric: tabular-nums; }
.rows.numbered .row { grid-template-columns: 28px minmax(0, 1fr) 52px auto; border-radius: 8px; padding-top: 7px; padding-bottom: 7px; }
.rows.unnumbered .row { grid-template-columns: 52px minmax(0, 1fr) auto auto; }
.table-head { display: grid; grid-template-columns: 28px minmax(0, 1fr) 52px 38px; gap: 14px; padding: 0 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; color: var(--faint); font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; }
.table-head .num { text-align: center; }

/* ---------- episodes ---------- */
.row.episode { grid-template-columns: 52px minmax(0, 1fr) auto; }
.shelf.columns > .row.episode { grid-template-columns: 52px minmax(0, 1fr) auto; }
.rows.episodes .row { border-bottom: 1px solid var(--line); border-radius: 0; padding-top: 14px; padding-bottom: 14px; }
.row .date { font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row.episode.long { grid-template-columns: 76px minmax(0, 1fr) auto; align-items: start; gap: 16px; }
.row.episode.long .thumb { width: 76px; height: 76px; }
.row.episode.long .title { white-space: normal; overflow-wrap: anywhere; }
.row .words { margin: 3px 0; font-size: 13px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }

/* ---------- artists A–Z ---------- */
.artists-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 16px; }
.artists-find { flex: 1 1 240px; max-width: 360px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-size: 14px; outline: none; }
.artists-find:focus { border-color: var(--accent); }
.artists-count { margin: 0; font-size: 13px; color: var(--muted); }
.chip { height: 32px; min-width: 34px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); }
@media (hover: hover) { .chip:hover { color: var(--text); background: var(--panel); } }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.names { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 16px; }
.name-link { display: flex; align-items: center; gap: 12px; padding: 7px 10px; margin: 0 -10px; border-radius: 10px; min-width: 0; }
@media (hover: hover) { .name-link:hover { background: var(--panel); } }
.name-link .dot { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; font-size: 14px;
  background: linear-gradient(135deg, hsl(var(--hue, 40) 55% 42%), hsl(calc(var(--hue, 40) + 40) 60% 28%)); }
img.dot { object-fit: cover; }
.name-link .who { min-width: 0; }
.name-link .who div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.more-row { display: flex; justify-content: center; margin-top: 18px; }

/* ---------- headers of an artist, an album and a show ---------- */
.detail { position: relative; isolation: isolate; display: flex; align-items: center; gap: 36px; padding: 40px 0 28px; flex-wrap: wrap; }
/* The page's own picture, blurred wide behind its head, fading into the page. */
.detail-tint { position: absolute; z-index: -1; top: -80px; bottom: -40px; left: 50%; width: 100vw; transform: translateX(-50%); overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 35%, transparent); mask-image: linear-gradient(#000 35%, transparent); }
.detail-back { width: 100%; height: 100%; object-fit: cover; filter: blur(70px) saturate(1.5); opacity: .4; transform: scale(1.25); }
.detail-back.plain { filter: none; transform: none; background: hsl(var(--hue, 40) 55% 40%); }
.detail > .cover { width: 220px; flex-shrink: 0; box-shadow: var(--shadow); }
.detail .info { flex: 1; min-width: 240px; }
.kind { font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.detail h1 { font-size: clamp(28px, 5vw, 48px); line-height: 1.08; margin: 8px 0 10px; letter-spacing: -.8px; overflow-wrap: anywhere; }
.detail .line { color: var(--muted); }
.detail .actions { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.latest { display: flex; align-items: center; gap: 18px; margin-top: 14px; padding: 12px; border-radius: 16px; background: var(--panel); transition: background .15s; }
@media (hover: hover) { .latest:hover { background: var(--panel-2); } }
.latest .cover { width: 112px; flex-shrink: 0; }
.latest > div:last-child { min-width: 0; }
.latest b { display: block; font-size: 20px; margin-bottom: 6px; }
.latest .title { font-weight: 600; overflow-wrap: anywhere; }
.latest .muted { font-size: 13px; }
.back { margin-top: 14px; }

/* ---------- the library ---------- */
.library { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 36px; align-items: start; padding-top: 24px; }
.side { position: sticky; top: calc(var(--bar) + 24px); display: flex; flex-direction: column; gap: 4px; padding-right: 20px; border-right: 1px solid var(--line); min-height: 320px; }
.side-title { padding: 4px 12px 10px; font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); }
.side a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; font-weight: 600; }
@media (hover: hover) { .side a:hover { background: var(--panel); } }
.side a svg { width: 20px; height: 20px; color: var(--muted); }
.side a[aria-current="page"] { color: var(--accent); background: var(--panel); }
.side a[aria-current="page"] svg { color: var(--accent); }
.side-main h1 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.3px; }
.side-main .section { margin-top: 18px; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 13px; }

/* ---------- forms and dialogs ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }
.auth { max-width: 400px; margin: 9vh auto 0; }
.auth h1 { margin: 0 0 6px; font-size: 26px; }
.auth p { margin: 0 0 18px; color: var(--muted); }
.auth a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.auth-aside { margin: -8px 0 14px; text-align: right; font-size: 14px; }
.auth-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; font-size: 14px; }
.field-note { font-size: 12.5px; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field textarea {
  height: 44px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--line); background: var(--bg-2); outline: none;
}
.field textarea { height: auto; min-height: 84px; padding: 10px 14px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field input:disabled { opacity: .7; }
.form-error { min-height: 20px; color: var(--bad); font-size: 14px; margin: -4px 0 10px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.auth .form-actions .btn { flex: 1; }
/* It ends above a phone's keyboard (--kb, set by app.js) and scrolls, so its buttons can always be reached; the dialog is centred by
   its margins, which never push it past the top. */
.dialog-back { position: fixed; inset: 0 0 var(--kb, 0px); z-index: 40; background: rgb(0 0 0 / 50%); display: flex; overflow-y: auto; overscroll-behavior: contain; padding: var(--gutter); animation: fade .15s; }
.dialog-back > .dialog { margin: auto; }
.dialog { width: 100%; max-width: 460px; }
.dialog h2 { margin: 0 0 4px; font-size: 21px; }
.dialog p { margin: 0 0 16px; color: var(--muted); }
@keyframes fade { from { opacity: 0; } }

/* ---------- the profile page ---------- */
.profile { display: flex; flex-direction: column; gap: 16px; max-width: 520px; margin: 0 auto; padding-top: 24px; }
.profile .back { margin-top: 0; }
.profile-head { display: flex; align-items: center; gap: 16px; min-width: 0; }
.profile-head > div { min-width: 0; }
.profile-head h1 { margin: 0; font-size: 26px; overflow-wrap: anywhere; }
.avatar.big { width: 64px; height: 64px; flex-shrink: 0; font-size: 22px; }
.profile h2 { margin: 0 0 14px; font-size: 18px; }
.profile .panel p { margin: -6px 0 14px; font-size: 14px; color: var(--muted); }

/* ---------- the account menu ---------- */
.menu { position: fixed; right: max(var(--gutter), calc((100vw - var(--wide)) / 2 + var(--gutter))); top: calc(var(--bar) + env(safe-area-inset-top) - 4px); z-index: 30; width: 270px; padding: 8px; }
.menu .who { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu .who b { display: block; }
.meter { height: 6px; border-radius: 99px; background: var(--panel-2); overflow: hidden; margin-top: 8px; }
.meter > span { display: block; height: 100%; background: var(--accent); width: 0; }
.menu a, .menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; border: 0; background: transparent; cursor: pointer; text-align: left; }
@media (hover: hover) { .menu a:hover, .menu button:hover { background: var(--panel-2); } }
.menu svg { width: 18px; height: 18px; color: var(--muted); }
.badge-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; display: grid; place-items: center; }

/* ---------- requests ---------- */
.requests { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.request { padding: 14px 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.request .top { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.request .what { font-weight: 600; overflow-wrap: anywhere; }
.request .when { font-size: 12px; color: var(--faint); }
.request .note, .request .reply { margin-top: 6px; font-size: 14px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.request .reply { color: var(--text); border-left: 3px solid var(--accent); padding-left: 10px; }
.status { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--panel-2); color: var(--muted); }
.status.done { background: color-mix(in srgb, var(--good) 20%, transparent); color: var(--good); }
.status.declined { background: color-mix(in srgb, var(--bad) 18%, transparent); color: var(--bad); }
.status.closed { background: var(--panel-2); color: var(--faint); }
.ask { margin-top: 34px; padding: 20px; border-radius: var(--radius); background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 16%, var(--panel)), var(--panel)); border: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ask b { display: block; font-size: 16px; }

/* ---------- reporting a problem ---------- */
.kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.kinds .chip[aria-checked="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.field .label { font-size: 13px; font-weight: 600; color: var(--muted); }
.notice .btn.quiet { color: var(--text); }

/* The corner: its button, and the popup that opens above it (the downloads tray and the toasts sit above the button too). */
.report-fab { position: fixed; right: var(--gutter); bottom: var(--corner); z-index: 26; height: 44px; box-shadow: var(--shadow); }
.report-pop {
  position: fixed; right: var(--gutter); bottom: calc(var(--corner) + 54px); z-index: 35; width: 360px; max-width: calc(100vw - 2 * var(--gutter));
  max-height: calc(100vh - var(--corner) - 70px); max-height: calc(100dvh - var(--corner) - 70px); overflow: auto; overscroll-behavior: contain; padding: 16px 18px 18px; animation: rise .15s;
}
.pop-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pop-head h2 { margin: 0; font-size: 18px; }
.pop-head .icon-btn { margin-right: -8px; }
.report-pop > p { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.report-pop .check { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; font-size: 14px; color: var(--muted); cursor: pointer; }
.report-pop .check input { width: 18px; height: 18px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--accent); }
.report-pop .check q { color: var(--text); overflow-wrap: anywhere; }
.report-pop .small { font-size: 13px; margin: 0 0 10px; }
.report-pop .field textarea { min-height: 100px; }
.shot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.shot img { width: 100%; max-height: 120px; object-fit: contain; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); }
.small-hint { font-size: 13px; flex-basis: 100%; }
.shot .link { border: 0; background: none; padding: 4px 0; cursor: pointer; font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
@media (hover: hover) { .shot .link:hover { color: var(--text); } }
.shot .link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pop-actions { align-items: center; justify-content: space-between; }
/* Send stays in sight when the popup is taller than the window. */
.report-pop .pop-actions { position: sticky; bottom: -18px; margin: 0 -18px -18px; padding: 10px 18px 18px; background: var(--panel); }
.pop-actions a { color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 2px; }
@media (hover: hover) { .pop-actions a:hover { color: var(--text); } }
.report-fab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ---------- the downloads tray ---------- */
.tray {
  position: fixed; right: var(--gutter); bottom: calc(var(--corner) + 54px); z-index: 25; width: 340px; max-width: calc(100vw - 2 * var(--gutter));
  max-height: 46vh; overflow: auto; padding: 8px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.tray-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 8px; font-weight: 700; font-size: 14px; }
.job { padding: 8px 8px 10px; border-radius: 10px; }
.job + .job { border-top: 1px solid var(--line); }
.job .name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job .state { font-size: 12px; color: var(--muted); margin-top: 2px; }
.job.failed .state { color: var(--bad); }
.job.saved .state { color: var(--good); }
.job .meter { margin-top: 7px; }
/* Send to phone: a file got ready, waiting for the click that opens the share menu. */
.job.ready .state { color: var(--accent); }
.job.held .state { color: var(--bad); }
.job.sent .state { color: var(--good); }
.job-actions { display: flex; gap: 8px; margin-top: 8px; }
.icon-btn.send.ready, .icon-btn.send.ready:hover, .btn.send.ready { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(560px, calc(100vw - 32px)); }
.toast { pointer-events: auto; padding: 11px 16px; border-radius: 12px; background: var(--text); color: var(--bg); box-shadow: var(--shadow); font-size: 14px; animation: fade .2s; }
.toast.bad { background: var(--bad); color: #fff; display: flex; align-items: center; gap: 12px; }
.toast-action { margin-left: auto; flex-shrink: 0; height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid rgb(255 255 255 / 60%); background: transparent; color: #fff; font-weight: 600; font-size: 13px; cursor: pointer; }
@media (hover: hover) { .toast-action:hover { background: rgb(255 255 255 / 15%); } }

/* A narrow window: the toasts would run into the corner's button, so they sit above it. */
@media (max-width: 1040px) {
  .toasts { bottom: calc(var(--corner) + 54px); }
}

@media (max-width: 980px) {
  .tabs .tab { padding: 0 9px; }
  .tabs .tab svg { display: none; }
  .brand-name { display: none; }
  .scope { padding: 0 10px; font-size: 13px; }
  .shelf { grid-auto-columns: calc((100% - 2 * 20px) / 3); }
  .shelf.faces { grid-auto-columns: calc((100% - 4 * 20px) / 5); }
  .shelf.wide { grid-auto-columns: calc((100% - 20px) / 2); }
  .shelf.tiles { grid-auto-columns: calc((100% - 2 * 20px) / 3); }
  .shelf.columns { grid-auto-columns: 80%; }
  .banner-track { grid-auto-columns: 82%; }
}

/* Between a tablet held upright and a phone: Back and Forward make way for the box and the switch. */
@media (max-width: 880px) {
  .bar.has-scopes .history { display: none; }
}

/* A phone: the sections go along the bottom, and shelves show the next thing peeking in. */
@media (max-width: 760px) {
  :root { --gutter: 16px; --bar: 58px; --tabbar: 66px; --corner: calc(70px + env(safe-area-inset-bottom)); }
  .bar-in { gap: 10px; }
  .brand-name { display: inline; }
  .history, .tabs { display: none; }
  .bar.is-searching .brand, .bar.is-searching .grow { display: none; }
  .search { position: static; margin-left: 0; max-width: none; }
  .search-panel { top: 100%; left: 0; right: 0; width: auto; max-height: max(160px, calc(100dvh - var(--bar) - env(safe-area-inset-top) - var(--kb, 0px) - 8px)); padding: 8px calc(var(--gutter) - 6px); border-width: 0 0 1px; border-radius: 0 0 var(--radius) var(--radius); }
  .bar.has-scopes .bar-in { flex-wrap: wrap; align-content: center; height: auto; row-gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  /* From nothing, so the box and the account stay on the first row and only the switch takes the second. */
  .bar.has-scopes .search { flex-basis: 0; }
  .bar.has-scopes .scopes { order: 1; display: flex; flex-basis: 100%; }
  .bar.has-scopes .scope { flex: 1; font-size: 14px; }
  .bar.has-scopes .search-panel { max-height: max(160px, calc(100dvh - var(--bar) - env(safe-area-inset-top) - var(--kb, 0px) - 58px)); }
  .tabbar:not([hidden]) {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: center; position: fixed; left: 0; right: 0; bottom: 0; z-index: 24;
    height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding: 0 4px env(safe-area-inset-bottom); background: color-mix(in srgb, var(--bg-2) 96%, transparent); border-top: 1px solid var(--line);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  }
  .tabbar .tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 56px; margin: 0 4px; padding: 0 2px; border-radius: 22px; font-size: 11px; font-weight: 600; color: var(--muted); }
  .tabbar .tab-glass { border-radius: 22px; }
  .tabbar .tab svg { width: 22px; height: 22px; }
  .tabbar .tab[aria-current="page"] { color: var(--accent); }
  .view { padding-bottom: 170px; }
  .section { margin-top: 30px; }
  .section-head h2 { font-size: 19px; }
  .arrows { display: none; }
  .banner-track { grid-auto-columns: 90%; gap: 12px; }
  .banner { height: 164px; padding: 16px; gap: 12px; }
  .banner > .cover { width: 112px; }
  .dots { gap: 9px; }
  .dots button { width: 8px; height: 8px; }
  .shelf { grid-auto-columns: 42%; gap: 0 14px; }
  .shelf.faces { grid-auto-columns: 30%; }
  .shelf.wide { grid-auto-columns: 78%; }
  .shelf.tiles { grid-auto-columns: 42%; }
  .shelf.columns { grid-auto-columns: 90%; gap: 0 18px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px 14px; }
  .grid.faces { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .grid.videos { grid-template-columns: minmax(0, 1fr); }
  .shelf.tall { grid-auto-columns: 38%; }
  .group-head h2 { font-size: 22px; }
  /* On a phone a short fills the screen between the bar and the tabs, its buttons over its right side, as YouTube's do. The feed is
     pinned there rather than sized from the window's height, which a phone's browser changes as its own bars come and go. */
  .shorts { position: fixed; left: 0; right: 0; top: calc(var(--bar) + 1px + env(safe-area-inset-top)); bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); height: auto; margin: 0; background: #000; }
  .short { padding: 0; }
  .short-frame { width: 100%; max-width: none; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
  .short-info { padding-right: 76px; }
  .short-actions { position: absolute; right: 10px; bottom: 18px; z-index: 2; }
  .short-actions .icon-btn { background: rgb(255 255 255 / 16%); border-color: rgb(255 255 255 / 14%); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
  .short-nav { display: none; }
  .row { gap: 12px; }
  .rows.unnumbered .row .time, .shelf.columns .row .time { display: none; }
  .rows.unnumbered .row, .shelf.columns > .row { grid-template-columns: 52px minmax(0, 1fr) auto; }
  .playlist-rows .row.has-grip { grid-template-columns: 18px 52px minmax(0, 1fr) auto; }
  .detail.compact > .cover { width: min(168px, 50vw); }
  .row.episode.long { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; }
  .row.episode.long .thumb { width: 56px; height: 56px; }
  .detail { flex-direction: column; text-align: center; gap: 18px; padding-top: 24px; }
  .detail > .cover { width: min(210px, 60vw); }
  .detail .info { flex: none; width: 100%; min-width: 0; }
  .detail .actions { justify-content: center; }
  .latest .cover { width: 84px; }
  .latest b { font-size: 17px; }
  .library { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 14px; }
  .side { position: static; flex-direction: row; gap: 6px; overflow-x: auto; min-height: 0; padding: 0 0 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-title { display: none; }
  .side a { flex-shrink: 0; gap: 8px; padding: 8px 12px; font-size: 14px; }
  .tray { left: var(--gutter); right: var(--gutter); width: auto; }
  .report-fab { width: 44px; padding: 0; }
  .report-fab .label { display: none; }
}
/* ---------- playing: rows ---------- */
.row.playable { cursor: pointer; }
.row.is-current .title { color: var(--accent); }
.play-cell { position: relative; display: grid; place-items: center; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; border-radius: 8px; }
.play-cell.num { width: 28px; height: 32px; color: var(--faint); font-variant-numeric: tabular-nums; font-size: 14px; }
.play-cell > * { grid-area: 1 / 1; }
.play-cell .pc-play { display: none; }
.play-cell.num .pc-play svg { width: 18px; height: 18px; color: var(--text); }
.play-cell.pic .pc-play { position: absolute; inset: 0; place-items: center; border-radius: 8px; background: rgb(0 0 0 / 50%); color: #fff; }
.play-cell.pic .pc-play svg { width: 22px; height: 22px; }
.play-cell:focus-visible .pc-play { display: grid; }
@media (hover: hover) { .row.playable:hover .play-cell .pc-play { display: grid; } }
@media (hover: hover) { .row.playable:hover .play-cell.num .n { visibility: hidden; } }
.play-cell:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.eq { display: none; gap: 2px; align-items: flex-end; height: 14px; pointer-events: none; }
.eq i { display: block; width: 3px; height: 100%; border-radius: 1px; background: var(--accent); transform-origin: bottom; animation: eq .9s ease-in-out infinite; animation-play-state: paused; transform: scaleY(.35); }
.eq i:nth-child(2) { animation-delay: -.3s; }
.eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.is-current .eq { display: flex; }
.is-playing .eq i { animation-play-state: running; }
.is-current .play-cell.num .n { visibility: hidden; }
@media (hover: hover) { .row.playable.is-current:hover .eq { display: none; } }
.play-cell.pic .eq { position: absolute; inset: 0; height: auto; align-items: center; justify-content: center; border-radius: 8px; background: rgb(0 0 0 / 45%); }
.play-cell.pic .eq i { height: 16px; }
/* The playing song's bars over its picture: a missing picture's note would show through them. */
.is-current .play-cell.pic .fallback svg { visibility: hidden; }
.row .more { opacity: .75; }
.row .more:focus-visible, .row .more[aria-expanded="true"] { opacity: 1; }
@media (hover: hover) { .row:hover .more { opacity: 1; } }
.row .sub .left { color: var(--accent); }
.hero-actions { display: flex; gap: 12px; align-items: center; margin: 4px 0 18px; }
.btn.big.play-all { min-width: 140px; }
.btn.big-ish { height: 46px; }
.icon-btn.round { width: 46px; height: 46px; border: 1px solid var(--line); }
@media (hover: hover) { .icon-btn.round:hover { border-color: var(--text); } }

/* ---------- playing: the player, floating along the bottom ---------- */
/* --player-h is all the room it takes from the bottom: its own height and the gap under it. */
:root { --player-bar: 84px; --player-gap: 12px; --player-h: calc(var(--player-bar) + var(--player-gap)); }
.player {
  position: fixed; left: var(--player-gap); right: var(--player-gap); bottom: calc(var(--player-gap) + env(safe-area-inset-bottom)); z-index: 23; max-width: var(--wide); height: var(--player-bar); margin: 0 auto; padding: 0 20px;
  display: grid; grid-template-columns: minmax(180px, 1fr) minmax(300px, 1.6fr) minmax(180px, 1fr); align-items: center; gap: 20px;
  border: 1px solid var(--glass-line); border-radius: 22px; background: var(--glass); box-shadow: var(--glass-shadow);
  backdrop-filter: blur(24px) saturate(1.8); -webkit-backdrop-filter: blur(24px) saturate(1.8); animation: rise .2s;
}
.pl-line { display: none; }
.pl-now { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 6px; margin: -6px; border: 0; border-radius: 12px; background: none; text-align: left; cursor: pointer; }
@media (hover: hover) { .pl-now:hover { background: color-mix(in srgb, var(--text) 6%, transparent); } }
.pl-now:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pl-now .thumb { width: 56px; height: 56px; flex-shrink: 0; }
.pl-meta { display: flex; flex-direction: column; min-width: 0; }
.pl-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-artist { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-center { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.controls { display: flex; align-items: center; gap: 10px; }
.controls .ctl { color: var(--muted); }
@media (hover: hover) { .controls .ctl:hover { color: var(--text); } }
.ctl.on { color: var(--accent) !important; position: relative; }
.ctl.on::after { content: ""; position: absolute; bottom: 3px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.ctl .jump { font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.play-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--text); color: var(--bg); cursor: pointer; flex-shrink: 0; transition: transform .1s; }
@media (hover: hover) { .play-btn:hover { transform: scale(1.06); } }
.play-btn:active { transform: scale(.97); }
.play-btn svg { width: 22px; height: 22px; }
.play-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.play-btn.big { width: 66px; height: 66px; background: var(--accent); color: var(--accent-ink); }
.play-btn.big svg { width: 34px; height: 34px; }
.play-btn .spinner { width: 18px; height: 18px; border-color: color-mix(in srgb, currentColor 30%, transparent); border-top-color: currentColor; }
.controls.big { gap: 22px; justify-content: center; }
.controls.big .ctl svg { width: 28px; height: 28px; }
.controls.big .ctl { width: 48px; height: 48px; }
.seek-row { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 620px; }
.seek-row .t { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 38px; text-align: center; }
.seek, .volume {
  -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; height: 4px; margin: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(to right, var(--text) var(--fill, 0%), var(--line) var(--fill, 0%));
}
.seek:focus-visible, .volume:focus-visible { background: linear-gradient(to right, var(--accent) var(--fill, 0%), var(--line) var(--fill, 0%)); outline: none; }
@media (hover: hover) { .seek:hover, .volume:hover { background: linear-gradient(to right, var(--accent) var(--fill, 0%), var(--line) var(--fill, 0%)); outline: none; } }
.seek::-webkit-slider-thumb, .volume::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: var(--text); border: 0; opacity: 0; transition: opacity .15s; }
.seek::-moz-range-thumb, .volume::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: var(--text); border: 0; opacity: 0; transition: opacity .15s; }
.seek:focus-visible::-webkit-slider-thumb, .volume:focus-visible::-webkit-slider-thumb, .seek.big::-webkit-slider-thumb { opacity: 1; }
@media (hover: hover) { .seek:hover::-webkit-slider-thumb, .volume:hover::-webkit-slider-thumb { opacity: 1; } }
.seek:focus-visible::-moz-range-thumb, .volume:focus-visible::-moz-range-thumb, .seek.big::-moz-range-thumb { opacity: 1; }
@media (hover: hover) { .seek:hover::-moz-range-thumb, .volume:hover::-moz-range-thumb { opacity: 1; } }
.seek.big { height: 5px; }
.pl-right { display: flex; align-items: center; justify-content: flex-end; gap: 4px; min-width: 0; }
.pl-right .ctl { color: var(--muted); }
@media (hover: hover) { .pl-right .ctl:hover { color: var(--text); } }
.pl-right .volume { flex: 0 1 110px; }
body.has-player .view { padding-bottom: calc(130px + var(--player-h)); }
body.has-player .report-fab { bottom: calc(var(--corner) + var(--player-h)); }
body.has-player .tray, body.has-player .report-pop { bottom: calc(var(--corner) + 54px + var(--player-h)); }
body.has-player .toasts { bottom: calc(24px + var(--player-h)); }
body.watching .player { display: none; }
/* Now Playing has the queue where the corner's button sits: its ⋮ menu has "Report a problem with it" instead (the popup that
   opens shows over Now Playing). */
body.np-open .report-fab, body.np-open .tray { display: none; }
/* A send is finished from the tray, so it shows over Now Playing and the Shorts player too. */
body.np-open .tray.sending:not([hidden]), body.watching .tray.sending:not([hidden]) { display: block; z-index: 32; }

/* ---------- playing: Now Playing ---------- */
.nowplaying {
  position: fixed; z-index: 21; left: 0; right: 0; top: calc(var(--bar) + env(safe-area-inset-top)); bottom: 0;
  overflow: hidden; isolation: isolate; background: var(--bg); outline: none; animation: np-in .34s cubic-bezier(.22, .8, .3, 1);
}
/* It fades up into place, and fades down and away (app.js hides it once it has gone). */
.nowplaying.leaving { animation: np-out .28s cubic-bezier(.4, 0, .7, .4) forwards; pointer-events: none; }
@keyframes np-in { from { opacity: 0; transform: translateY(72px); } }
@keyframes np-out { to { opacity: 0; transform: translateY(72px); } }
.np-tint { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.np-back { width: 100%; height: 100%; object-fit: cover; filter: blur(80px) saturate(1.6); opacity: .45; transform: scale(1.3); }
.np-back.plain { filter: none; transform: none; opacity: .35; background: hsl(var(--hue, 40) 55% 35%); }
.np { height: 100%; max-width: var(--wide); margin: 0 auto; padding: 18px var(--gutter) calc(var(--player-h) + var(--player-gap) + env(safe-area-inset-bottom)); display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); grid-template-rows: auto minmax(0, 1fr); gap: 0 44px; }
.np-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.np-from { font-size: 13px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-main { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; min-height: 0; padding-bottom: 24px; text-align: center; }
.np-main > .cover.np-art { width: min(400px, 100%, 52vh); flex-shrink: 1; box-shadow: 0 24px 60px rgb(0 0 0 / 55%); }
.np-text { width: 100%; min-width: 0; }
.np-text h2 { margin: 0 0 6px; font-size: clamp(22px, 3vw, 32px); line-height: 1.15; letter-spacing: -.4px; overflow-wrap: anywhere; }
.np-sub { color: var(--muted); }
.np-sub a { color: var(--text); }
@media (hover: hover) { .np-sub a:hover { text-decoration: underline; text-underline-offset: 3px; } }
.np-play { display: none; width: 100%; }
.np-extras { display: flex; align-items: center; gap: 8px; }
.np-extras .ctl { color: var(--muted); }
.np-extras .chip.speed { min-width: 52px; }
.np-side { display: flex; flex-direction: column; min-height: 0; background: color-mix(in srgb, var(--panel) 80%, transparent); border: 1px solid var(--line); border-radius: 18px; }
.np-tabs { display: flex; gap: 4px; padding: 10px 10px 0; border-bottom: 1px solid var(--line); }
.np-tab { flex: 1; height: 42px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-weight: 700; cursor: pointer; }
.np-tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.np-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.np-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 6px 14px 20px; }
.np-list h3 { margin: 16px 0 6px; font-size: 16px; }
.np-list .small { font-size: 13px; }
.np-list .empty.small { padding: 10px 0; }
.np-list .muted a { color: var(--text); }
@media (hover: hover) { .np-list .muted a:hover { text-decoration: underline; } }
.np-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 10px; }
/* The Lyrics tab: the line being sung bright, the ones before it dimmer, the ones to come dimmest; a tap on a timed line goes to it. */
.np-lyrics { position: relative; padding: 18px 20px 48px; }
.lyric { margin: 0; padding: 5px 6px; border-radius: 8px; font-size: 22px; font-weight: 700; line-height: 1.35; color: color-mix(in srgb, var(--text) 38%, transparent); overflow-wrap: anywhere; transition: color .2s ease; }
.np-lyrics.timed .lyric { cursor: pointer; }
@media (hover: hover) { .np-lyrics.timed .lyric:hover { background: color-mix(in srgb, var(--text) 6%, transparent); } }
.lyric.sung { color: color-mix(in srgb, var(--text) 62%, transparent); }
.lyric.now { color: var(--text); }
.lyric.rest { letter-spacing: 2px; }
.np-lyrics.plain .lyric { font-size: 18px; font-weight: 600; color: var(--text); padding: 2px 0; }
.lyric-gap { height: 18px; }
.lyrics-source { margin: 28px 6px 0; }
@media (prefers-reduced-motion: reduce) { .lyric { transition: none; } }
.np-head h3 { margin-bottom: 2px; }
.np-head-actions { display: flex; align-items: center; gap: 2px; }
.np-head-actions .ctl { width: 34px; height: 34px; color: var(--muted); }
.np-head-actions .ctl svg { width: 18px; height: 18px; }
.rows.queue .row { margin: 0 -8px; padding: 7px 8px; gap: 12px; grid-template-columns: 44px minmax(0, 1fr) auto auto; cursor: pointer; }
.rows.queue .row.has-grip { grid-template-columns: 18px 44px minmax(0, 1fr) auto auto; }
.rows.queue .row { -webkit-user-select: none; user-select: none; }
.rows.queue img { -webkit-user-drag: none; }
.rows.queue .row.is-current { cursor: default; background: color-mix(in srgb, var(--accent) 10%, transparent); }
.rows.queue .thumb { width: 44px; height: 44px; }
.rows.queue .play-cell.pic { width: 44px; height: 44px; }
.rows.queue .row .icon-btn { width: 36px; height: 36px; }
.rows.queue .remove { opacity: 0; }
.rows.queue .remove:focus-visible { opacity: 1; }
@media (hover: hover) { .rows.queue .row:hover .remove { opacity: 1; } }
.rows.queue.auto .row { opacity: .8; }
.grip { display: grid; place-items: center; color: var(--faint); cursor: grab; touch-action: none; }
.grip svg { width: 16px; height: 16px; }
.row.dragging { background: var(--panel-2); box-shadow: var(--shadow); cursor: grabbing; }
.switch { position: relative; width: 44px; height: 26px; flex-shrink: 0; padding: 0; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; transition: background .15s; }
.switch > span { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: left .15s, background .15s; }
.switch[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
.switch[aria-checked="true"] > span { left: 20px; background: var(--accent-ink); }
.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* An item's menu, beside its ⋮ (placed by the page). */
.menu.pop-menu { right: auto; width: 260px; max-height: min(70vh, 480px); overflow-y: auto; z-index: 45; animation: fade .12s; }
.pop-menu .who { overflow: hidden; }
.pop-menu .who b, .pop-menu .who .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* On a phone a menu (app.js, popUp) and the report form are sheets from the bottom of the screen, over the page dimmed; above the
   keyboard when one is up (--kb). */
.sheet-back { position: fixed; inset: 0 0 var(--kb, 0px); z-index: 45; background: rgb(0 0 0 / 45%); animation: fade .15s; touch-action: none; }
.sheet-back > .sheet {
  position: absolute; left: 0; right: 0; top: auto; bottom: 0; width: auto; max-width: none; max-height: calc(100% - 24px); overflow-y: auto;
  border-radius: 20px 20px 0 0; border-bottom: 0; box-shadow: 0 -8px 30px rgb(0 0 0 / 25%); animation: sheet-up .22s ease-out; overscroll-behavior: contain; touch-action: pan-y;
}
.menu.pop-menu.sheet { max-height: min(calc(100% - 24px), 640px); padding: 0 10px calc(12px + env(safe-area-inset-bottom)); }
.pop-menu.sheet .grabber { position: sticky; top: 0; height: 22px; margin: 0 -10px; background: var(--panel); }
.pop-menu.sheet .grabber::after { content: ''; display: block; width: 38px; height: 5px; margin: 8px auto 0; border-radius: 3px; background: var(--line); }
.pop-menu.sheet .who { padding: 4px 14px 12px; }
.pop-menu.sheet .who b { font-size: 16px; }
.pop-menu.sheet a, .pop-menu.sheet button { min-height: 50px; padding: 0 14px; gap: 14px; font-size: 16px; }
.pop-menu.sheet svg { width: 22px; height: 22px; }
@keyframes sheet-up { from { transform: translateY(100%); } }

/* A narrow window: the toasts would run into the corner's button, so they sit above it (and above the player). */
@media (max-width: 1040px) {
  body.has-player .toasts { bottom: calc(var(--corner) + 54px + var(--player-h)); }
  /* No room for the sound here, which is all the right side has. */
  .player { grid-template-columns: minmax(150px, 1fr) minmax(260px, 1.6fr); gap: 14px; }
  .pl-right { display: none; }
}
@media (max-width: 980px) {
  .np { grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); gap: 0 28px; }
}
/* Wider than a phone, the bar stays over Now Playing and goes see-through, so the one blurred picture runs to the top of the window.
   Its background fades with it, and only what is on it slides (the picture would leave a gap under the bar if it moved too). */
@media (min-width: 761px) {
  .bar { z-index: 22; transition: background-color .28s, border-color .28s; }
  body.np-open .bar { background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; transition-duration: .34s; }
  body.np-open .tabs .tab:not([aria-current="page"]) { color: var(--text); }
  .nowplaying { top: 0; padding-top: calc(var(--bar) + env(safe-area-inset-top)); }
  body.is-offline .nowplaying { padding-top: calc(var(--bar) + 37px + env(safe-area-inset-top)); }
  .np { animation: np-rise .34s cubic-bezier(.22, .8, .3, 1); }
  .nowplaying.leaving .np { animation: np-sink .28s cubic-bezier(.4, 0, .7, .4) forwards; }
  @keyframes np-in { from { opacity: 0; } }
  @keyframes np-out { to { opacity: 0; } }
  @keyframes np-rise { from { transform: translateY(72px); } }
  @keyframes np-sink { to { transform: translateY(72px); } }
}

/* A phone: a small player above the tabs, and Now Playing over the whole screen, its controls under the picture and the queue
   below them. */
@media (max-width: 760px) {
  :root { --player-h: 72px; }
  .player {
    left: 8px; right: 8px; bottom: calc(var(--tabbar) + 8px + env(safe-area-inset-bottom)); height: 58px; padding: 0 6px 0 8px; gap: 8px; overflow: hidden;
    grid-template-columns: minmax(0, 1fr) auto; border-radius: 18px;
  }
  body:not(:has(.tabbar:not([hidden]))) .player { bottom: calc(8px + env(safe-area-inset-bottom)); }
  .pl-line { display: block; position: absolute; left: 18px; right: 18px; bottom: 0; height: 2px; border-radius: 2px; background: linear-gradient(to right, var(--text) var(--fill, 0%), color-mix(in srgb, var(--text) 20%, transparent) var(--fill, 0%)); }
  .pl-now { margin: 0; padding: 4px; gap: 10px; }
  .pl-now .thumb { width: 42px; height: 42px; }
  .pl-center .seek-row, .pl-center .side-ctl, .pl-center .prev-ctl { display: none; }
  .pl-center .controls { gap: 2px; }
  .pl-center .play-btn { width: 40px; height: 40px; background: none; color: var(--text); }
  .pl-center .play-btn svg { width: 28px; height: 28px; }
  body.has-player .view { padding-bottom: calc(170px + var(--player-h)); }
  body.has-player .report-fab { bottom: calc(var(--corner) + var(--player-h)); }
  .nowplaying { top: 0; bottom: 0; z-index: 31; overflow-y: auto; overscroll-behavior: contain; padding-top: env(safe-area-inset-top); }
  body.np-open .player, body.np-open .report-fab { display: none; }
  .np { display: block; height: auto; padding: 8px 18px calc(24px + env(safe-area-inset-bottom)); }
  .np-top { justify-content: space-between; }
  .np-top .np-from { flex: 1; text-align: center; padding-right: 40px; }
  .np-main { justify-content: flex-start; min-height: calc(100dvh - 70px - env(safe-area-inset-top)); padding: 10px 0 18px; gap: 20px; }
  .np-main > .cover.np-art { width: min(100%, 360px, 46dvh); }
  .np-text { text-align: left; }
  .np-play { display: block; }
  .np-play .seek-row { max-width: none; margin-bottom: 10px; }
  .np-list { overflow: visible; }
  /* On a phone the words scroll in a window of their own, so following the song never moves the page under the controls. */
  .np-lyrics { overflow-y: auto; max-height: 68dvh; }
  .lyric { font-size: 20px; }
}

/* ---------- kept on this device ---------- */
.saved-mark { display: none; margin-right: 6px; color: var(--good); vertical-align: -2px; }
.saved-mark svg { width: 14px; height: 14px; }
.is-saved .saved-mark { display: inline-flex; }
.row.not-here { opacity: .42; }
.btn.save-album.is-saved { color: var(--good); }
.card-button { width: 100%; border: 0; background: none; color: inherit; font: inherit; text-align: left; }
.ask.install { margin: 18px 0 6px; }
.room { padding: 4px 0 0; }
.room-line { font-size: 14px; color: var(--muted); }
.room-line b { color: var(--text); }
.meter.big { height: 8px; margin: 10px 0 16px; max-width: 520px; }
.room-field { max-width: 420px; margin-top: 6px; }
.room-field select { height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font: inherit; }
.room-field select:focus { outline: none; border-color: var(--accent); }
.room .small { font-size: 13px; margin: 0 0 8px; }
.more-row.left { justify-content: flex-start; margin-top: 8px; }
.offline-banner { position: sticky; top: 0; z-index: 22; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 8px 16px; padding-top: calc(8px + env(safe-area-inset-top)); background: var(--panel-2); border-bottom: 1px solid var(--line); font-size: 14px; }
.offline-banner svg { width: 18px; height: 18px; color: var(--muted); }
.offline-banner a { color: var(--accent); font-weight: 600; }
.offline-banner .link { border: 0; background: none; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font: inherit; }
body.is-offline .bar { top: 37px; }
.offline-panel { text-align: center; }
.offline-panel > svg { width: 44px; height: 44px; color: var(--muted); }
.offline-panel .form-actions { justify-content: center; }

/* ---------- the library: hearts, playlists ---------- */
.row-actions { display: flex; align-items: center; justify-content: flex-end; }
.icon-btn.like.on { color: var(--accent); }
.row .like { opacity: 0; }
.row .like.on, .row .like:focus-visible { opacity: 1; }
@media (hover: hover) { .row:hover .like { opacity: 1; } }
@media (hover: none) { .row .like:not(.on) { display: none; } }
.pl-left { display: flex; align-items: center; gap: 4px; min-width: 0; }
.pl-left .pl-now { flex: 1; }
.pl-left .like { flex-shrink: 0; color: var(--muted); }
.pl-left .like.on { color: var(--accent); }
.liked-cover { display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), #8b4fd8); color: #fff; }
.liked-cover svg { width: 42%; height: 42%; }
.cover.mosaic { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.cover.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.list-head.big { margin: 26px 0 18px; }
.list-head.big h1 { margin: 0; }
.detail.compact { padding: 26px 0 22px; }
.detail.compact > .cover { width: 168px; }
.playlist-rows .row.has-grip { grid-template-columns: 18px 52px minmax(0, 1fr) auto auto; }
.side a svg { flex-shrink: 0; }
/* ---------- watching a video ---------- */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; padding-top: 22px; align-items: start; }
.watch-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; box-shadow: var(--shadow); }
.watch-frame video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }
.watch-problem { position: absolute; inset: 0; display: grid; place-content: center; gap: 10px; padding: 24px; text-align: center; color: #fff; background: rgb(0 0 0 / 75%); }
.watch-problem p { margin: 0; }
.watch-title { margin: 16px 0 6px; font-size: clamp(19px, 2.4vw, 24px); line-height: 1.25; overflow-wrap: anywhere; }
.watch-line { display: flex; align-items: center; gap: 12px; }
.watch-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.watch-next h2 { margin: 0; font-size: 18px; }
.watch-next .np-head { margin: 0 0 10px; align-items: center; }
.auto-next { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.next-video { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 12px; padding: 6px; margin: 0 -6px; border-radius: 12px; }
@media (hover: hover) { .next-video:hover { background: var(--panel); } }
.next-video .cover { width: 160px; }
.next-video .card-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.card.video .video-open { display: block; position: relative; }
.card.video .video-open .play-mark { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px; display: grid; place-items: center; border-radius: 50%; background: rgb(0 0 0 / 55%); color: #fff; opacity: 0; transition: opacity .15s; }
.card.video .video-open:focus-visible .play-mark { opacity: 1; }
@media (hover: hover) { .card.video .video-open:hover .play-mark { opacity: 1; } }
.card.video .video-open .play-mark svg { width: 24px; height: 24px; }
.cover > .marks { display: contents; }
.card.video .video-name { min-width: 0; flex: 1; }
.card.video .video-title { display: block; }
/* Whose a video is: each name opens their videos' page. */
a.whose { color: inherit; }
a.whose:focus-visible { color: var(--text); text-decoration: underline; }
@media (hover: hover) { a.whose:hover { color: var(--text); text-decoration: underline; } }
.short-info a.whose { pointer-events: auto; color: #fff; }
.pip-holder { position: fixed; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
@media (max-width: 980px) {
  .watch { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .watch { padding-top: 0; margin: 0 calc(-1 * var(--gutter)); gap: 18px; }
  .watch-frame { border-radius: 0; box-shadow: none; }
  .watch-main > :not(.watch-frame), .watch-next { padding: 0 var(--gutter); }
  .next-video { grid-template-columns: 140px minmax(0, 1fr); }
  .next-video .cover { width: 140px; }
}
/* A song the site can't have (YouTube won't give it out, or Zemer's list refuses it): greyed out and passed over. */
.row.unavailable { opacity: .45; }
.row.unavailable .title::after { content: " · Not available"; font-weight: 500; color: var(--faint); }
.row.unavailable .play-cell .pc-play { display: none; }
@media (hover: hover) { .row.unavailable:hover .play-cell .pc-play { display: none; } }
.row.unavailable.playable { cursor: default; }
/* A song an album lists that isn't out yet (YouTube Music lists it greyed out): in its place, greyed, nothing to press. */
.row.not-out { opacity: .45; cursor: default; }
.row.not-out .title::after { content: " · Not released"; font-weight: 500; color: var(--faint); }
.row.not-out .play-cell { cursor: default; }
@media (hover: hover) { .row.not-out:hover { background: transparent; } }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- a phone, made for touch ---------- */

/* A quick second tap (next, next) never zooms the page, and the text keeps its size when the phone is turned. */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* A touch screen has no hover: what hover shows is always there, and a tap gives its own feedback instead of the grey flash. */
@media (hover: none) {
  a, button, .row, .card { -webkit-tap-highlight-color: transparent; }
  .row:active, .card:active, .name-link:active, .sg-row:active, .latest:active, .next-video:active, .side a:active, .menu a:active, .menu button:active { background: var(--panel); }
  .btn:active, .icon-btn:active, .chip:active, .scope:active, .tab:active, .tile:active, .banner:active { filter: brightness(.9); }
  .rows.queue .remove { opacity: 1; }
  .card.video .video-open .play-mark { opacity: 1; width: 38px; height: 38px; margin: -19px; }
}

@media (max-width: 760px) {
  /* Rows that scroll sideways run to the edges of the screen, as an app's do, rather than stopping short of them. */
  .shelf { margin: -10px calc(-1 * var(--gutter)); padding: 10px var(--gutter); scroll-padding: 0 var(--gutter); }
  .banner-track { margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); scroll-padding: 0 var(--gutter); }
  .side { margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 10px; scrollbar-width: none; }
  .side::-webkit-scrollbar { display: none; }
  /* A search's kinds are one row that scrolls, not two lines of buttons over the results. */
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter); scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filters .chip { flex-shrink: 0; }

  /* An album's, an artist's or a playlist's buttons on one line: Save and Download as round buttons, their words for screen readers. */
  .detail .actions { flex-wrap: nowrap; gap: 8px; margin-top: 18px; }
  .detail .actions .btn.big.play-all { min-width: 0; height: 44px; padding: 0 18px; }
  .detail .actions .icon-btn.round { width: 44px; height: 44px; }
  .detail .actions .btn.big-ish { position: relative; width: 44px; height: 44px; padding: 0; flex-shrink: 0; }
  .detail .actions .dl-file { display: none; }
  .detail .actions .btn.big-ish .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .detail + .section, .detail + .notice + .section { margin-top: 10px; }
  .table-head { display: none; }
  /* A video's buttons: one row that scrolls sideways. */
  .watch-actions { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-top: 12px; padding-bottom: 2px; }
  .watch-actions::-webkit-scrollbar { display: none; }
  .watch-actions > * { flex-shrink: 0; }

  /* Now Playing: the way back down stays at the top while the queue is scrolled. */
  .nowplaying { padding-top: 0; }
  .np { padding-top: 0; }
  .np-top {
    position: sticky; top: 0; z-index: 3; margin: 0 -18px 4px; padding: calc(8px + env(safe-area-inset-top)) 18px 8px;
    background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  }
  .np-top .icon-btn { width: 44px; height: 44px; }
  .np-main { min-height: calc(100dvh - 76px - env(safe-area-inset-top)); }

  /* The corner's report button would cover each row's ⋮ on a phone: "Report a problem" is in the account menu there instead. */
  .report-fab { display: none; }
  /* Toasts and the downloads list sit just above the tabs (and the player). */
  .toasts { bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 10px); }
  body.has-player .toasts { bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + var(--player-h) + 6px); }
  .tray { bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 10px); max-height: 40dvh; }
  body.has-player .tray { bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + var(--player-h) + 6px); }
  body:not(:has(.tabbar:not([hidden]))) .toasts, body:not(:has(.tabbar:not([hidden]))) .tray { bottom: calc(10px + env(safe-area-inset-bottom)); }

  /* The report form as a sheet (see .sheet-back). */
  .sheet-back > .report-pop.sheet { right: 0; bottom: 0; width: auto; max-width: none; padding: 6px 18px calc(18px + env(safe-area-inset-bottom)); animation: sheet-up .22s ease-out; }
  .sheet-back > .report-pop.sheet .pop-actions { bottom: calc(-18px - env(safe-area-inset-bottom)); padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .report-pop.sheet .pop-head { padding-top: 10px; }
}
