/* pl@yer.mp3 — holographic system sheet.
   Dark glass and chrome; foil only on what plays or is pressed. */

@property --light {
  syntax: "<angle>";
  inherits: true;
  initial-value: 24deg;
}

:root {
  --ink-0: #13101c;
  --ink-1: #1b1726;
  --ink-2: #242031;
  --ink-3: #2f2a40;
  --ink-4: #3c3551;
  --line: rgba(236, 232, 244, .12);
  --line-strong: rgba(236, 232, 244, .22);
  --fg: #f0ecf7;
  --fg-2: #c4bed5;
  --fg-3: #a6a0bb;
  --on-foil: #15111f;

  --lilac: #c8b6ff;
  --ice: #9fe3ff;
  --mint: #b8f5d8;
  --gold: #fff1b8;
  --rose: #ffc4ec;
  --danger: #ff9bb0;

  --foil: linear-gradient(112deg, #c8b6ff 0%, #9fe3ff 24%, #b8f5d8 42%, #fff1b8 58%, #ffc4ec 76%, #c8b6ff 100%);
  --sheen: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, .7) 50%, transparent 65%);
  --chrome: linear-gradient(180deg, #ffffff 0%, #f4f1fb 30%, #b9b3cc 47%, #4a445c 50.5%, #9d97b4 56%, #eef0ff 72%, #ffffff 86%, #b7c9ea 100%);
  --chrome-edge: linear-gradient(155deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, .07) 28%, rgba(255, 255, 255, .03) 62%, rgba(200, 182, 255, .3));

  --display: "Unbounded", "Golos Text", system-ui, sans-serif;
  --ui: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Martian Mono", ui-monospace, "Cascadia Mono", monospace;

  --rail-w: 236px;
  --gutter: 2rem;
  --nav-h: 0px;
  --bar-h: 80px;
  --r-win: 18px;
  --r-cover: 12px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --star-uri: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0C12.7 6.4 17.6 11.3 24 12C17.6 12.7 12.7 17.6 12 24C11.3 17.6 6.4 12.7 0 12C6.4 11.3 11.3 6.4 12 0Z' fill='%23fff'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
* {
  scrollbar-width: thin;
  scrollbar-color: var(--ink-4) transparent;
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--ink-4);
  border: 3px solid transparent;
  border-radius: 99px;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background-color: #504866; }

html {
  min-height: 100%;
  background: linear-gradient(180deg, #1b1727 0%, var(--ink-0) 60%) fixed, var(--ink-0);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  /* clip, not hidden: hidden turns body into a scroll container (its
     overflow-y computes to auto), which breaks `.rail`'s position:sticky
     — it sticks to body's own scrollport instead of the real viewport, so
     the rail scrolls away on long pages. clip never creates a scroll
     container, so it stops the disc's stray 1px (see --size below)
     without side effects. */
  overflow-x: clip;
  color: var(--fg);
  font-family: var(--ui);
  font-size: .95rem;
  line-height: 1.5;
  /* Transparent so the fixed .atmos layer (z-index -1) shows through. */
  background: transparent;
  caret-color: var(--lilac);
  -webkit-font-smoothing: antialiased;
}
button, input { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
::selection { color: var(--on-foil); background: var(--lilac); }
:focus-visible {
  outline: 2px solid var(--lilac);
  outline-offset: 3px;
}
a { color: var(--ice); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--fg); }
code {
  font-family: var(--mono);
  font-size: .78rem;
  font-stretch: 87.5%;
  padding: .05rem .35rem;
  border-radius: 6px;
  background: var(--ink-3);
  color: var(--fg);
}
kbd {
  display: inline-block;
  min-width: 1.5em;
  padding: .05rem .35rem;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: .6875rem;
  font-stretch: 87.5%;
  text-align: center;
  color: var(--fg-2);
}

/* ——— Atmosphere: a halftone holo field that brightens while music plays ——— */
.atmos {
  position: fixed;
  inset: -18vmax;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(36vmax 28vmax at 16% 20%, rgba(200, 182, 255, .6), transparent 70%),
    radial-gradient(32vmax 26vmax at 86% 14%, rgba(159, 227, 255, .5), transparent 70%),
    radial-gradient(38vmax 28vmax at 78% 86%, rgba(255, 196, 236, .45), transparent 70%),
    radial-gradient(28vmax 24vmax at 22% 88%, rgba(184, 245, 216, .32), transparent 70%);
  -webkit-mask: radial-gradient(circle, #000 1.1px, transparent 1.8px) 0 0 / 5px 5px;
  mask: radial-gradient(circle, #000 1.1px, transparent 1.8px) 0 0 / 5px 5px;
  opacity: .26;
  transition: opacity 1.4s var(--ease-out);
}
body[data-state="pause"] .atmos { opacity: .42; }
body[data-state="play"] .atmos {
  opacity: .72;
  animation: atmos-drift 48s ease-in-out infinite alternate;
}
@keyframes atmos-drift {
  to { transform: translate3d(3vmax, -2vmax, 0) rotate(6deg); }
}

/* ——— Icons ——— */
.px {
  width: 24px;
  height: 24px;
  flex: none;
  fill: currentColor;
  shape-rendering: crispEdges;
  vertical-align: middle;
}
/* Drawn (non-bitmap) glyphs, see VEC in app.js: one stroke, round ends. */
.px.vec {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  shape-rendering: geometricPrecision;
}
.px.inline {
  width: 12px;
  height: 12px;
  margin: -2px .1em 0;
}
.star {
  width: 16px;
  height: 16px;
  flex: none;
  fill: currentColor;
}
.star.spin, .busy-star { animation: star-spin 1.1s var(--ease-out) infinite; }
@keyframes star-spin {
  0% { transform: rotate(0) scale(.7); }
  50% { transform: rotate(90deg) scale(1); }
  100% { transform: rotate(180deg) scale(.7); }
}

/* ——— Type ——— */
.chrome {
  color: var(--fg);
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: .5px rgba(255, 255, 255, .35);
  filter: drop-shadow(0 -1px 0 rgba(255, 255, 255, .25)) drop-shadow(0 2px 0 rgba(0, 0, 0, .85)) drop-shadow(0 12px 18px rgba(0, 0, 0, .6));
}
.brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.75rem;
  letter-spacing: -0.04em;
  line-height: 1;
}
.readout {
  margin: 0;
  font-family: var(--mono);
  font-size: .7rem;
  font-stretch: 87.5%;
  font-weight: 500;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
  color: var(--fg-3);
  text-transform: uppercase;
}
.page-title {
  margin: 0 0 .4rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 2.25rem;
  line-height: 1.1;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.sub {
  max-width: 68ch;
  margin: 0 0 1.5rem;
  color: var(--fg-2);
  overflow-wrap: anywhere;
}

/* ——— Shell: index rail + content ——— */
.shell {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  min-height: 100vh;
}
main {
  min-width: 0;
  padding: 1.75rem var(--gutter) calc(var(--bar-h) + 2rem + env(safe-area-inset-bottom));
}
.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.6rem 1rem 1.25rem;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(35, 31, 49, .72), rgba(22, 19, 32, .6));
}
/* The mini-player floats above the rail's bottom edge only once it is
   shown (before the first track, #mini stays [hidden]); shrink the rail
   by its height only then, instead of always leaving a dead gap. Scoped to
   the desktop rail (the ≤960px block below turns it into a fixed bottom
   bar with its own height: auto, which this must not outrank). */
@media (min-width: 961px) {
  body:has(#mini:not([hidden])) .rail {
    height: calc(100vh - var(--bar-h));
    height: calc(100dvh - var(--bar-h));
  }
}
.rail-brand {
  display: flex;
  align-items: flex-start;
  gap: .3rem;
  padding: 0 .6rem;
}
.rail-brand .brand { font-size: 1.3rem; }
.brand-star {
  width: 18px;
  height: 18px;
  margin-top: -.25rem;
  color: var(--gold);
  filter: drop-shadow(0 0 6px rgba(255, 241, 184, .7));
}
.rail-tag {
  margin: -.55rem 0 .6rem;
  padding: 0 .6rem;
  font-family: var(--mono);
  font-size: .6875rem;
  font-stretch: 87.5%;
  letter-spacing: .06em;
  color: var(--fg-3);
}
.tabs {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.tab {
  position: relative;
  display: grid;
  grid-template-columns: 1.6rem 24px 1fr;
  align-items: center;
  gap: .65rem;
  min-height: 46px;
  padding: .45rem .7rem;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--fg-2);
  font-weight: 600;
  font-size: .95rem;
  text-align: left;
  cursor: pointer;
  transition: background-color .18s, color .18s, border-color .18s;
}
.tab-num {
  font-family: var(--mono);
  font-size: .6875rem;
  font-stretch: 87.5%;
  color: var(--fg-3);
  letter-spacing: .04em;
}
.tab:hover { color: var(--fg); background: var(--ink-2); }
.tab.active {
  color: var(--on-foil);
  background: var(--sheen) 120% 0 / 250% 100% no-repeat, var(--foil);
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.tab.active .tab-num { color: rgba(21, 17, 31, .6); }
.tab.active::after {
  content: "";
  position: absolute;
  right: .8rem;
  width: 12px;
  height: 12px;
  background: var(--on-foil);
  -webkit-mask: var(--star-uri) center / contain no-repeat;
  mask: var(--star-uri) center / contain no-repeat;
}
.rail-sys {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .85rem .8rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(19, 16, 28, .5);
}
.globe {
  width: 52px;
  height: 52px;
  flex: none;
  fill: none;
  stroke: var(--fg-3);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.globe .mer {
  transform-box: fill-box;
  transform-origin: center;
  transform: scaleX(.35);
}
.globe .m2 { transform: scaleX(.75); }
.globe .m3 { transform: scaleX(-.15); }
body[data-state="play"] .globe { stroke: var(--lilac); }
body[data-state="play"] .globe .mer { animation: meridian 6s linear infinite; }
body[data-state="play"] .globe .m2 { animation-delay: -2s; }
body[data-state="play"] .globe .m3 { animation-delay: -4s; }
@keyframes meridian {
  0% { transform: scaleX(1); }
  50% { transform: scaleX(0); }
  100% { transform: scaleX(-1); }
}
.sys-list {
  margin: 0;
  display: grid;
  gap: .2rem;
  font-family: var(--mono);
  font-size: .6875rem;
  font-stretch: 87.5%;
  letter-spacing: .06em;
}
.sys-list div { display: flex; gap: .5rem; }
.sys-list dt { width: 3.6em; color: var(--fg-3); }
.sys-list dd { margin: 0; color: var(--fg-2); }
#sys-state { color: var(--fg-2); }
body[data-state="play"] #sys-state { color: var(--mint); }
body[data-state="pause"] #sys-state { color: var(--gold); }
.account-plate {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 46px;
  padding: .45rem .7rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: transparent;
  color: var(--fg-2);
  text-align: left;
  cursor: pointer;
  transition: background-color .18s, color .18s, border-color .18s;
}
.account-plate .px { width: 18px; height: 18px; flex: none; }
.account-plate:hover { color: var(--fg); background: var(--ink-2); }
.account-plate-text { display: flex; flex-direction: column; min-width: 0; gap: .05rem; }
.account-plate-text strong {
  overflow: hidden;
  color: var(--fg);
  font-weight: 600;
  font-size: .85rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.account-plate-role {
  font-family: var(--mono);
  font-size: .6875rem;
  font-stretch: 87.5%;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.account-plate.active {
  color: var(--on-foil);
  background: var(--sheen) 120% 0 / 250% 100% no-repeat, var(--foil);
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.account-plate.active .account-plate-text strong { color: var(--on-foil); }
.account-plate.active .account-plate-role { color: rgba(21, 17, 31, .6); }

/* ——— Mobile top bar: wordmark + account entry point, shown ≤960px ——— */
.topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.topbar-word { font-size: 1.1rem; }
.topbar-account {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--ink-2);
  color: var(--fg-2);
  cursor: pointer;
  transition: background-color .18s, color .18s, border-color .18s;
}
.topbar-account .px { width: 18px; height: 18px; }
.topbar-account:hover { color: var(--fg); background: var(--ink-3); }
.topbar-account.active { color: var(--on-foil); background: var(--foil); border-color: transparent; }

/* ——— Windows: dark glass with a chrome hairline and a title bar ——— */
.window {
  position: relative;
  border: 1px solid transparent;
  border-radius: var(--r-win);
  background:
    linear-gradient(180deg, rgba(44, 39, 60, .9), rgba(28, 25, 40, .93)) padding-box,
    var(--chrome-edge) border-box;
  box-shadow: 0 30px 60px -34px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.win-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2.3rem;
  padding: .5rem 1rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: .6875rem;
  font-stretch: 87.5%;
  font-weight: 500;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.win-bar > span:first-child {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--fg-2);
}
.win-dots { display: flex; gap: .3rem; flex: none; }
.win-dots i {
  width: 7px;
  height: 7px;
  border: 1px solid var(--fg-3);
  border-radius: 50%;
}
.win-dots i:nth-child(-n+2) { background: var(--fg-3); }

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 44px;
  padding: .55rem 1.15rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--ink-3);
  color: var(--fg);
  font-weight: 600;
  font-size: .92rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .18s, border-color .18s, color .18s, background-position .6s var(--ease-out), transform .12s;
}
.btn .px { width: 18px; height: 18px; margin-left: -.2rem; }
.btn:hover { background-color: var(--ink-4); border-color: rgba(236, 232, 244, .3); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  border-color: transparent;
  color: var(--on-foil);
  font-weight: 700;
  background: var(--sheen) 130% 0 / 250% 100% no-repeat, var(--foil);
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -1px 0 rgba(21, 17, 31, .15);
}
.btn.primary:hover { background-position: -30% 0, 0 0; }
.btn.primary:active {
  color: var(--lilac);
  background: var(--ink-0);
  box-shadow: inset 0 0 0 1px var(--lilac);
}
.btn.quiet {
  background: transparent;
  border-color: var(--line);
  color: var(--fg-2);
}
.btn.quiet:hover { color: var(--fg); background: var(--ink-2); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.loading { position: relative; pointer-events: none; }
.btn.loading::after {
  content: "";
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask: var(--star-uri) center / contain no-repeat;
  mask: var(--star-uri) center / contain no-repeat;
  animation: star-spin 1.1s var(--ease-out) infinite;
}
.text-link {
  border: 0;
  background: none;
  padding: .3rem 0;
  color: var(--ice);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: .25em;
  transition: text-decoration-color .18s, color .18s;
}
.text-link:hover { color: var(--fg); text-decoration-color: currentColor; }

/* ——— Views ——— */
.view { display: none; }
.view.active { display: block; animation: view-in .22s var(--ease-out) both; }
@keyframes view-in {
  from { opacity: .4; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ——— Disc: the signature object ——— */
.disc {
  --size: 280px;
  position: relative;
  display: block;
  width: var(--size);
  height: var(--size);
  flex: none;
  border-radius: 50%;
  isolation: isolate;
  transition: --light .9s var(--ease-out);
}
.disc > span { position: absolute; border-radius: 50%; }
.disc-foil {
  inset: 0;
  background:
    conic-gradient(from var(--light),
      #1d1a2a 0deg, #c8b6ff 20deg, #9fe3ff 36deg, #b8f5d8 50deg, #fff1b8 62deg, #ffc4ec 76deg, #3a3152 104deg,
      #1a1726 140deg, #221e31 180deg,
      #c8b6ff 200deg, #9fe3ff 216deg, #b8f5d8 230deg, #fff1b8 242deg, #ffc4ec 256deg, #3a3152 284deg,
      #1a1726 320deg, #1d1a2a 360deg);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .4),
    inset 0 0 0 5px rgba(10, 8, 16, .35),
    0 34px 60px -24px rgba(0, 0, 0, .95);
}
.disc-grooves {
  inset: 0;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, .28), transparent 38%, transparent 70%, rgba(255, 255, 255, .1)),
    repeating-radial-gradient(circle closest-side, transparent 0 3px, rgba(7, 6, 11, .1) 3px 4px);
}
.disc-spin {
  inset: 0;
  animation: disc-spin 9s linear infinite;
  animation-play-state: paused;
}
body[data-state="play"] .disc-spin { animation-play-state: running; }
@keyframes disc-spin { to { transform: rotate(360deg); } }
.disc-spin::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle closest-side, transparent 0 70%, rgba(10, 8, 16, .7) 70.5% 86%, transparent 86.5%);
}
.disc-text {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.disc-text text {
  font-family: var(--mono);
  font-size: 8.4px;
  font-weight: 500;
  letter-spacing: .04em;
  fill: rgba(236, 232, 244, .88);
}
.disc-label {
  position: absolute;
  inset: 22%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, #231f33, #0f0d16) center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28), 0 0 0 3px rgba(10, 8, 16, .5);
}
.disc[data-disc="art"] .disc-label { background-size: 72%; background-color: #0f0d16; background-position: center; }
.disc-star {
  width: 44%;
  height: 44%;
  color: var(--lilac);
  filter: drop-shadow(0 0 10px rgba(200, 182, 255, .8));
}
.disc[data-disc="art"] .disc-star { display: none; }
.disc-hub {
  inset: 47.5%;
  background: var(--ink-0);
  box-shadow: 0 0 0 4px rgba(236, 232, 244, .14), 0 0 0 5px rgba(0, 0, 0, .5), inset 0 1px 3px rgba(0, 0, 0, .9);
}
.disc--mini {
  --size: 44px;
}
.disc--mini .disc-text, .disc--mini .disc-grooves, .disc--mini .disc-spin::before { display: none; }
.disc--mini .disc-label { inset: 14%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.disc--mini .disc-hub { inset: 42%; box-shadow: 0 0 0 2px rgba(236, 232, 244, .18); }
.disc--mini .disc-foil { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4); }

/* ——— Home ——— */
.home-hero { margin-bottom: 2.5rem; overflow: hidden; }
.home-hero-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2rem;
  padding: 2rem 2.25rem 2.25rem;
}
.home-copy { min-width: 0; }
.home-copy h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 3rem;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.home-copy > p:not(.readout) {
  max-width: 46ch;
  margin: .9rem 0 .7rem;
  color: var(--fg-2);
  font-size: 1rem;
}
.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1.5rem;
}
.hero-play { padding-inline: 1.4rem; }
.disc-slot {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  margin: -.5rem .5rem -.5rem 0;
}
.disc--hero { --size: clamp(190px, 20vw, 270px); }
.disc-slot:hover .disc-foil { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6), inset 0 0 0 5px rgba(10, 8, 16, .35), 0 40px 64px -24px rgba(0, 0, 0, 1); }

.shelf { margin: 0 0 2.25rem; }
.shelf-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .35rem;
}
.shelf-head h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.shelf-hint {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-family: var(--mono);
  font-size: .6875rem;
  font-stretch: 87.5%;
  letter-spacing: .04em;
  color: var(--fg-3);
  text-align: right;
}
.shelf-hint .px { width: 12px; height: 12px; }
.shelf-rail {
  position: relative;
  display: flex;
  align-items: center;
  gap: .25rem;
  margin-inline: -.6rem;
}
.shelf-nav {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--ink-2);
  color: var(--fg-2);
  cursor: pointer;
  transition: opacity .18s, color .18s, background-color .18s;
}
.shelf-nav .px { width: 12px; height: 12px; }
.shelf-nav:hover:not(:disabled) { color: var(--on-foil); background: var(--foil); border-color: transparent; }
.shelf-nav:disabled { opacity: .2; cursor: default; }
.shelf-row {
  display: flex;
  flex-wrap: nowrap;
  gap: .35rem;
  flex: 1 1 auto;
  min-width: 0;
  padding: .5rem 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.shelf-row::-webkit-scrollbar { display: none; }
.shelf-row > * { flex: 0 0 176px; width: 176px; }

/* Cards: cover first, text under it — readable, no text over art. */
.mix-card {
  position: relative;
  border-radius: 16px;
  transition: background-color .18s;
}
.mix-card:hover { background: rgba(50, 44, 67, .65); }
.card-main {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .15rem;
  width: 100%;
  padding: .6rem .6rem .75rem;
  border: 0;
  border-radius: inherit;
  background: none;
  text-align: left;
  cursor: pointer;
}
/* Track cards: card-main is a plain div (its caption holds an artist-name
   button), so card-hit is the real stretched click/keyboard target — same
   paint-order and bubbling mechanism as .row-play above (see its comment).
   Named apart from the unrelated, visible .card-play (album-shelf badge). */
.card-hit {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: .55rem;
  border-radius: var(--r-cover);
  background: var(--ink-2) center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 14px 28px -18px rgba(0, 0, 0, .9);
  overflow: hidden;
}
.cover.round { border-radius: 50%; }
.cover.blank {
  display: grid;
  place-items: center;
  background:
    conic-gradient(from var(--a, 0deg) at 100% 0%, transparent 0 180deg, rgba(200, 182, 255, .5) 200deg, rgba(159, 227, 255, .45) 215deg, rgba(255, 196, 236, .4) 235deg, transparent 260deg),
    linear-gradient(160deg, var(--ink-3), var(--ink-1));
}
.cover.blank > span {
  font-family: var(--display);
  font-weight: 700;
  font-size: 2.3rem;
  color: var(--fg-3);
}
.cover.blank .star { width: 34%; height: 34%; color: var(--fg-3); }
.cover.empty {
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  background: rgba(28, 25, 40, .6);
  box-shadow: none;
  color: var(--fg-3);
}
.cover.empty .px { width: 36px; height: 36px; }
.card-main .cover::after {
  content: "";
  position: absolute;
  right: .55rem;
  bottom: .55rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath fill='%2315111f' d='M3 1h1v10H3zM4 2h1v8H4zM5 3h1v6H5zM6 4h1v4H6zM7 5h1v2H7z'/%3E%3C/svg%3E") center / 14px no-repeat,
    var(--foil);
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, .8);
  opacity: 0;
  transform: translateY(6px) scale(.9);
  transition: opacity .2s var(--ease-out), transform .25s var(--ease-out);
  pointer-events: none;
}
.card-main .cover.round::after { right: 50%; margin-right: -1.2rem; }
.card-main:hover .cover::after, .card-main:focus-visible .cover::after,
.card-hit:focus-visible ~ .cover::after { opacity: 1; transform: none; }
.mix-card.dim .card-main .cover::after, .empty-card .cover::after { display: none; }
.mix-card strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.mix-card .card-main > span:not(.mix-meta) {
  overflow: hidden;
  color: var(--fg-2);
  font-size: .82rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.mix-card.empty-card { padding: .6rem; }
.mix-card.empty-card > span { color: var(--fg-3); font-size: .8rem; }
.mix-card.empty-card:hover { background: none; }
.mix-meta {
  margin-top: .15rem;
  font-family: var(--mono);
  font-size: .6875rem;
  font-stretch: 87.5%;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  color: var(--fg-3);
}
.mix-card.dim .cover { filter: grayscale(.8) brightness(.6); }
.mix-card.dim strong { color: var(--fg-3); }
.artist-card .card-main { align-items: center; text-align: center; }
.card-heart {
  position: absolute;
  z-index: 2;
  top: 1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
  background: rgba(7, 6, 11, .66);
  color: var(--fg-2);
  cursor: pointer;
  opacity: 0;
  transition: opacity .18s, color .18s, background-color .18s;
}
.card-heart .px { width: 12px; height: 12px; }
.mix-card:hover .card-heart, .card-heart:focus-visible, .card-heart.on { opacity: 1; }
.card-heart.on { color: var(--rose); }
.card-heart:hover { color: var(--on-foil); background: var(--rose); border-color: transparent; }

/* ——— Now playing ——— */
.now-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
  gap: 1.25rem;
  align-items: start;
}
.now-stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
  padding: 2rem;
}
.now-art { position: relative; }
.disc--now { --size: clamp(220px, 22vw, 330px); }
.now-meta { min-width: 0; }
#title {
  margin: 0 0 .3rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.7rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
#artist {
  margin: 0 0 .6rem;
  color: var(--fg-2);
  font-size: 1rem;
  overflow-wrap: anywhere;
}
.progress-wrap { position: relative; margin: 2rem 0 1.2rem; }
#seek {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 22px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  touch-action: none;
}
#seek::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 99px;
  background:
    linear-gradient(to right, transparent var(--seek-at, 0px), var(--ink-4) var(--seek-at, 0px)),
    var(--foil);
}
#seek::-moz-range-track {
  height: 6px;
  border-radius: 99px;
  background:
    linear-gradient(to right, transparent var(--seek-at, 0px), var(--ink-4) var(--seek-at, 0px)),
    var(--foil);
}
#seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -8px;
  border: 0;
  background: var(--star-uri) center / contain no-repeat;
  filter: drop-shadow(0 0 6px rgba(200, 182, 255, .9));
  cursor: grab;
}
#seek::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 0;
  background: var(--star-uri) center / contain no-repeat;
  filter: drop-shadow(0 0 6px rgba(200, 182, 255, .9));
  cursor: grab;
}
#seek:focus-visible { outline-offset: 4px; border-radius: 6px; }
/* Time plate over a seek slider (wireSeekTip in app.js). Positioned by JS
   inside the slider's parent; the transform lifts it above the thumb. */
.seek-tip {
  --tip-dy: 4px;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 5;
  padding: .25rem .5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background:
    linear-gradient(180deg, var(--ink-3), var(--ink-2)) padding-box,
    var(--chrome-edge) border-box;
  box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .05);
  color: var(--fg);
  font-family: var(--mono);
  font-size: .6875rem;
  font-weight: 500;
  font-stretch: 87.5%;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, calc(-100% - 6px + var(--tip-dy)));
  transition: opacity .12s var(--ease-out), transform .12s var(--ease-out);
  pointer-events: none;
}
.seek-tip.is-on { --tip-dy: 0px; opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .seek-tip { --tip-dy: 0px; }
}
.transport {
  display: flex;
  align-items: center;
  gap: .6rem;
}
/* Repeat is out of scope for this pass, but the phone transport is
   space-between: without a same-size placeholder in repeat's spot, play
   sits ~40px right of center. Invisible, unfocusable, matches
   .mini-repeat-slot. */
.transport-repeat-slot {
  width: 48px;
  height: 48px;
  flex: none;
  visibility: hidden;
  pointer-events: none;
}
.now-actions {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-top: .6rem;
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: linear-gradient(180deg, var(--ink-3), var(--ink-2));
  color: var(--fg);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  transition: background-color .18s, color .18s, border-color .18s, transform .12s;
}
.icon-btn .px { width: 18px; height: 18px; }
.icon-btn:hover { border-color: rgba(236, 232, 244, .32); background: var(--ink-4); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.play-btn {
  width: 64px;
  height: 64px;
  border: 0;
  color: var(--on-foil);
  background: var(--sheen) 130% 0 / 250% 100% no-repeat, var(--foil);
  box-shadow: 0 14px 26px -10px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .8);
  transition: background-position .6s var(--ease-out), transform .12s;
}
.icon-btn.play-btn .px { width: 24px; height: 24px; }
.icon-btn.play-btn:hover { background-position: -30% 0, 0 0; }
.icon-btn.play-btn:active { color: var(--lilac); background: var(--ink-0); box-shadow: inset 0 0 0 1px var(--lilac); }
.icon-btn.active-rate { color: var(--rose); border-color: rgba(255, 196, 236, .5); }
.icon-btn.active-dislike { color: var(--danger); border-color: rgba(255, 155, 176, .5); }
.icon-btn[aria-disabled="true"] { opacity: .35; cursor: default; }
#btn-shuffle[aria-pressed="true"],
#btn-shuffle.active,
#mini-shuffle[aria-pressed="true"],
#mini-shuffle.active {
  color: var(--mint);
  border-color: rgba(184, 245, 216, .5);
}
#btn-shuffle[aria-pressed="true"]:hover,
#btn-shuffle.active:hover,
#mini-shuffle[aria-pressed="true"]:hover,
#mini-shuffle.active:hover {
  border-color: var(--mint);
  background: var(--ink-4);
}
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn.sm { width: 40px; height: 40px; }
.icon-btn.sm .px { width: 12px; height: 12px; }
.volume {
  display: flex;
  align-items: center;
  gap: .7rem;
  max-width: 320px;
  margin-top: 1rem;
}
.volume .readout { min-width: 7ch; margin: 0; }
#btn-mute[aria-pressed="true"] { color: var(--rose); border-color: rgba(255, 196, 236, .5); }
#volume {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  min-width: 0;
  height: 18px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  touch-action: none;
}
#volume::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 99px;
  background:
    linear-gradient(to right, transparent var(--vol-at, 80%), var(--ink-4) var(--vol-at, 80%)),
    var(--foil);
}
#volume::-moz-range-track {
  height: 4px;
  border-radius: 99px;
  background:
    linear-gradient(to right, transparent var(--vol-at, 80%), var(--ink-4) var(--vol-at, 80%)),
    var(--foil);
}
#volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border: 0;
  background: var(--star-uri) center / contain no-repeat;
  filter: drop-shadow(0 0 4px rgba(200, 182, 255, .8));
  cursor: grab;
}
#volume::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 0;
  background: var(--star-uri) center / contain no-repeat;
  filter: drop-shadow(0 0 4px rgba(200, 182, 255, .8));
  cursor: grab;
}
#volume:focus-visible { outline-offset: 4px; border-radius: 6px; }
.fav-extra {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: 1.1rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 34px;
  padding: .3rem .8rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--fg-2);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: color .18s, background-color .18s, border-color .18s;
}
.chip .px { width: 12px; height: 12px; }
.chip:hover { color: var(--fg); background: var(--ink-3); }
.chip.on { color: var(--on-foil); background: var(--rose); border-color: transparent; }
.hint-keys {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1rem;
  margin: 1.3rem 0 0;
  font-size: .75rem;
  color: var(--fg-3);
}
.hint-keys > span { white-space: nowrap; }
.hint-toggle { color: var(--fg-3); }
.hint-toggle kbd { font-family: var(--mono); font-size: .75rem; color: var(--fg-2); }
.hint-toggle[aria-expanded="true"] { color: var(--fg); background: var(--ink-3); }
.now-side { display: grid; gap: 1.25rem; min-width: 0; }
.queue-panel { overflow: hidden; }
.playlist {
  position: relative;
  list-style: none;
  margin: 0;
  padding: .4rem;
  max-height: min(56vh, 460px);
  overflow: auto;
  overscroll-behavior: contain;
}
.playlist li { margin: 0; }
.playlist-item {
  position: relative;
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr) auto;
  gap: .6rem;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: .55rem .6rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background-color .15s;
}
.playlist-item:hover { background: var(--ink-3); }
/* Stretched jump button, same mechanism as .row-play: under the text and the
   artist links (positioned below), which keep the pointer. */
.playlist-hit {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: none;
  cursor: pointer;
}
.playlist-hit:focus-visible { outline: 2px solid var(--lilac); outline-offset: -2px; }
.playlist-item .ytm-link { position: relative; }
.playlist-item .pos {
  display: grid;
  place-items: center start;
  font-family: var(--mono);
  font-size: .6875rem;
  font-stretch: 87.5%;
  color: var(--fg-3);
  font-variant-numeric: tabular-nums;
}
.playlist-item .pos > * { grid-area: 1 / 1; }
.pos-star { width: 14px; height: 14px; margin-left: .3rem; color: var(--lilac); opacity: 0; }
.playlist-item.current { background: var(--ink-3); box-shadow: inset 0 0 0 1px rgba(200, 182, 255, .28); }
.playlist-item.current .pos-num { opacity: 0; }
.playlist-item.current .pos-star { opacity: 1; filter: drop-shadow(0 0 6px rgba(200, 182, 255, .8)); }
body[data-state="play"] .playlist-item.current .pos-star { animation: disc-spin 4s linear infinite; }
.playlist-item strong {
  display: block;
  overflow: hidden;
  font-weight: 600;
  font-size: .9rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.playlist-item .meta {
  display: block;
  overflow: hidden;
  margin-top: .05rem;
  color: var(--fg-2);
  font-size: .78rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.playlist-item .pt { min-width: 0; }
.playlist-item .dur, .track-row .dur, .search-row .dur {
  font-family: var(--mono);
  font-size: .6875rem;
  font-stretch: 87.5%;
  font-variant-numeric: tabular-nums;
  color: var(--fg-3);
}
.playlist:empty::before {
  content: "Очередь пуста — включи что-нибудь на главной";
  display: block;
  padding: 1.2rem .6rem;
  color: var(--fg-3);
  font-size: .85rem;
}
.lyrics-box > summary {
  list-style: none;
  cursor: pointer;
  border-bottom-color: transparent;
}
.lyrics-box > summary::-webkit-details-marker { display: none; }
.lyrics-box[open] > summary { border-bottom-color: var(--line); }
.lyrics-toggle {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--ui);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ice);
}
.lyrics-toggle::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s var(--ease-out);
}
.lyrics-box[open] .lyrics-toggle::after { transform: translateY(2px) rotate(-135deg); }
.lyrics-text {
  margin: 0;
  padding: 1rem 1.1rem 1.2rem;
  max-height: 22rem;
  overflow: auto;
  white-space: pre-wrap;
  font-family: var(--ui);
  font-size: .92rem;
  line-height: 1.65;
  color: var(--fg-2);
}

/* ——— Library ——— */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.page-head-actions {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}
#lib-count { max-width: none; margin: .1rem 0 1.25rem; line-height: 1.8; }
#lib-count > span { white-space: nowrap; }
.seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin: 0 0 1rem;
  padding: .3rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(28, 25, 40, .7);
}
.seg-btn {
  min-height: 38px;
  padding: .4rem 1rem;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--fg-2);
  font-weight: 600;
  font-size: .88rem;
  cursor: pointer;
  transition: background-color .18s, color .18s;
}
.seg-btn:hover { color: var(--fg); background: var(--ink-3); }
.seg-btn.active {
  color: var(--on-foil);
  background: var(--foil);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}
.field {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.field > .px {
  position: absolute;
  left: .95rem;
  width: 12px;
  height: 12px;
  color: var(--fg-3);
  pointer-events: none;
}
.field > .text-input { padding-left: 2.4rem; }
.text-input {
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: .7rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(19, 16, 28, .62);
  color: var(--fg);
  font: inherit;
  font-size: .95rem;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.text-input::placeholder { color: var(--fg-3); opacity: 1; }
.text-input:hover { border-color: rgba(236, 232, 244, .26); }
.text-input:focus, .text-input:focus-visible {
  border-color: var(--lilac);
  box-shadow: 0 0 0 3px rgba(200, 182, 255, .18);
  outline: none;
}
#view-library > .field { margin-bottom: 1rem; max-width: 520px; }
.file-input { padding: .55rem .6rem; cursor: pointer; }
.file-input::file-selector-button {
  margin-right: .8rem;
  padding: .45rem .9rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--ink-3);
  color: var(--fg);
  font: inherit;
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
}
.file-input::file-selector-button:hover { background: var(--ink-4); }

.track-list, .search-list, .review-list { list-style: none; margin: 0; padding: 0; }
.track-row, .search-row {
  display: grid;
  align-items: center;
  gap: .9rem;
  padding: .45rem .5rem;
  border-radius: 12px;
  transition: background-color .15s;
}
/* Areas, not source order, place the parts: "Ещё" (.tiny.more) sits outside
   .row-actions so it stays put when the actions unfold into a second line. */
.track-row {
  grid-template-columns: minmax(0, 1fr) auto auto 3.2rem;
  grid-template-areas: "main actions more dur";
}
.track-row .row-main { grid-area: main; }
.track-row .row-actions { grid-area: actions; justify-self: end; }
.track-row .tiny.more { grid-area: more; }
.track-row .dur { grid-area: dur; text-align: right; padding-right: .3rem; }
.track-row.open {
  grid-template-columns: minmax(0, 1fr) auto 3.2rem;
  grid-template-areas: "main more dur" "panel panel panel";
  row-gap: .15rem;
}
.track-row.open .row-actions {
  grid-area: panel;
  justify-self: stretch;
  flex-wrap: wrap;
  padding: 0 0 .3rem calc(44px + .85rem);
}
/* Secondary actions stay folded until the row is opened. */
.track-row .row-actions > [data-tier="more"] { display: none; }
.track-row.open .row-actions > [data-tier="more"] { display: inline-flex; }
.track-row, .search-row { position: relative; }
.track-row + .track-row::before, .search-row + .search-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: calc(44px + 1.35rem);
  right: .5rem;
  height: 1px;
  background: var(--line);
}
.track-row:hover, .search-row:hover { background: rgba(50, 44, 67, .6); }
.track-row:hover::before, .track-row:hover + .track-row::before,
.search-row:hover::before, .search-row:hover + .search-row::before { opacity: 0; }
.track-list, .search-list { max-width: 1120px; }
.row-main {
  position: relative;
  display: flex;
  align-items: center;
  gap: .85rem;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}
/* Stretched play button: the row's real click/keyboard target, sized to
   row-main via inset:0 (out of flex flow, so nothing shifts). It paints
   under the cover (positioned, later in DOM) and under the artist links
   (made positioned below, also later in DOM), so both sit above it and
   get the pointer. A click on the cover has no handler of its own and
   bubbles up to row-main's; a click on an artist link stops that bubble
   and opens the artist card instead of playing. */
.row-play {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
/* Lift the artist-name link above the stretched play button (both are
   positioned; DOM order alone would put row-play/card-hit's non-linked
   siblings on top, but .ytm-link itself has no position and would stay
   in the earlier, non-positioned paint step — under the button). */
.row-main .ytm-link, .card-main .ytm-link { position: relative; }
/* Search rows: the stretched .row-play covers the row; actions and artist
   links are lifted above it. */
.search-row .row-actions, .search-row .ytm-link { position: relative; }
.search-row .row-play { border-radius: inherit; }
.search-row .row-play:focus-visible { outline: 2px solid var(--lilac); outline-offset: -2px; }
.track-row .cover, .search-row .cover {
  flex: none;
  width: 44px;
  height: 44px;
  margin: 0;
  border-radius: 8px;
}
.track-row .cover.blank > span, .search-row .cover.blank > span { font-size: 1rem; }
.row-text, .search-text { display: flex; flex-direction: column; min-width: 0; }
.row-text strong, .search-text strong {
  overflow: hidden;
  font-weight: 600;
  font-size: .94rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.row-text > span, .search-text > span {
  overflow: hidden;
  color: var(--fg-2);
  font-size: .82rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.row-main:hover strong { color: #fff; }
.ytm-link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
  vertical-align: baseline;
}
.ytm-link:hover,
.ytm-link:focus-visible {
  color: var(--ice);
  text-decoration-color: var(--ice);
}
.ytm-link:focus-visible {
  outline: 2px solid var(--lilac);
  outline-offset: 2px;
  border-radius: 2px;
}
.tag {
  display: inline-block;
  margin-right: .45rem;
  padding: 0 .35rem;
  border: 1px solid rgba(255, 155, 176, .5);
  border-radius: 5px;
  font-family: var(--mono);
  font-style: normal;
  font-size: .6875rem;
  font-stretch: 87.5%;
  letter-spacing: .06em;
  color: var(--danger);
  vertical-align: 1px;
}
/* "новое" / "новый артист" (wave's first-track-of-a-new-artist marker):
   every pastel hue already carries its own meaning (rose = ♥, mint =
   playing, gold = paused…), so this tag stays neutral ink/fog. */
.tag.neutral {
  border-color: var(--line-strong);
  color: var(--fg-2);
}
/* The login of a friend's wave in the queue's title bar: data, so it keeps
   the case it was typed in and drops the bar's mono uppercase. */
#mode-label.has-friend { display: flex; align-items: center; gap: .55rem; }
.tag.mode-who {
  min-width: 0;
  margin: 0;
  padding: .05rem .45rem;
  overflow: hidden;
  font-family: var(--ui);
  font-size: .75rem;
  font-stretch: 100%;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: baseline;
}
.track-row.unplayable .cover {
  filter: grayscale(1) brightness(.55);
}
.track-row.unplayable .cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-conic-gradient(rgba(7, 6, 11, .75) 0 25%, transparent 0 50%) 0 0 / 4px 4px;
}
.track-row.unplayable .row-text strong { color: var(--fg-2); }
.row-actions {
  display: flex;
  align-items: center;
  gap: .3rem;
}
.tiny {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-height: 34px;
  padding: .25rem .7rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--fg-2);
  font-size: .76rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color .15s, background-color .15s, border-color .15s;
}
.tiny .px { width: 12px; height: 12px; }
.tiny.icon { width: 34px; padding: 0; }
.tiny:disabled { opacity: .4; cursor: default; }
/* "Убрать" swaps its label for "Точно убрать?": reserve that width so the
   row never reflows or changes height between the two states. */
.track-row .tiny.danger { min-width: 6.9rem; }
.track-row.open .tiny.more { color: var(--on-foil); background: var(--lilac); border-color: transparent; }
.tiny:hover:not(:disabled) { color: var(--fg); background: var(--ink-3); border-color: rgba(236, 232, 244, .3); }
.tiny.on { color: var(--rose); border-color: rgba(255, 196, 236, .45); }
.tiny.danger:hover { color: var(--danger); border-color: rgba(255, 155, 176, .5); }
.tiny.add-btn:not(.added) { color: var(--on-foil); background: var(--foil); border-color: transparent; }
.tiny.add-btn:not(.added):hover { background: var(--foil); filter: brightness(1.08); }
.tiny.added { color: var(--mint); border-color: rgba(184, 245, 216, .35); cursor: default; }
.tiny:disabled .star { width: 12px; height: 12px; }
.tiny.loading:disabled { opacity: .75; }
.tiny.loading::after {
  content: "";
  width: 12px;
  height: 12px;
  background: currentColor;
  -webkit-mask: var(--star-uri) center / contain no-repeat;
  mask: var(--star-uri) center / contain no-repeat;
  animation: star-spin 1.1s var(--ease-out) infinite;
}
/* Where hover exists the actions appear on hover or focus inside the row;
   a pending "Точно убрать?" or an opened row keeps them on. */
@media (hover: hover) {
  .track-row .row-actions, .track-row .tiny.more { opacity: 0; transition: opacity .15s; }
  .track-row:hover .row-actions, .track-row:focus-within .row-actions,
  .track-row.open .row-actions, .track-row:has(.confirm) .row-actions,
  .track-row:hover .tiny.more, .track-row:focus-within .tiny.more,
  .track-row.open .tiny.more, .track-row:has(.confirm) .tiny.more { opacity: 1; }
}
/* Honest cap note under a truncated list: quiet, not interactive. */
.list-limit {
  padding: 1rem .5rem 0;
  font-family: var(--mono);
  font-size: .6875rem;
  font-stretch: 87.5%;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  color: var(--fg-3);
  text-align: center;
}
.empty-row {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin: 0;
  padding: 1.4rem 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--fg-2);
}
.empty-row > .px { width: 24px; height: 24px; color: var(--fg-3); }
.lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .35rem;
  margin: 0 -.6rem;
}
.lib-grid > .empty-row { grid-column: 1 / -1; margin: 0 .6rem; }
.lib-tile {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-width: 0;
  padding: .6rem .6rem .75rem;
  border: 0;
  border-radius: 16px;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background-color .18s;
}
.lib-tile:hover { background: rgba(50, 44, 67, .65); }
.lib-tile strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.lib-tile > span:not(.mix-meta) {
  overflow: hidden;
  color: var(--fg-2);
  font-size: .82rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.lib-tile.dim .cover { filter: grayscale(.8) brightness(.6); }
.lib-grid .lib-tile:has(.cover.round) { align-items: center; text-align: center; }
.lib-tile--create {
  border: 1px dashed var(--line-strong);
  background: rgba(38, 34, 52, .4);
}
.lib-tile--create:hover {
  border-color: var(--lilac);
  background: var(--ink-2);
}
.lib-tile--create .cover.empty {
  border: 1px dashed var(--line-strong);
  color: var(--lilac);
}

/* ——— Search & import ——— */
.add-card { margin: 0 0 1.25rem; }
.add-body {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  padding: 1.2rem 1.25rem 1.3rem;
}
.add-row { display: flex; gap: .6rem; }
.add-row > .btn { flex: none; }
.add-hint { color: var(--fg-2); font-size: .85rem; }
.add-card strong {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
#view-add .add-card { max-width: 820px; }
.search-status {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 0 0 1rem;
  font-family: var(--mono);
  font-size: .72rem;
  font-stretch: 87.5%;
  letter-spacing: .05em;
  color: var(--fg-2);
}
.search-status.busy::before {
  content: "";
  width: 14px;
  height: 14px;
  background: var(--lilac);
  -webkit-mask: var(--star-uri) center / contain no-repeat;
  mask: var(--star-uri) center / contain no-repeat;
  animation: star-spin 1.1s var(--ease-out) infinite;
}
.search-row { grid-template-columns: 44px minmax(0, 1fr) 3.2rem auto; }
.import-ways {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.import-ways .add-card { margin-bottom: 0; }
#view-import > .import-ways { margin-bottom: 1.25rem; }
.import-progress { margin: 0 0 1.25rem; }
.import-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .5rem;
}
.import-stat {
  display: flex;
  flex-direction: column;
  padding: .6rem .8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(19, 16, 28, .5);
}
.import-stat strong {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 1.5rem;
  font-stretch: 87.5%;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.import-stat span { color: var(--fg-3); font-size: .78rem; }
.progress-line {
  height: 6px;
  border-radius: 999px;
  background: var(--ink-4);
  overflow: hidden;
}
.progress-line span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--foil);
  transition: width .5s var(--ease-out);
}
.review-title {
  margin: 2rem 0 .8rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.review-item {
  margin-bottom: .8rem;
  padding: 1rem 1.1rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(28, 25, 40, .85);
}
.review-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .8rem;
  margin-bottom: .5rem;
}
.review-status {
  flex: none;
  padding: .15rem .5rem;
  border: 1px solid rgba(255, 241, 184, .4);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: .6875rem;
  font-stretch: 87.5%;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
}
.review-search { margin-top: .8rem; }
.review-item .search-row .dur { display: none; }
.review-item .search-row { grid-template-columns: 44px minmax(0, 1fr) auto; }

/* ——— Mini player / Desktop Player Bar ——— */
.mini-player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: calc(var(--bar-h) + env(safe-area-inset-bottom));
  padding: 0 1.5rem env(safe-area-inset-bottom);
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, clamp(360px, 40vw, 720px)) minmax(0, 1fr);
  align-items: center;
  border: 0;
  border-top: 1px solid transparent;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(48, 42, 64, .94), rgba(28, 25, 40, .97)) padding-box,
    var(--chrome-edge) border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  animation: mini-in .3s var(--ease-out) both;
}
@keyframes mini-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.mini-progress { display: none; }

/* Left zone: mini disc, title + artists, heart */
.mini-left {
  display: flex;
  align-items: center;
  gap: .85rem;
  min-width: 0;
  max-width: 100%;
  justify-self: start;
}
.mini-player .disc--mini {
  --size: 52px;
}
.mini-disc-btn {
  padding: 0;
  border: 0;
  background: none;
  border-radius: 50%;
  cursor: pointer;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mini-disc-btn:focus-visible,
.mini-title-btn:focus-visible {
  outline: 2px solid var(--lilac);
  outline-offset: 2px;
  border-radius: 6px;
}
.mini-title-btn {
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  color: inherit;
  display: block;
  max-width: 100%;
}
.mini-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 0 1 auto;
  gap: .15rem;
}
#mini-title {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: .9rem;
  font-weight: 600;
  color: var(--fg);
}
.mini-artist {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: .78rem;
  color: var(--fg-2);
  line-height: 1.3;
}
#mini-like {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--fg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
  transition: background-color .18s, color .18s, border-color .18s, transform .12s;
}
#mini-like:hover {
  color: var(--fg);
  background: var(--ink-2);
}
#mini-like:active {
  transform: scale(.94);
}
#mini-like.active-rate {
  color: var(--rose);
}
#mini-dislike {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--fg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
  transition: background-color .18s, color .18s, border-color .18s, transform .12s;
}
#mini-dislike:hover {
  color: var(--fg);
  background: var(--ink-2);
}
#mini-dislike:active {
  transform: scale(.94);
}
#mini-dislike.active-dislike {
  color: var(--danger);
}

/* Center zone: controls row + seek bar */
.mini-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .25rem;
  width: 100%;
  max-width: 720px;
}
.mini-transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}
.mini-transport .icon-btn.sm {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--fg-2);
  box-shadow: none;
}
.mini-transport .icon-btn.sm:hover {
  color: var(--fg);
  background: var(--ink-2);
  border-color: transparent;
}
.mini-transport .icon-btn.sm:active {
  transform: scale(.94);
}
#mini-play {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
  border: 0;
  color: var(--on-foil);
  background: var(--sheen) 130% 0 / 250% 100% no-repeat, var(--foil);
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -1px 0 rgba(21, 17, 31, .15);
  transition: background-position .6s var(--ease-out), transform .12s;
}
#mini-play:hover {
  background-position: -30% 0, 0 0;
}
#mini-play:active {
  color: var(--lilac);
  background: var(--ink-0);
  box-shadow: inset 0 0 0 1px var(--lilac);
}
#mini-play .px {
  width: 16px;
  height: 16px;
}
#mini-play .px.vec {
  width: 20px;
  height: 20px;
}
.mini-repeat-slot {
  width: 34px;
  height: 34px;
  flex: none;
  visibility: hidden;
  pointer-events: none;
}
.mini-progress-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
}
.mini-time {
  font-family: var(--mono);
  font-size: .6875rem;
  font-stretch: 87.5%;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
  color: var(--fg-3);
  width: 40px;
  flex: none;
}
#mini-time-cur { text-align: right; }
#mini-time-dur { text-align: left; }
#mini-seek {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  flex: 1;
  min-width: 0;
  height: 18px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  touch-action: none;
}
#mini-seek::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 99px;
  background:
    linear-gradient(to right, transparent var(--seek-at, 0px), var(--ink-4) var(--seek-at, 0px)),
    var(--foil);
}
#mini-seek::-moz-range-track {
  height: 4px;
  border-radius: 99px;
  background:
    linear-gradient(to right, transparent var(--seek-at, 0px), var(--ink-4) var(--seek-at, 0px)),
    var(--foil);
}
#mini-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border: 0;
  background: var(--star-uri) center / contain no-repeat;
  filter: drop-shadow(0 0 5px rgba(200, 182, 255, .9));
  cursor: grab;
  opacity: 0;
  transition: opacity .15s ease-out;
}
#mini-seek::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 0;
  background: var(--star-uri) center / contain no-repeat;
  filter: drop-shadow(0 0 5px rgba(200, 182, 255, .9));
  cursor: grab;
  opacity: 0;
  transition: opacity .15s ease-out;
}
.mini-progress-row:hover #mini-seek::-webkit-slider-thumb,
#mini-seek:focus-visible::-webkit-slider-thumb,
body.seeking #mini-seek::-webkit-slider-thumb {
  opacity: 1;
}
.mini-progress-row:hover #mini-seek::-moz-range-thumb,
#mini-seek:focus-visible::-moz-range-thumb,
body.seeking #mini-seek::-moz-range-thumb {
  opacity: 1;
}
#mini-volume:hover::-webkit-slider-thumb,
#mini-volume:focus-visible::-webkit-slider-thumb,
body.vol-adjusting #mini-volume::-webkit-slider-thumb {
  opacity: 1;
}
#mini-volume:hover::-moz-range-thumb,
#mini-volume:focus-visible::-moz-range-thumb,
body.vol-adjusting #mini-volume::-moz-range-thumb {
  opacity: 1;
}
@media (hover: none) {
  #mini-seek::-webkit-slider-thumb,
  #mini-volume::-webkit-slider-thumb {
    opacity: 1;
  }
  #mini-seek::-moz-range-thumb,
  #mini-volume::-moz-range-thumb {
    opacity: 1;
  }
}
#mini-seek:focus-visible {
  outline-offset: 4px;
  border-radius: 6px;
}
#mini-seek:disabled {
  opacity: .4;
  cursor: default;
}

/* Right zone: queue, lyrics, mute, volume */
.mini-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
  min-width: 0;
  justify-self: end;
}
.mini-right .icon-btn.sm {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--fg-2);
  box-shadow: none;
  position: relative;
}
.mini-right .icon-btn.sm:hover {
  color: var(--fg);
  background: var(--ink-2);
  border-color: transparent;
}
.mini-right .icon-btn.sm:active {
  transform: scale(.94);
}
/* The panel's secondary icons (queue, lyrics, mute, shuffle, prev, skip,
   like, dislike) sit in 34px buttons; at the base 12px they all but
   disappear against --fg-2, so the panel gets its own, larger size. */
.mini-left .icon-btn.sm .px,
.mini-transport .icon-btn.sm .px,
.mini-right .icon-btn.sm .px {
  width: 16px;
  height: 16px;
}
.mini-left .icon-btn.sm .px.vec,
.mini-transport .icon-btn.sm .px.vec,
.mini-right .icon-btn.sm .px.vec {
  width: 20px;
  height: 20px;
}
#mini-queue[aria-pressed="true"],
#mini-lyrics[aria-pressed="true"] {
  color: var(--lilac);
}
#mini-queue[aria-pressed="true"]::after,
#mini-lyrics[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: var(--lilac);
  -webkit-mask: var(--star-uri) center / contain no-repeat;
  mask: var(--star-uri) center / contain no-repeat;
  filter: drop-shadow(0 0 3px rgba(200, 182, 255, .8));
}
#mini-volume {
  -webkit-appearance: none;
  appearance: none;
  width: 110px;
  min-width: 60px;
  height: 18px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  touch-action: none;
}
#mini-volume::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 99px;
  background:
    linear-gradient(to right, transparent var(--vol-at, 80%), var(--ink-4) var(--vol-at, 80%)),
    var(--foil);
}
#mini-volume::-moz-range-track {
  height: 4px;
  border-radius: 99px;
  background:
    linear-gradient(to right, transparent var(--vol-at, 80%), var(--ink-4) var(--vol-at, 80%)),
    var(--foil);
}
#mini-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border: 0;
  background: var(--star-uri) center / contain no-repeat;
  filter: drop-shadow(0 0 5px rgba(200, 182, 255, .8));
  cursor: grab;
  opacity: 0;
  transition: opacity .15s ease-out;
}
#mini-volume::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 0;
  background: var(--star-uri) center / contain no-repeat;
  filter: drop-shadow(0 0 5px rgba(200, 182, 255, .8));
  cursor: grab;
  opacity: 0;
  transition: opacity .15s ease-out;
}
#mini-volume:focus-visible {
  outline-offset: 4px;
  border-radius: 6px;
}

/* ——— Toast ——— */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bar-h) + 1.25rem + env(safe-area-inset-bottom));
  z-index: 40;
  display: flex;
  align-items: center;
  gap: .55rem;
  width: max-content; /* left:50% would shrink-wrap it to half the screen */
  max-width: calc(100% - 2rem);
  padding: .65rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background:
    linear-gradient(180deg, #332d48, #221e30) padding-box,
    var(--chrome-edge) border-box;
  color: var(--fg);
  font-size: .88rem;
  font-weight: 600;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .9);
  opacity: 0;
  transform: translateX(-50%) translateY(8px);
  transition: opacity .22s var(--ease-out), transform .22s var(--ease-out);
  pointer-events: none;
}
.toast::before {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  background: var(--gold);
  -webkit-mask: var(--star-uri) center / contain no-repeat;
  mask: var(--star-uri) center / contain no-repeat;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.skeleton {
  border-radius: 16px;
  min-height: 188px;
  background: linear-gradient(100deg, var(--ink-2) 30%, var(--ink-3) 50%, var(--ink-2) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position: -300% 0; } }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ——— Login ——— */
.login-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  overflow: auto;
  background: radial-gradient(60vmax 50vmax at 50% 30%, rgba(60, 51, 88, .7), transparent 70%), var(--ink-0);
}
.login-card {
  width: min(400px, 100%);
  animation: view-in .4s var(--ease-out) both;
}
.login-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .85rem;
  padding: 1.8rem 1.6rem 1.6rem;
}
.disc--login { --size: 176px; align-self: center; margin-bottom: .6rem; }
.login-card .brand {
  margin: 0;
  font-size: 3rem;
  text-align: center;
}
.login-sub { margin: -.2rem 0 .4rem; text-align: center; color: var(--fg-2); }
.login-hint { margin: -.3rem 0 0; color: var(--fg-3); font-size: .8rem; text-align: center; }
.login-error {
  margin: 0;
  color: var(--danger);
  font-size: .88rem;
  text-align: center;
}
.invite-stack { display: flex; flex-direction: column; gap: .6rem; }
body.locked .shell,
body.locked .mini-player,
body.locked .topbar { visibility: hidden; pointer-events: none; }

/* ——— Profile ——— */
.profile-card { max-width: 640px; }
.profile-id { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin-bottom: .2rem; }
.profile-name-display {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}
.profile-role-display {
  padding: .15rem .5rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: .6875rem;
  font-stretch: 87.5%;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.profile-inline-form { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.profile-inline-form .btn { flex: none; }
.profile-stack { display: flex; flex-direction: column; gap: .7rem; }
.profile-subhead {
  margin: 1.5rem 0 .5rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--fg-2);
}
.profile-subhead:first-of-type { margin-top: 1.1rem; }
.profile-list { list-style: none; margin: 0; padding: 0; }
.profile-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem .75rem;
  padding: .6rem .5rem;
  border-radius: 12px;
  transition: background-color .15s;
}
.profile-row + .profile-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: .5rem;
  right: .5rem;
  height: 1px;
  background: var(--line);
}
.profile-row:hover { background: rgba(50, 44, 67, .6); }
.profile-row-text { display: flex; flex-direction: column; min-width: 0; gap: .1rem; }
.profile-row-text strong {
  overflow: hidden;
  font-weight: 600;
  font-size: .92rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.profile-row-text span {
  overflow: hidden;
  color: var(--fg-2);
  font-size: .78rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.status-tag {
  flex: none;
  padding: .15rem .5rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: .6875rem;
  font-stretch: 87.5%;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.status-tag.active { color: var(--fg); background: var(--ink-3); }
.tiny.confirm, .tiny.confirm:hover:not(:disabled) { color: var(--on-foil); background: var(--danger); border-color: transparent; }
.profile-dev > summary {
  list-style: none;
  cursor: pointer;
  border-bottom-color: transparent;
}
.profile-dev > summary::-webkit-details-marker { display: none; }
.profile-dev[open] > summary { border-bottom-color: var(--line); }
.profile-dev-toggle {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--ui);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ice);
}
.profile-dev-toggle::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s var(--ease-out);
}
.profile-dev[open] .profile-dev-toggle::after { transform: translateY(2px) rotate(-135deg); }
.profile-logout-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem .9rem;
  margin-top: .25rem;
}
.profile-logout-all { color: var(--fg-3); }
.profile-logout-all:hover:not(:disabled) { color: var(--danger); border-color: rgba(255, 155, 176, .35); }

/* Notifications: one spark carries the state, the words carry the meaning.
   Mint is "on" (same as "added"), danger is blocked or failed, dust is
   everything that is simply off or unavailable. */
.notify-state { display: flex; align-items: flex-start; gap: .7rem; }
.notify-spark { width: 18px; height: 18px; margin-top: .2rem; color: var(--fg-3); transition: color .2s; }
.notify-state[data-tone="on"] .notify-spark { color: var(--mint); }
.notify-state[data-tone="bad"] .notify-spark { color: var(--danger); }
.notify-state[data-tone="busy"] .notify-spark { animation: star-spin 1.1s var(--ease-out) infinite; }
.notify-text { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.notify-text strong {
  font-family: var(--ui);
  font-weight: 600;
  font-size: .92rem;
  line-height: 1.3;
  letter-spacing: 0;
}
.notify-text .add-hint { max-width: 52ch; }
.notify-actions { flex-wrap: wrap; }
.notify-error { text-align: left; }

/* Privacy switch: a native-feeling on/off row. The state is a word first
   (открыт / закрыт), the track and its spark second; mint is "on", the same
   meaning it has in notifications. The 44px hit area is the button, the
   drawn track is smaller and carries the focus ring. */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.switch-row-sep { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.switch {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  min-height: 44px;
  padding: 0 .1rem 0 .4rem;
  border: 0;
  background: none;
  color: var(--fg-2);
  font: inherit;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
}
.switch:focus-visible { outline: none; }
.switch:focus-visible .switch-track { outline: 2px solid var(--lilac); outline-offset: 3px; }
.switch:disabled { opacity: .5; cursor: default; }
.switch[aria-checked="true"] { color: var(--mint); }
.switch-state { min-width: 4.2ch; text-align: right; }
.switch-track {
  position: relative;
  width: 48px;
  height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--ink-0);
  transition: background-color .2s, border-color .2s;
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 5px;
  width: 18px;
  height: 18px;
  background: var(--fg-3);
  -webkit-mask: var(--star-uri) center / contain no-repeat;
  mask: var(--star-uri) center / contain no-repeat;
  transform: translateY(-50%);
  transition: transform .25s var(--ease-out), background-color .2s;
}
.switch:hover:not(:disabled) .switch-track { border-color: rgba(236, 232, 244, .4); }
.switch[aria-checked="true"] .switch-track { background: var(--mint); border-color: transparent; }
.switch[aria-checked="true"] .switch-track::after { background: var(--on-foil); transform: translate(20px, -50%) rotate(90deg); }
.switch:active:not(:disabled) .switch-track::after { transform: translateY(-50%) scale(.88); }
.switch[aria-checked="true"]:active:not(:disabled) .switch-track::after { transform: translate(20px, -50%) rotate(90deg) scale(.88); }

/* ——— Playlist view ——— */
.pl-top-nav { margin-bottom: 1rem; }
.pl-hero { margin-bottom: 2rem; }
.pl-hero-body {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.8rem 2rem;
}
.pl-cover-stage {
  flex: none;
  width: 140px;
  height: 140px;
  border-radius: var(--r-cover);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 14px 28px -18px rgba(0, 0, 0, .9);
  background: var(--ink-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pl-cover-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pl-cover-stage .cover.empty {
  width: 100%;
  height: 100%;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pl-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.pl-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 2.2rem;
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: var(--fg);
  word-break: break-word;
}
.pl-meta {
  margin: 0;
  font-family: var(--mono);
  font-size: .75rem;
  color: var(--fg-3);
  text-transform: uppercase;
}
.pl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: .4rem;
}
.pl-track-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pl-track-row {
  grid-template-columns: 2rem minmax(0, 1fr) auto auto 3.2rem;
  grid-template-areas: "num main actions more dur";
  position: relative;
  transition: background-color .15s, border-color .15s;
}
.pl-track-row.open {
  grid-template-columns: 2rem minmax(0, 1fr) auto 3.2rem;
  grid-template-areas: "num main more dur" ". panel panel panel";
}
.pl-row-num {
  grid-area: num;
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--fg-3);
  text-align: center;
  user-select: none;
  cursor: grab;
}
.pl-track-row.dragging {
  opacity: .35;
  background: var(--ink-3);
}
.pl-track-row.drag-over-top {
  box-shadow: inset 0 2px 0 var(--lilac);
}
.pl-track-row.drag-over-bottom {
  box-shadow: inset 0 -2px 0 var(--lilac);
}
.pl-track-list.reordering {
  opacity: .5;
  pointer-events: none;
  transition: opacity .15s;
}

/* ——— Artist & Album ——— */
/* artist-hero-body extends pl-hero-body — only add what differs */
.artist-hero-body {
  min-height: 240px;
}
.artist-portrait-wrap {
  flex: none;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.artist-portrait-wrap .cover.round {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 14px 28px -18px rgba(0, 0, 0, .9);
  background-size: cover;
  background-position: center;
}
.artist-portrait-wrap .cover.blank {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  font-size: 3.5rem;
}
.artist-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.artist-title,
.album-title {
  text-wrap: balance;
  color: var(--fg);
}
.artist-stats {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
/* artist-stat extends import-stat — only differences: min-width and label colour */
.artist-stat {
  min-width: 130px;
}
.artist-stat strong {
  font-size: 1.4rem;
  color: var(--fg);
}
.artist-stat span {
  color: var(--fg-2);
  margin-top: .15rem;
}
.artist-actions {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}
.artist-desc-wrap {
  max-width: 68ch;
}
.artist-desc {
  margin: 0;
  font-family: var(--ui);
  font-size: .92rem;
  line-height: 1.5;
  color: var(--fg-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.artist-desc.expanded {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}
.artist-desc-toggle {
  margin-top: .35rem;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--ui);
  font-size: .82rem;
  color: var(--ice);
  text-decoration: underline;
  text-decoration-color: var(--ice);
  text-underline-offset: 3px;
  cursor: pointer;
}
.artist-desc-toggle:focus-visible {
  outline: 2px solid var(--lilac);
  outline-offset: 2px;
  border-radius: 2px;
}
.artist-error-wrap,
.album-error-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .75rem;
}
.artist-error-text,
.album-error-text {
  margin: 0;
  color: var(--fg-2);
  font-size: .95rem;
  line-height: 1.4;
}
.artist-section {
  margin-bottom: 2.5rem;
}
.album-hero-body {
  min-height: 180px;
}
.album-artist-line {
  margin: 0;
  font-size: .95rem;
  color: var(--fg-2);
}
.track-num {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: .88rem;
  font-stretch: 87.5%;
  font-variant-numeric: tabular-nums;
  color: var(--fg-3);
  flex: none;
}
.card-cover-wrap {
  position: relative;
  width: 100%;
}
.card-cover-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: var(--r-cover);
}
.card-cover-btn:focus-visible {
  outline: 2px solid var(--lilac);
  outline-offset: 2px;
}
.card-cover-btn .cover {
  margin: 0;
  width: 100%;
  aspect-ratio: 1;
}
.card-info-btn {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: .4rem 0 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  color: inherit;
}
.card-info-btn:focus-visible {
  outline: 2px solid var(--lilac);
  outline-offset: 2px;
  border-radius: 4px;
}
.card-play {
  position: absolute;
  z-index: 2;
  right: .8rem;
  bottom: .8rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  background: var(--foil);
  color: var(--on-foil);
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, .8);
  opacity: 0;
  transform: translateY(6px) scale(.9);
  transition: opacity .2s var(--ease-out), transform .25s var(--ease-out);
  cursor: pointer;
}
.card-play .px {
  width: 14px;
  height: 14px;
}
.mix-card:hover .card-play,
.card-play:focus-visible {
  opacity: 1;
  transform: none;
}
.card-play:focus-visible {
  outline: 2px solid var(--lilac);
  outline-offset: 2px;
}
/* Artist tiles (Home, Library): the puck is a real button, centered low on
   the round cover, so the decorative ::after puck is switched off there. */
.artist-card.has-puck .card-main .cover::after { display: none; }
.has-puck .card-cover-wrap { margin-bottom: .55rem; }
.has-puck .card-cover-wrap .cover { margin-bottom: 0; }
.card-play--artist {
  right: auto;
  left: 50%;
  bottom: .75rem;
  margin-left: -1.2rem;
}
.card-hit:focus-visible ~ .card-cover-wrap .card-play--artist {
  opacity: 1;
  transform: none;
}
/* No hover to reveal it: always visible, and a 44px touch target. */
@media (hover: none) {
  .card-play--artist {
    opacity: 1;
    transform: none;
    width: 2.75rem;
    height: 2.75rem;
    margin-left: -1.375rem;
    bottom: .6rem;
  }
}

/* ——— Modals ——— */
.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  overflow-y: auto;
  background: rgba(19, 16, 28, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: modal-fade-in .18s var(--ease-out) both;
}
@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-card {
  width: min(440px, 100%);
  max-height: calc(100vh - 3rem);
  display: flex;
  flex-direction: column;
  animation: modal-zoom-in .22s var(--ease-out) both;
}
@keyframes modal-zoom-in {
  from { opacity: 0; transform: scale(.96) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.win-close {
  background: transparent;
  border: 0;
  padding: .2rem;
  color: var(--fg-3);
  cursor: pointer;
  /* icon buttons are always a full pill or circle, never a soft-corner square */
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color .15s, background-color .15s;
}
.win-close:hover { color: var(--fg); background: var(--ink-3); }
.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.modal-head {
  margin: 0;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--fg);
}
.modal-sub {
  margin: -.5rem 0 0;
  font-size: .88rem;
  color: var(--fg-2);
}
.modal-track-preview {
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--lilac);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: .6rem;
  margin-top: .5rem;
}
.modal-quick-create {
  display: flex;
  gap: .5rem;
  align-items: center;
}
.modal-quick-create .text-input { flex: 1; }
.modal-pl-scroll {
  max-height: 240px;
  overflow-y: auto;
  margin-inline: -.5rem;
  padding-inline: .5rem;
}
.modal-pl-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.modal-pl-row { list-style: none; }
.modal-pl-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .5rem .7rem;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: left;
  transition: background-color .15s, border-color .15s;
}
.modal-pl-btn:hover {
  background: var(--ink-3);
  border-color: var(--line);
}
.modal-pl-btn .cover {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  flex: none;
}
.modal-pl-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.modal-pl-text strong {
  font-size: .9rem;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.modal-pl-text span {
  font-size: .78rem;
  color: var(--fg-3);
}
.modal-pl-action {
  color: var(--fg-3);
  flex: none;
}
.modal-pl-btn:hover .modal-pl-action { color: var(--lilac); }

/* ——— Friends ——— */
#view-friends .fr-card, .fr-section { max-width: 720px; }
.fr-section { margin-top: 1.9rem; }
.fr-section .shelf-head { margin-bottom: .2rem; }
.fr-status { margin: .1rem 0 0; color: var(--fg-2); font-size: .88rem; }
.fr-list { list-style: none; margin: 0; padding: 0; }
.fr-card .fr-list { margin-top: .1rem; }
.fr-row {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: .85rem;
  padding: .5rem;
  border-radius: 12px;
  transition: background-color .15s;
}
.fr-row + .fr-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: calc(40px + 1.35rem);
  right: .5rem;
  height: 1px;
  background: var(--line);
}
.fr-row:hover { background: rgba(50, 44, 67, .6); }
.fr-row:hover::before, .fr-row:hover + .fr-row::before { opacity: 0; }
.fr-avatar .cover { width: 40px; height: 40px; margin: 0; }
.fr-avatar .cover.blank > span { font-size: 1rem; }
.fr-text { display: flex; flex-direction: column; min-width: 0; gap: .05rem; }
.fr-text strong {
  overflow: hidden;
  font-weight: 600;
  font-size: .94rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.fr-text > span {
  overflow: hidden;
  color: var(--fg-2);
  font-size: .8rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.fr-text > span:empty { display: none; }
.fr-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; }
.fr-section .empty-row { margin-top: .4rem; }
/* Unread-request count on the tab's icon: lilac is the "attention" hue, the
   ring keeps it apart from the foil of the active tab. */
.tab-badge {
  position: absolute;
  top: 50%;
  right: 2.3rem;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--lilac);
  box-shadow: 0 0 0 2px var(--ink-1);
  color: var(--on-foil);
  font-family: var(--mono);
  font-size: .6875rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.tab.active .tab-badge { box-shadow: 0 0 0 2px var(--on-foil); background: var(--on-foil); color: var(--lilac); }
@media (max-width: 720px) {
  /* Two actions (accept / decline) drop under the name so it keeps its width. */
  .fr-row--pair { grid-template-columns: 40px minmax(0, 1fr); }
  .fr-row--pair .fr-actions { grid-column: 2; }
  /* Three actions (Волна, Написать, Убрать) share one line at 375px. */
  .fr-actions { gap: .3rem; }
  .fr-row--pair .fr-actions .tiny { padding-inline: .55rem; }
}

/* ——— Chats ——— */
.chats-head { margin-bottom: 1rem; }
.chats-head .page-title { margin-bottom: 0; }
#view-chats.active { display: flex; flex-direction: column; }
.chats-shell {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 1.25rem;
  flex: 1;
  min-height: 0;
}
.chats-list-pane, .chat-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.chat-pane { container-type: inline-size; }
@media (min-width: 961px) {
  /* The feed scrolls inside its window, so the page itself must not: the
     view fills what the top padding and the player bar leave. */
  body[data-view="chats"] main { padding-bottom: calc(var(--bar-h) + 1.25rem); }
  #view-chats.active {
    height: calc(100vh - 3rem - var(--bar-h));
    height: calc(100dvh - 3rem - var(--bar-h));
    min-height: 440px;
  }
}

/* Conversation list */
.chat-list {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: .4rem;
  list-style: none;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.chat-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: .8rem;
  width: 100%;
  min-height: 64px;
  padding: .5rem .6rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color .15s;
}
.chat-row:hover { background: rgba(50, 44, 67, .6); }
.chat-row.on { background: var(--ink-3); box-shadow: inset 0 0 0 1px var(--lilac); }
.chat-av .cover { width: 44px; height: 44px; margin: 0; }
.chat-av .cover.blank > span { font-size: 1.05rem; }
.chat-av .cover.grp .px { width: 24px; height: 24px; }
.chat-row-text { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.chat-row-text strong {
  overflow: hidden;
  font-weight: 600;
  font-size: .94rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.chat-prev {
  overflow: hidden;
  color: var(--fg-2);
  font-size: .82rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.chat-you, .chat-prev-quiet { color: var(--fg-3); }
.chat-row.unread .chat-row-text strong { font-weight: 700; }
.chat-row.unread .chat-prev { color: var(--fg); }
.chat-row-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .3rem;
  min-width: 2.6rem;
}
.chat-time {
  font-family: var(--mono);
  font-size: .6875rem;
  font-stretch: 87.5%;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  color: var(--fg-3);
}
.chat-row.unread .chat-time { color: var(--lilac); }
/* Same lilac pill as the tab badge: unread is the attention hue. */
.chat-unread {
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--lilac);
  color: var(--on-foil);
  font-family: var(--mono);
  font-size: .6875rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.chat-list-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  margin: .4rem;
  padding: 1.8rem 1.2rem;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--fg-2);
  text-align: center;
}
.chat-list-empty > .px { width: 36px; height: 36px; color: var(--fg-3); }
.chat-list-empty strong { font-size: .95rem; color: var(--fg); }
.chat-list-empty .btn { margin-top: .5rem; }
.chat-skel-row, .chat-skel-msg {
  border-radius: 12px;
  background: linear-gradient(100deg, var(--ink-2) 30%, var(--ink-3) 50%, var(--ink-2) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.4s linear infinite;
}
.chat-skel-row { height: 60px; margin: .35rem .2rem; }
.chat-skel-msg { align-self: flex-start; width: 56%; height: 44px; margin: .35rem 0; border-radius: 16px; }
.chat-skel-msg.mine { align-self: flex-end; width: 42%; }

/* Right pane: empty state */
.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: 2rem;
  text-align: center;
  color: var(--fg-3);
}
.chat-empty > .px { width: 36px; height: 36px; margin-bottom: .4rem; }
.chat-empty-title { margin: 0; font-size: .95rem; font-weight: 600; color: var(--fg-2); }
.chat-empty-sub { margin: 0; max-width: 32ch; font-size: .92rem; color: var(--fg-3); text-wrap: balance; }
.chat-thread { flex: 1; display: flex; flex-direction: column; min-height: 0; }

/* Thread head */
.chat-head {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .65rem .9rem .65rem .8rem;
  border-bottom: 1px solid var(--line);
}
.chat-back { display: none; flex: none; }
.chat-back .px { width: 24px; height: 24px; }
.chat-head-av .cover { width: 40px; height: 40px; margin: 0; }
.chat-head-av .cover.blank > span { font-size: 1rem; }
.chat-head-av .cover.grp .px { width: 24px; height: 24px; }
.chat-head-text { flex: 1; min-width: 0; }
.chat-head-text h2 {
  margin: 0;
  overflow: hidden;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.chat-head-text p { margin: 0; color: var(--fg-2); font-size: .8rem; }

/* Feed */
.chat-stream { position: relative; flex: 1; min-height: 0; }
.chat-scroll {
  position: absolute;
  inset: 0;
  padding: .6rem 1rem .5rem;
  overflow-y: auto;
  overflow-anchor: none; /* the script keeps the position itself when older pages arrive */
  overscroll-behavior: contain;
  background: rgba(19, 16, 28, .42);
}
.chat-msgs {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chat-msgs > :first-child { margin-top: auto; }
.chat-older {
  position: absolute;
  top: .6rem;
  left: 50%;
  translate: -50% 0;
  margin: 0;
  padding: .25rem .7rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(28, 25, 40, .92);
  font-family: var(--mono);
  font-size: .6875rem;
  font-stretch: 87.5%;
  letter-spacing: .04em;
  color: var(--fg-2);
  pointer-events: none;
}
.chat-newpill {
  position: absolute;
  bottom: .8rem;
  left: 50%;
  translate: -50% 0;
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .7);
}
.chat-blank {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
  margin: auto 0;
  padding: 1.5rem 1rem;
  color: var(--fg-3);
  text-align: center;
}
.chat-day {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin: 1.1rem 0 .5rem;
  font-family: var(--mono);
  font-size: .6875rem;
  font-stretch: 87.5%;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.chat-day::before, .chat-day::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.msg { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.msg--mine { align-items: flex-end; }
.msg--first { margin-top: .65rem; }
.chat-day + .msg--first { margin-top: 0; }
.msg-author {
  margin: 0 .35rem .2rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--fg-2);
}
.msg-line {
  display: flex;
  align-items: center;
  gap: .1rem;
  max-width: min(100%, 38rem);
}
.msg-bubble {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px 16px 16px 6px;
  background: var(--ink-3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}
.msg--first .msg-bubble { border-top-left-radius: 16px; }
.msg--mine .msg-bubble {
  border-color: var(--line-strong);
  border-radius: 16px 6px 6px 16px;
  background: var(--ink-4);
}
.msg--mine.msg--first .msg-bubble { border-top-right-radius: 16px; }
.msg-text {
  margin: 0;
  padding: .5rem .8rem;
  color: var(--fg);
  font-size: .95rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.msg--deleted .msg-bubble {
  border: 1px dashed var(--line-strong);
  background: transparent;
  box-shadow: none;
}
.msg-text--gone { color: var(--fg-3); font-size: .92rem; }
.msg--sending .msg-bubble { opacity: .62; }
.msg--failed .msg-bubble { border-color: rgba(255, 155, 176, .65); }
.msg-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .4rem;
  margin: .25rem .2rem 0;
  font-family: var(--mono);
  font-size: .6875rem;
  font-stretch: 87.5%;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  color: var(--fg-3);
}
.msg-meta .star { width: 12px; height: 12px; }
.msg-meta.failed { color: var(--danger); }
.msg-meta .tiny { min-height: 30px; }
.msg-more {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--fg-3);
  cursor: pointer;
  transition: opacity .15s, background-color .15s, color .15s;
}
.msg-more:hover, .msg-more[aria-expanded="true"] { background: var(--ink-3); color: var(--fg); }
@media (hover: hover) {
  .msg-more { opacity: 0; }
  .msg:hover .msg-more, .msg:focus-within .msg-more, .msg-more[aria-expanded="true"] { opacity: 1; }
}
.msg-reacts {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin: .3rem .1rem 0;
}
.msg--mine .msg-reacts { justify-content: flex-end; }
.react {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 30px;
  padding: .1rem .6rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(19, 16, 28, .55);
  color: var(--fg-2);
  cursor: pointer;
  transition: color .15s, background-color .15s, border-color .15s;
}
.react .px { width: 12px; height: 12px; }
.react-n {
  font-family: var(--mono);
  font-size: .6875rem;
  font-weight: 500;
  font-stretch: 87.5%;
  font-variant-numeric: tabular-nums;
}
.react:hover { color: var(--fg); background: var(--ink-3); }
/* Mine: a lilac ring, not foil; foil stays on what is live. */
.react.mine { color: var(--fg); border-color: rgba(200, 182, 255, .65); background: rgba(200, 182, 255, .16); }
.react.add { width: 30px; padding: 0; justify-content: center; color: var(--fg-3); }

/* Message menu: reactions and delete, a floating glass card */
.msg-menu {
  position: fixed;
  z-index: 60;
  width: max-content;
  max-width: calc(100vw - 16px);
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: .4rem;
  border: 1px solid transparent;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(48, 42, 64, .96), rgba(28, 25, 40, .98)) padding-box,
    var(--chrome-edge) border-box;
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .95);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  animation: modal-zoom-in .16s var(--ease-out) both;
}
.menu-reacts { display: flex; gap: .15rem; }
.menu-react {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--fg-2);
  cursor: pointer;
  transition: color .15s, background-color .15s, border-color .15s;
}
.menu-react .px { width: 24px; height: 24px; }
.menu-react:hover { color: var(--fg); background: var(--ink-3); }
.menu-react.mine { color: var(--fg); border-color: rgba(200, 182, 255, .65); background: rgba(200, 182, 255, .16); }
.menu-del { align-self: stretch; justify-content: flex-start; min-height: 40px; margin-top: .05rem; }

/* Composer */
.chat-composer {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: .3rem .6rem;
  padding: .7rem .8rem .8rem;
  border-top: 1px solid var(--line);
  background: rgba(28, 25, 40, .6);
}
.chat-input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  max-height: 9.9rem;
  padding: .65rem 1rem;
  line-height: 1.45;
  resize: none;
  overflow-y: auto;
}
.chat-send { min-height: 46px; flex: none; }
.chat-send .px { width: 18px; height: 18px; }
.chat-count {
  flex-basis: 100%;
  margin: 0;
  padding-right: .3rem;
  font-family: var(--mono);
  font-size: .6875rem;
  font-stretch: 87.5%;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  color: var(--fg-3);
  text-align: right;
}
.chat-count.over { color: var(--danger); }
.chat-locked {
  margin: .8rem;
  padding: .9rem 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--fg-2);
  text-align: center;
}

/* Group dialogs */
.modal-subhead {
  margin: .6rem 0 -.2rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--fg-2);
}
.pick-list, .mem-list { margin: 0; padding: 0; list-style: none; }
.pick-list { max-height: 260px; overflow-y: auto; margin-inline: -.4rem; padding-inline: .4rem; }
.pick-count { margin: -.2rem 0 0; }
.pick-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 52px;
  padding: .3rem .5rem;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color .15s;
}
.pick-row:hover { background: rgba(50, 44, 67, .6); }
.pick-row:has(.pick-cb:focus-visible) { outline: 2px solid var(--lilac); outline-offset: 2px; }
.pick-cb {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}
.pick-box {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(19, 16, 28, .62);
  color: transparent;
  transition: background-color .15s, border-color .15s;
}
.pick-box .px { width: 12px; height: 12px; }
.pick-cb:checked + .pick-box { color: var(--on-foil); background: var(--foil); border-color: transparent; }
.pick-row .chat-av .cover, .mem-row .chat-av .cover { width: 36px; height: 36px; }
.pick-row .chat-av .cover.blank > span, .mem-row .chat-av .cover.blank > span { font-size: .9rem; }
.pick-name { min-width: 0; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.pick-row-wrap.off .pick-row { opacity: .45; cursor: default; }
.mem-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 52px;
  padding: .3rem .1rem;
}
.mem-name { flex: 1; min-width: 0; }
.mem-name { display: flex; align-items: baseline; gap: .35rem; white-space: nowrap; }
.mem-name strong {
  overflow: hidden;
  font-family: inherit;
  font-weight: 600;
  font-size: .94rem;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mem-name span { color: var(--fg-3); font-size: .8rem; }
.chat-leave { align-self: flex-start; }
.chat-leave.confirm, .chat-leave.confirm:hover { color: var(--on-foil); background: var(--danger); border-color: transparent; }
.modal-actions:has(.chat-leave) { justify-content: flex-start; }

/* ——— Attachments: cards inside a message, the send dialog ——— */
/* The card sits in the bubble with .4rem around it: 16px bubble corner minus
   .4rem leaves the 12px row radius, so the two curves stay concentric. */
.msg-attach { padding: .4rem; width: min(22.5rem, calc(100cqw - 5.5rem)); }
.msg-attach + .msg-text { padding-top: .3rem; }
.att {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
  width: 100%;
  padding: .5rem;
  border: 0;
  border-radius: 12px;
  background: rgba(19, 16, 28, .5);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--fg);
  font: inherit;
  text-align: left;
  transition: background-color .15s, box-shadow .15s;
}
.att .cover { width: 48px; height: 48px; margin: 0; border-radius: 8px; }
.att .cover.round { border-radius: 50%; }
.att .cover.blank > span { font-size: 1.05rem; }
.att .cover.empty .px { width: 24px; height: 24px; }
.att-text { display: flex; flex-direction: column; gap: .05rem; min-width: 0; }
.att-text strong {
  overflow: hidden;
  font-weight: 600;
  font-size: .92rem;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.att-sub {
  display: flex;
  align-items: center;
  gap: .3rem;
  min-width: 0;
  overflow: hidden;
  color: var(--fg-2);
  font-size: .8rem;
  white-space: nowrap;
}
.att-sub .px { width: 12px; height: 12px; color: var(--fg-3); }
.att-sub > span:last-child, .att-meta { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.att-sub .tag { margin: 0 0 0 .45rem; }
.att-dur {
  font-family: var(--mono);
  font-size: .6875rem;
  font-stretch: 87.5%;
  font-variant-numeric: tabular-nums;
  color: var(--fg-3);
}

/* Titles may take two lines (a long track name is the whole point of the card). */
.att--track .att-text strong, .att--link .att-text strong {
  display: -webkit-box;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
}

/* Track: cover, text, one round play button. The foil belongs to the button of
   the track that is playing; the card itself gets the queue's current-row look. */
.att-star { display: none; flex: none; width: 12px; height: 12px; color: var(--lilac); }
.att--track.current { background: var(--ink-3); box-shadow: inset 0 0 0 1px rgba(200, 182, 255, .28); }
.att--track.current .att-star { display: block; filter: drop-shadow(0 0 6px rgba(200, 182, 255, .8)); }
body[data-state="play"] .att--track.current .att-star { animation: disc-spin 4s linear infinite; }
.att-play {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: linear-gradient(180deg, var(--ink-3), var(--ink-2));
  color: var(--fg);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  transition: background-color .18s, color .18s, border-color .18s, transform .12s;
}
.att-play .px { width: 18px; height: 18px; grid-area: 1 / 1; }
.att-play .att-ic-pause { display: none; }
.att-play:hover:not(:disabled) { border-color: rgba(236, 232, 244, .32); background: var(--ink-4); }
.att-play:active:not(:disabled) { transform: scale(.94); color: var(--lilac); background: var(--ink-0); box-shadow: inset 0 0 0 1px var(--lilac); }
.att-play:disabled { opacity: .35; cursor: default; }
.att--track.current .att-play { color: var(--lilac); border-color: rgba(200, 182, 255, .55); }
body[data-state="play"] .att--track.current .att-play {
  color: var(--on-foil);
  border-color: transparent;
  background: var(--foil);
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .7);
}
body[data-state="play"] .att--track.current .att-ic-play { display: none; }
body[data-state="play"] .att--track.current .att-ic-pause { display: block; }
.att--track.off .cover { filter: grayscale(1) brightness(.55); }
.att--track.off .att-text strong { color: var(--fg-2); }

/* Playlist: head row, then the actions under it. */
.att--pl { grid-template-columns: minmax(0, 1fr); gap: .6rem; }
.att-head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .75rem; }
.att--pl .cover { width: 56px; height: 56px; border-radius: var(--r-cover); }
.att-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.att-actions .tiny { min-width: 0; padding-inline: .6rem; }
.att .tiny.added { color: var(--mint); border-color: rgba(184, 245, 216, .35); opacity: 1; }
.btn.added, .btn.added:hover { color: var(--mint); border-color: rgba(184, 245, 216, .35); background: var(--ink-3); opacity: 1; }

/* Album and artist: the whole card is the one button. */
.att--link { cursor: pointer; }
.att--link .cover { width: 56px; height: 56px; border-radius: var(--r-cover); }
.att--link.att--artist .cover { border-radius: 50%; }
.att--link:hover { background: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line-strong); }
.att--link:focus-visible { outline: 2px solid var(--lilac); outline-offset: 2px; }
.att-go { width: 12px; height: 12px; color: var(--fg-3); transition: transform .15s var(--ease-out), color .15s; }
.att--link:hover .att-go { color: var(--fg); transform: translateX(2px); }

/* Gone: the original was deleted; a quiet dashed stand-in. */
.att--gone {
  grid-template-columns: auto minmax(0, 1fr);
  background: transparent;
  box-shadow: none;
  border: 1px dashed var(--line-strong);
  padding: .65rem .75rem;
  color: var(--fg-3);
}
.att--gone > .px { width: 24px; height: 24px; }
.att--gone .att-text strong { color: var(--fg-2); font-weight: 600; }
.att--gone .att-sub:empty { display: none; }

/* Conversation list preview: the kind icon leads the line. */
.chat-prev .px { width: 12px; height: 12px; margin-right: .3rem; vertical-align: -1px; color: var(--fg-3); }

/* Send dialog */
.send-preview {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .5rem;
  border-radius: 12px;
  background: rgba(19, 16, 28, .5);
  box-shadow: inset 0 0 0 1px var(--line);
}
.send-cover .cover { width: 48px; height: 48px; margin: 0; border-radius: 8px; }
.send-cover .cover.round { border-radius: 50%; }
.send-cover .cover.blank > span { font-size: 1.05rem; }
.send-text { display: flex; flex-direction: column; min-width: 0; }
.send-text strong { overflow: hidden; font-size: .92rem; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.send-text > span {
  display: flex;
  align-items: center;
  gap: .3rem;
  overflow: hidden;
  color: var(--fg-2);
  font-size: .8rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.send-text .px { width: 12px; height: 12px; color: var(--fg-3); }
.send-list { max-height: 232px; padding-block: .25rem; margin-block: -.25rem; }
.pick-cb[type="radio"] + .pick-box { border-radius: 50%; }
.pick-sub {
  margin-left: auto;
  padding-left: .5rem;
  font-family: var(--mono);
  font-size: .6875rem;
  font-stretch: 87.5%;
  letter-spacing: .04em;
  color: var(--fg-3);
}
.pick-none { margin: 0; color: var(--fg-3); font-size: .88rem; text-align: center; }
.send-caption { min-height: 64px; resize: vertical; padding-block: .65rem; line-height: 1.45; }
.send-form .empty-row { flex-wrap: wrap; }
.send-form .empty-row + .btn { align-self: flex-start; }

/* Toast action */
.toast.has-action { padding-right: .35rem; pointer-events: auto; }
.toast-act {
  flex: none;
  min-height: 34px;
  padding: .25rem .85rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ice);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: color .15s, background-color .15s;
}
.toast-act:hover { color: var(--fg); background: var(--ink-3); }

/* Queue: a send button after the duration */
.playlist-item { grid-template-columns: 2.4rem minmax(0, 1fr) auto auto; }
.pl-send {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--fg-2);
  cursor: pointer;
  transition: color .15s, background-color .15s, opacity .15s;
}
.pl-send .px { width: 12px; height: 12px; }
.pl-send:hover { color: var(--fg); background: var(--ink-2); }
@media (hover: hover) {
  .pl-send { opacity: 0; }
  .playlist-item:hover .pl-send, .playlist-item:focus-within .pl-send { opacity: 1; }
}

/* Shared playlist: read-only; "Плейлист от …" sits under the title. */
.pl-owner { margin: -.2rem 0 0; color: var(--fg-2); font-size: .95rem; }
.pl-track-list.ro .pl-row-num { cursor: default; }

@media (pointer: coarse), (max-width: 720px) {
  .att-actions .tiny { min-height: 44px; flex: 1 1 auto; }
  .pl-send { width: 44px; height: 44px; }
  .toast-act { min-height: 44px; }
}

@media (max-width: 960px) {
  .chats-shell { display: block; }
  .chats-shell[data-mode="thread"] { display: flex; flex-direction: column; }
  .chats-shell[data-mode="thread"] .chats-list-pane, .chats-shell[data-mode="list"] .chat-pane { display: none; }
  .chat-list { overflow: visible; }
  .chat-back { display: inline-grid; }
  .chat-winbar { display: none; }
  .chat-pane { flex: 1; }
  /* A conversation takes the whole screen above the bottom bar, like any
     messenger: no top bar, no floating player, no page margins. */
  body[data-view="chats"][data-chat="thread"] .topbar,
  body[data-view="chats"][data-chat="thread"] .mini-player,
  body[data-view="chats"][data-chat="thread"] .chats-head { display: none; }
  body[data-view="chats"][data-chat="thread"] main {
    padding: 0 0 calc(var(--nav-h) + 2px + env(safe-area-inset-bottom));
  }
  body[data-view="chats"][data-chat="thread"] #view-chats.active {
    height: calc(100vh - var(--nav-h) - 2px - env(safe-area-inset-bottom));
    height: calc(100dvh - var(--nav-h) - 2px - env(safe-area-inset-bottom));
  }
  body[data-view="chats"][data-chat="thread"] .chat-pane {
    border: 0;
    border-radius: 0;
    background: rgba(28, 25, 40, .94);
    box-shadow: none;
  }
  body[data-view="chats"][data-chat="thread"] .toast { top: 1rem; bottom: auto; }
  .chat-head { padding-top: max(.5rem, env(safe-area-inset-top)); }
  .chat-scroll { padding-inline: .75rem; }
}
/* The pane's own width decides, not the screen's: two columns at ~1000px leave
   the conversation about as narrow as a phone. */
@container (max-width: 480px) {
  .chat-send { width: 48px; padding: 0; }
  .chat-send-label { display: none; }
  .chat-settings-label { display: none; }
  #chat-settings { width: 44px; padding: 0; }
  #chat-settings .px { width: 24px; height: 24px; }
}
@media (max-width: 720px) {
  .msg-line { max-width: 100%; }
}
@media (pointer: coarse), (max-width: 720px) {
  .msg-more { width: 44px; height: 44px; }
  .react::after { content: ""; position: absolute; inset: -7px -3px; }
  .msg-reacts { gap: .5rem; }
  .msg-meta .tiny { min-height: 44px; }
}

/* ——— Responsive ——— */
@media (min-width: 961px) {
  /* The bottom bar already carries transport and volume; the window keeps
     the seek line (one #seek, no duplicate). */
  body[data-view="player"] .now-meta .transport,
  body[data-view="player"] .now-meta .volume {
    display: none;
  }
  .progress-wrap {
    display: flex;
    flex-direction: column;
    margin: 2rem 0 1.3rem;
  }
  /* Nothing loaded: the bar is a placeholder, not a claim. */
  .progress-wrap:has(#seek:disabled) { opacity: .45; }
}

@media (max-width: 1180px) and (min-width: 961px) {
  /* Six controls (the room icon among them) must fit the 264px side column
     that is left at 961px next to the seek bar. */
  #mini-volume { width: 60px; min-width: 60px; }
  .mini-right { gap: .3rem; }
}

@media (min-width: 1181px) {
  body[data-view="player"] main { padding-bottom: 1.75rem; }
  .now-grid { height: calc(100vh - 3.5rem - var(--bar-h)); height: calc(100dvh - 3.5rem - var(--bar-h)); min-height: 500px; align-items: stretch; }
  .now-window { display: flex; flex-direction: column; }
  .now-stage { flex: 1; }
  .now-side { grid-template-rows: minmax(0, 1fr) auto; min-height: 0; }
  .queue-panel { display: flex; flex-direction: column; min-height: 0; }
  .playlist { flex: 1; max-height: none; min-height: 0; }
  .lyrics-box[open] .lyrics-text { max-height: 34vh; }
}

@media (max-width: 1180px) {
  .now-grid { grid-template-columns: minmax(0, 1fr); }
  .now-side { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}

@media (max-width: 960px) {
  :root { --gutter: 1rem; --nav-h: 68px; }
  .shell { display: block; }
  main { padding: 1.1rem var(--gutter) calc(var(--nav-h) + 6.5rem + env(safe-area-inset-bottom)); }
  .topbar {
    display: flex;
    padding: max(.75rem, env(safe-area-inset-top)) var(--gutter) .6rem;
    background: rgba(22, 19, 32, .6);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
  .rail {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 35;
    height: auto;
    padding: .4rem .15rem calc(.4rem + env(safe-area-inset-bottom));
    border-right: 0;
    border-top: 1px solid var(--line-strong);
    background: rgba(26, 22, 37, .9);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    backdrop-filter: blur(16px) saturate(1.2);
  }
  .rail-brand, .rail-tag, .rail-sys, .account-plate { display: none; }
  .tabs { flex-direction: row; gap: .1rem; }
  /* Six tabs: each is as wide as its label plus an equal share of the rest,
     so "Библиотека" is never cut and the shortest tab stays ~44px wide. */
  .tab {
    flex: 1 1 auto;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: .2rem;
    min-width: 0;
    min-height: 56px;
    padding: .35rem 0;
    font-size: .6875rem;
    text-align: center;
  }
  .tab .tab-label { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tab-badge { top: 0; right: auto; left: calc(50% + 10px); transform: none; }
  .tab .tab-num, .tab.active::after { display: none; }
  .tab .px { width: 24px; height: 24px; }
  body[data-view="player"] .mini-player { display: none; }
  .mini-player {
    position: fixed;
    left: .6rem;
    right: .6rem;
    bottom: calc(var(--nav-h) + .55rem + env(safe-area-inset-bottom));
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .6rem .5rem .55rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background:
      linear-gradient(180deg, rgba(48, 42, 64, .9), rgba(28, 25, 40, .92)) padding-box,
      var(--chrome-edge) border-box;
    box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .95);
    overflow: hidden;
  }
  .mini-player .disc--mini {
    --size: 44px;
  }
  .mini-left {
    flex: 1;
    min-width: 0;
  }
  #mini-dislike {
    display: none;
  }
  /* Volume and mute are hardware on a phone, so the room goes to ♥. */
  #mini-like {
    flex: none;
    width: 44px;
    height: 44px;
  }
  .mini-center {
    display: contents;
  }
  .mini-transport {
    display: contents;
  }
  #mini-shuffle,
  #mini-prev,
  .mini-repeat-slot,
  .mini-progress-row,
  .mini-right {
    display: none;
  }
  #mini-play,
  #mini-skip {
    display: flex;
    flex: none;
    width: 44px;
    height: 44px;
  }
  #mini-skip {
    border: 1px solid var(--line-strong);
    background: linear-gradient(180deg, var(--ink-3), var(--ink-2));
    color: var(--fg);
  }
  .mini-progress {
    display: block;
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: var(--seek-pct, 0%);
    background: var(--foil);
    pointer-events: none;
  }
  .toast { bottom: calc(var(--nav-h) + 5rem + env(safe-area-inset-bottom)); }
  .now-side { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .page-title { font-size: 1.75rem; }
  .home-hero { margin-bottom: 2rem; }
  .home-hero-body {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    padding: 1.4rem 1.2rem 1.3rem;
  }
  .home-copy h1 { padding-right: 64px; font-size: 1.8rem; }
  .home-copy > p:not(.readout) { padding-right: 56px; font-size: .92rem; margin: .7rem 0 .6rem; }
  .disc-slot { position: absolute; top: .6rem; right: -30px; margin: 0; }
  .disc--hero { --size: 100px; }
  .home-actions { margin-top: 1.2rem; gap: .5rem; }
  /* Wave on its own full-width line, library + shuffle sharing the next one. */
  .home-actions .btn { flex: 1 1 0; gap: .4rem; padding-inline: .55rem; }
  .home-actions .hero-play { flex-basis: 100%; }
  .page-head { gap: .6rem; margin-bottom: .6rem; }
  .now-stage {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 1.5rem;
    padding: 1.5rem 1.1rem 1.4rem;
  }
  .now-meta { width: 100%; }
  .disc--now { --size: min(70vw, 300px); }
  #title { font-size: 1.4rem; }
  .transport { justify-content: space-between; }
  .hint-keys, .hint-toggle { display: none; }
  .shelf-rail { margin-inline: calc(var(--gutter) * -1); }
  .shelf-nav { display: none; }
  .shelf-row {
    padding-inline: calc(var(--gutter) - .6rem);
    scroll-padding-inline: calc(var(--gutter) - .6rem);
    scroll-snap-type: x proximity;
  }
  .shelf-row > * { flex-basis: 148px; width: 148px; scroll-snap-align: start; }
  .card-heart { opacity: 1; top: .9rem; right: .9rem; }
  .seg {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .seg::-webkit-scrollbar { display: none; }
  .seg {
    -webkit-mask: linear-gradient(90deg, #000 calc(100% - 2.5rem), transparent);
    mask: linear-gradient(90deg, #000 calc(100% - 2.5rem), transparent);
  }
  .seg-btn:last-child { margin-right: 1.5rem; }
  .shelf-hint { display: none; }
  .seg-btn { flex: 1 0 auto; }
  /* Track rows on touch: only "Ещё" beside the duration; every action
     (labelled) unfolds into a wrapped line under the title. */
  .track-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "main dur more";
    gap: .45rem;
  }
  .track-row.open {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "main dur more" "panel panel panel";
    row-gap: .45rem;
  }
  .track-row .row-actions { display: none; }
  .track-row.open .row-actions {
    display: flex;
    justify-self: stretch;
    gap: .3rem;
    padding: 0 0 .3rem;
  }
  .track-row.open .row-actions .tiny { padding-inline: .55rem; gap: .3rem; }
  /* Search rows on a phone: the row itself plays, so only ♥ and "в плейлист"
     stay, and the title gets the width and two lines instead of a cut-off. */
  .search-row { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .search-row .dur { display: none; }
  .search-row .row-actions { gap: .1rem; }
  .search-row .row-actions [data-act="play"] { display: none; }
  .search-row .tiny.add-btn,
  .search-row .tiny.fav-btn { width: 44px; padding: 0; font-size: 0; gap: 0; }
  .search-text strong {
    display: -webkit-box;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.25;
  }
  /* Artist results are one compact row, so the songs start on the first screen. */
  #search-artists > * { flex-basis: 88px; width: 88px; }
  #search-artists .card-main { padding: .35rem .25rem .5rem; }
  #search-artists .cover { width: 64px; margin: 0 auto .35rem; }
  #add-form .add-row { flex-direction: row; }
  #add-form .add-hint { display: none; }
  #search-artists strong { font-size: .78rem; -webkit-line-clamp: 1; }
  .add-row { flex-direction: column; }
  .profile-inline-form { flex-direction: column; align-items: stretch; }
  .import-ways { grid-template-columns: 1fr; }
  .import-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lib-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .pl-hero-body {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.4rem 1.2rem;
  }
  .pl-cover-stage {
    width: 110px;
    height: 110px;
  }
  .pl-title {
    font-size: 1.6rem;
  }
  .pl-actions {
    width: 100%;
  }
  .pl-actions .btn {
    flex: 1 1 auto;
  }
  .pl-track-row {
    grid-template-columns: 1.5rem minmax(0, 1fr) auto;
    grid-template-areas: "num main more";
    gap: .45rem;
  }
  .pl-track-row.open {
    grid-template-columns: 1.5rem minmax(0, 1fr) auto;
    grid-template-areas: "num main more" ". panel panel";
  }
  .pl-track-row .dur { display: none; }
  .artist-hero-body {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.4rem 1.2rem;
    min-height: auto;
  }
  .artist-portrait-wrap {
    width: 128px;
    height: 128px;
  }
  .artist-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  .artist-stat {
    min-width: 0;
  }
  .artist-actions {
    width: 100%;
  }
  .artist-actions .btn,
  .artist-actions .chip {
    flex: 1 1 auto;
  }
}

/* Touch: every target is at least 44px. Where the picture must stay small
   (heart on a cover, text links) an invisible ::after grows the hit area. */
@media (pointer: coarse), (max-width: 720px) {
  .tiny { min-height: 44px; }
  .tiny.icon { width: 44px; }
  .icon-btn.sm { width: 44px; height: 44px; }
  .shelf-nav { width: 44px; height: 44px; }
  .text-link { display: inline-flex; align-items: center; min-height: 44px; padding-block: 0; }
  .card-heart::after { content: ""; position: absolute; inset: -6px; }
  .ytm-link { position: relative; }
  .ytm-link::after { content: ""; position: absolute; inset: -8px -4px; }
}

@media (min-width: 1800px) {
  :root { --rail-w: 260px; --gutter: 3rem; }
  main { max-width: 1680px; }
  .shelf-row > * { flex-basis: 200px; width: 200px; }
  .home-copy h1 { font-size: 3.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  body[data-state="play"] .atmos { animation: none; }
}
.disc--mini[data-disc="art"] .disc-label { background-size: cover; }

/* ——— Listening rooms ——— */
/* The room's live mark: the four-point spark. Foil only while sound plays
   (Foil Means Live); paused or waiting, it is flat Dust. */
.room-spark {
  flex: none;
  width: 16px;
  height: 16px;
  background: var(--fg-3);
  -webkit-mask: var(--star-uri) center / contain no-repeat;
  mask: var(--star-uri) center / contain no-repeat;
}
body[data-state="play"] .room-spark {
  background: var(--foil);
  filter: drop-shadow(0 0 5px rgba(200, 182, 255, .8));
  animation: disc-spin 6s linear infinite;
}

/* State strip of the player: a flat band under the window's title bar on
   «Сейчас» (no card inside the window), dark glass like the bar above it. */
.room-banner {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(19, 16, 28, .46), rgba(19, 16, 28, .26));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
  animation: room-in .2s var(--ease-out) both;
}
@keyframes room-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
.room-head { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .75rem; }
.room-head-text { display: flex; flex-direction: column; flex: 1 1 11rem; min-width: 0; gap: .05rem; }
.room-head-text strong {
  font-size: .94rem;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.room-head-text strong:focus-visible { outline-offset: 2px; border-radius: 6px; }
.room-head-text span {
  color: var(--fg-2);
  font-size: .8rem;
  font-variant-numeric: tabular-nums;
}
.room-head-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.room-members {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .5rem;
  margin: .65rem 0 0;
  padding: .65rem 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}
.room-member {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  max-width: 100%;
  padding: .2rem .65rem .2rem .25rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: .82rem;
}
.room-member--empty { padding: 0; border: 0; color: var(--fg-2); }
.room-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--ink-4), var(--ink-2));
  font-size: .6875rem;
  font-weight: 700;
  color: var(--fg-2);
}
.room-member-name { min-width: 0; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.room-member .status-tag { padding: .05rem .4rem; }
.room-note { margin: .6rem 0 0; color: var(--fg-2); font-size: .85rem; }
.room-error { margin: .6rem 0 0; color: var(--danger); font-size: .85rem; }
.room-resume { margin-top: .7rem; }
.room-start { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; margin-top: 1rem; }
.room-start .add-hint { flex: 1 1 14rem; min-width: 0; }
.room-queue-note { margin: 0; padding: 1.1rem 1rem 1.3rem; color: var(--fg-2); font-size: .9rem; }

/* Listener: the queue is the host's, so it stays out of the way. */
body[data-room="listener"] #playlist { display: none; }

/* Locked controls stay focusable (aria-disabled says why) and read as
   "not yours" by their dashed rim, not by fading out. */
body[data-room="listener"] :is(#btn-shuffle, #mini-shuffle, #btn-prev, #mini-prev, #btn-play, #mini-play, #btn-skip, #mini-skip, #btn-dislike, #mini-dislike).room-locked {
  border: 1px dashed rgba(236, 232, 244, .34);
  background: transparent;
  color: var(--fg-3);
  box-shadow: none;
  opacity: 1;
  cursor: not-allowed;
  transform: none;
}
body[data-room="listener"] :is(#btn-shuffle, #mini-shuffle, #btn-prev, #mini-prev, #btn-play, #mini-play, #btn-skip, #mini-skip, #btn-dislike, #mini-dislike).room-locked:hover {
  background: rgba(236, 232, 244, .05);
  color: var(--fg-2);
}
/* The bar only shows the host's position, but it must stay readable and move. */
body[data-room="listener"] #seek:disabled,
body[data-room="listener"] #mini-seek:disabled { opacity: 1; cursor: default; }
body[data-room="listener"] .progress-wrap:has(#seek:disabled) { opacity: 1; }
body[data-room="listener"] #seek::-webkit-slider-thumb { opacity: 0; }
body[data-room="listener"] #seek::-moz-range-thumb { opacity: 0; }
body[data-room="listener"] #mini-seek::-webkit-slider-thumb { opacity: 0; }
body[data-room="listener"] #mini-seek::-moz-range-thumb { opacity: 0; }

/* Panel: the room line under the artist, and the "together" icon. */
.mini-room {
  display: flex;
  align-items: center;
  gap: .4rem;
  min-width: 0;
  color: var(--fg-2);
  font-size: .78rem;
  line-height: 1.3;
}
.mini-room .room-spark { width: 11px; height: 11px; }
.mini-room > span:not(.room-spark) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mini-room-exit {
  position: relative;
  flex: none;
  padding: 0 .15rem;
  border: 0;
  background: none;
  color: var(--ice);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: .2em;
  transition: color .18s, text-decoration-color .18s;
}
.mini-room-exit::after { content: ""; position: absolute; inset: -8px -4px; }
.mini-room-exit:hover { color: var(--fg); text-decoration-color: currentColor; }
.mini-room-exit:focus-visible { outline-offset: 2px; border-radius: 6px; }
#mini-room[aria-pressed="true"] { color: var(--lilac); }
#mini-room[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: var(--lilac);
  -webkit-mask: var(--star-uri) center / contain no-repeat;
  mask: var(--star-uri) center / contain no-repeat;
  filter: drop-shadow(0 0 3px rgba(200, 182, 255, .8));
}

/* Friends: «Слушают сейчас». A row is a friend's room: cover, what plays, who. */
.room-row { grid-template-columns: 52px minmax(0, 1fr) auto; }
.room-row + .room-row::before { left: calc(52px + 1.35rem); }
.room-cover .cover { width: 52px; height: 52px; margin: 0; border-radius: 8px; }
.room-cover .cover.blank > span { font-size: 1.1rem; }
.room-who { display: block; }
.room-state { color: var(--gold); font-weight: 600; }
.room-row[data-playing="1"] .room-state { color: var(--mint); }
.room-eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  width: 12px;
  height: 11px;
  margin-right: .45rem;
  vertical-align: -1px;
}
.room-eq i {
  width: 3px;
  height: 11px;
  border-radius: 99px;
  background: var(--fg-3);
  transform: scaleY(.3);
  transform-origin: bottom;
}
.room-row[data-playing="1"] .room-eq i {
  background: var(--mint);
  animation: room-eq .9s ease-in-out infinite alternate;
}
.room-row[data-playing="1"] .room-eq i:nth-child(2) { animation-duration: .7s; animation-delay: -.3s; }
.room-row[data-playing="1"] .room-eq i:nth-child(3) { animation-duration: .8s; animation-delay: -.55s; }
@keyframes room-eq {
  from { transform: scaleY(.28); }
  to { transform: scaleY(1); }
}
@media (prefers-reduced-motion: reduce) {
  .room-row[data-playing="1"] .room-eq i { animation: none; }
  .room-eq i:nth-child(1) { transform: scaleY(.55); }
  .room-eq i:nth-child(2) { transform: scaleY(1); }
  .room-eq i:nth-child(3) { transform: scaleY(.75); }
  body[data-state="play"] .room-spark { animation: none; }
}

@media (max-width: 960px) {
  /* The phone pill has no room for a button: the line only says where you are. */
  .mini-room-exit { display: none; }
}
@media (max-width: 720px) {
  .room-banner { padding: .75rem; }
  .room-head-actions { width: 100%; }
  .room-head-actions .tiny { flex: 1 1 auto; }
  .room-resume { width: 100%; }
  .room-row.fr-row--pair { grid-template-columns: 52px minmax(0, 1fr); }
}
@media (pointer: coarse), (max-width: 720px) {
  .room-start .btn { min-height: 44px; }
}
