/* =====================================================================================================================
   Tutti — core styles (fe-shell). DESIGN v2 "de-slop": content sits directly on a warm near-black background; glass
   only on chrome that floats over content (player bar, mini player, tab bar, scrolled top bar, sheets, menus, dialogs,
   toasts); coral #D97757 with restraint (round play button, current track, progress fill, liked heart, focus ring).
   One system UI family on a tight scale (12/13/14/16/20/28/40); the serif appears only in the «Tutti» wordmark.

   Classes guaranteed for views (add your own v-* classes in views.css):
     .page (position: relative; side gutter, max width)  .page-pad  .page-center  .section .section-head .section-title
     .section-tools .section-more  .muted  .row  .sr-only  .selectable (lets the user select text)
     .kicker / .pill  plain sentence-case muted text (eyebrow labels are banned; kept only so old markup stays quiet)
     .btn (+ .btn-primary white, .btn-outline, .btn-ghost, .btn-danger; .btn-sm / .btn-lg / .btn-block)
     .btn-icon (40 px round, borderless; .btn-sm 32 / .btn-lg 48)   .btn-play  coral round play button (one per header)
     .chips > .chip (filter pills)   .tabs-inline (segmented control)   .input .field .field-label .field-hint
     .field-error .form-error .switch   .badge (.badge-ok/.badge-bad/.badge-warn)   .progress   .spinner .loading
     .avatar-letter   .empty   .grid  .shelf  .tile  .track-list .track-row .track-head   .page-header
     .tint-wash (cover-coloured fade behind a header, filled by the shell)   .wordmark
     .q-pill (+ .q-pill-lg) quality badge «Супер» / «Студия» (ui.qualityPill)   .tr-heart tiny coral heart of a liked row
   Phones (≤ 600 px, OWNER-17): controls ≥ 44×44, body 15–16 px, secondary ≥ 13–14 px, rows ≥ 64 px with only a ⋯.
   Waiting states MOVE (owner 2026-11-17: «пока трек грузится — будто зависает, надо анимацию»): a ring around play,
   a sweep on the hairline, a soft pulse on rows; covers stay static («оставь статику» was about covers).
   Tokens: --bg --bg-2 --surface --surface-2 --fg --fg-2 --fg-3 --fg-4 --fg-5 --line --line-2 --line-strong --hover
           --press --accent --accent-hover --accent-press --accent-soft --on-accent --ok --bad --warn
           --glass --glass-2 --glass-3 --blur --r-sm 6 --r-md 8 --r-lg 12 --r-pill --font --font-serif --dur --ease-out
           --gutter --main-pt (height of the fixed top bar area)
   ===================================================================================================================== */

:root {
  color-scheme: dark;
  --bg: #0c0b0d;
  --bg-2: #131215;
  --surface: #1b1a1d;
  --surface-2: #252328;
  --fg: #f3f1ee;
  --fg-2: rgba(243, 241, 238, .74);
  --fg-3: rgba(243, 241, 238, .60);
  --fg-4: rgba(243, 241, 238, .50);
  --fg-5: rgba(243, 241, 238, .32);
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --line-strong: rgba(255, 255, 255, .30);
  --hover: rgba(255, 255, 255, .06);
  --press: rgba(255, 255, 255, .10);
  --accent: #d97757;
  --accent-hover: #e2876a;
  --accent-press: #c4674a;
  --accent-soft: rgba(217, 119, 87, .16);
  --on-accent: #1c100c;
  --ok: #4cc38a;
  --bad: #f2726b;
  --warn: #e8b85c;
  /* glass = only for chrome that floats over content */
  --glass: rgba(24, 23, 26, .74);
  --glass-2: rgba(34, 32, 37, .88);
  --glass-3: rgba(42, 40, 45, .94);
  --blur: blur(24px) saturate(170%);
  --shadow-float: 0 10px 30px rgba(0, 0, 0, .42);
  --shadow-cover: 0 8px 24px rgba(0, 0, 0, .38);
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-pill: 999px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: ui-serif, "New York", "Iowan Old Style", "Charter", Georgia, serif;
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --dur: 200ms;
  --focus: var(--accent);
  --gutter: 16px;
  --sidebar-w: 248px;
  --bar-h: 80px;
  --mini-h: 72px; /* OWNER-29: the mini player grew from 64 to 72 px («мелкая снизу полоска с музыкой») */
  --tab-h: 56px; /* OWNER-17: tab bar 56 px + safe area */
  --top-h: 52px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --main-pt: calc(var(--top-h) + var(--safe-t));
  /* legacy names still read by views.css */
  --ink: #0c0b0d;
  --r-panel: 12px;
  --r-inner: 8px;
}

/* ------------------------------------------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
  overscroll-behavior: none;
  touch-action: manipulation; /* no double-tap zoom */
  scrollbar-color: rgba(255, 255, 255, .18) transparent;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.4 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior: none;
  overflow-x: hidden;
}
/* text selection only where it is useful */
input, textarea { caret-color: var(--accent); }
input, textarea, [contenteditable="true"], .lyrics, .selectable {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}
body.np-open, body.has-overlay { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
img { max-width: 100%; -webkit-user-drag: none; }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -.012em; line-height: 1.2; text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: rgba(217, 119, 87, .36); color: #fff; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border-radius: 12px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
.noscript { padding: 40px 20px; text-align: center; color: var(--fg-2); }

.icon {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  vertical-align: middle;
}
.icon-fill { fill: currentColor; }
.spin { animation: spin .9s linear infinite; }

/* ------------------------------------------------------------------------------------------------ layout primitives */

.page { position: relative; z-index: 0; width: 100%; max-width: 1600px; margin: 0 auto; padding: 8px var(--gutter) 40px; }
.page-pad { padding-left: var(--gutter); padding-right: var(--gutter); }
.page-center { min-height: 56vh; display: flex; align-items: center; justify-content: center; }
.section { margin-top: 32px; }
.section:first-child { margin-top: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; margin-bottom: 12px; }
.section-title { margin: 0; min-width: 0; font-size: 20px; font-weight: 700; letter-spacing: -.012em; line-height: 1.25; }
.section-tools { display: flex; align-items: center; gap: 4px; flex: none; }
.section-more { padding: 4px 2px; font-size: 14px; font-weight: 600; color: var(--fg-3); transition: color var(--dur) var(--ease-out); }
.kicker { font-size: 13px; font-weight: 500; line-height: 1.4; letter-spacing: 0; text-transform: none; color: var(--fg-3); }
.muted { color: var(--fg-3); }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.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; }

/* ------------------------------------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--r-md);
  border: 1px solid var(--line-2); background: transparent; color: var(--fg);
  font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap; text-decoration: none;
  transition: background-color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out),
    opacity var(--dur) var(--ease-out), transform 120ms var(--ease-out);
}
.btn:active { transform: scale(.97); background-color: var(--press); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn .icon { width: 18px; height: 18px; margin-left: -2px; }
.btn-primary { background: var(--fg); color: var(--bg); border-color: transparent; }
.btn-primary:active { background: #e4e1dd; }
.btn-outline { background: transparent; border-color: var(--line-2); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--fg-2); }
.btn-danger { background: rgba(242, 114, 107, .12); border-color: transparent; color: #ff9d95; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: var(--r-sm); }
.btn-sm .icon { width: 16px; height: 16px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 16px; }
.btn-block { width: 100%; }

.btn-icon {
  position: relative; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0; border-radius: 50%;
  border: 0; background: transparent; color: var(--fg-2);
  transition: color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out), transform 120ms var(--ease-out);
}
.btn-icon:active { transform: scale(.92); background-color: var(--press); }
.btn-icon:disabled { opacity: .4; pointer-events: none; }
.btn-icon .icon { width: 22px; height: 22px; }
.btn-icon.btn-sm { width: 32px; height: 32px; }
.btn-icon.btn-sm .icon { width: 18px; height: 18px; }
.btn-icon.btn-lg { width: 48px; height: 48px; }
.btn-icon.btn-lg .icon { width: 24px; height: 24px; }
.btn-icon.on, .btn-icon.is-on, .btn-icon[aria-pressed="true"] { color: var(--fg); }
.btn-icon.like-btn.on, .btn-icon[data-like-id].on { color: var(--accent); }
/* a toggled player mode (shuffle / repeat) gets a small dot under the icon */
.p-icon.is-on::after, .btn-icon.is-on::after {
  content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: currentColor;
}

.btn-play {
  position: relative; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; padding: 0; border: 0; border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
  transition: background-color var(--dur) var(--ease-out), transform 120ms var(--ease-out);
}
.btn-play:active { transform: scale(.95); background: var(--accent-press); }
.btn-play .icon { width: 24px; height: 24px; }
.btn-play .icon-play { margin-left: 2px; }
.btn-play.btn-sm { width: 44px; height: 44px; }
.btn-play.btn-sm .icon { width: 20px; height: 20px; }
.btn-play.btn-lg { width: 64px; height: 64px; }
.btn-play.btn-lg .icon { width: 28px; height: 28px; }
.btn-play:disabled { opacity: .5; pointer-events: none; }

.link-btn {
  border: 0; background: none; padding: 2px 2px; color: var(--fg); font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(243, 241, 238, .35);
  transition: text-decoration-color var(--dur) var(--ease-out);
}

/* ------------------------------------------------------------------------------------------------ chips & segmented control */

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 36px; padding: 0 16px; border-radius: var(--r-pill);
  border: 0; background: var(--surface-2); color: var(--fg);
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out), transform 120ms var(--ease-out);
}
.chip:active { transform: scale(.97); }
.chip .icon { width: 16px; height: 16px; }
.chip.on, .chip[aria-pressed="true"], .chip[aria-selected="true"] { background: var(--fg); color: var(--bg); }

.tabs-inline {
  display: inline-flex; gap: 2px; padding: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none;
  border-radius: var(--r-md); background: rgba(255, 255, 255, .08);
}
.tabs-inline::-webkit-scrollbar { display: none; }
.tabs-inline > button, .tabs-inline > a {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 1 0 auto;
  height: 30px; padding: 0 16px; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--fg-2); font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}
.tabs-inline > .on, .tabs-inline > .active, .tabs-inline > [aria-selected="true"], .tabs-inline > [aria-current="page"] {
  background: rgba(255, 255, 255, .2); color: var(--fg); box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}

/* ------------------------------------------------------------------------------------------------ forms */

.input {
  display: block; width: 100%; height: 44px; padding: 0 14px;
  border-radius: var(--r-sm); border: 1px solid transparent;
  background: var(--surface); color: var(--fg); font-size: 16px; /* < 16px makes iOS zoom in on focus */
  transition: border-color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
  -webkit-appearance: none; appearance: none;
}
.input::placeholder { color: var(--fg-4); }
.input:focus, .input:focus-visible { outline: none; border-color: rgba(217, 119, 87, .9); background-color: #1e1d21; box-shadow: 0 0 0 3px rgba(217, 119, 87, .2); }
.input[aria-invalid="true"], .input.is-invalid { border-color: rgba(242, 114, 107, .75); }
textarea.input { height: auto; min-height: 96px; padding: 10px 14px; resize: vertical; line-height: 1.5; }
select.input {
  padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f3f1ee' stroke-opacity='.6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
select.input option { background: #1b1a1d; color: var(--fg); }
.field { display: block; }
.field-label { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--fg-2); }
.field-hint { margin: 6px 0 0; font-size: 13px; color: var(--fg-3); }
.field-error { margin: 6px 0 0; font-size: 13px; color: #ff9d95; }
.field-error:empty { display: none; }
.form-error { margin: 0; padding: 10px 12px; border-radius: var(--r-sm); font-size: 14px; color: #ffb5ae; background: rgba(242, 114, 107, .1); }
.form-error:empty { display: none; }
.pw-wrap, .secret-wrap { position: relative; }
.pw-wrap .input, .secret-wrap .input { padding-right: 48px; }
.pw-eye, .secret-eye {
  position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--fg-3);
  transition: color var(--dur) var(--ease-out);
}
.pw-eye .icon, .secret-eye .icon { width: 20px; height: 20px; }
.pw-eye[aria-pressed="true"] { color: var(--fg); }
.switch {
  -webkit-appearance: none; appearance: none; position: relative; flex: none; margin: 0;
  width: 44px; height: 26px; border-radius: 13px; cursor: pointer;
  background: rgba(255, 255, 255, .16); border: 0; transition: background-color var(--dur) var(--ease-out);
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: transform var(--dur) var(--ease-out);
}
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(18px); }
.switch:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ------------------------------------------------------------------------------------------------ small things */

.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px;
  border-radius: var(--r-sm); background: rgba(255, 255, 255, .08); color: var(--fg-2);
  font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; white-space: nowrap;
}
.badge .icon { width: 12px; height: 12px; }
.badge-ok { color: #84dcb0; background: rgba(76, 195, 138, .13); }
.badge-bad { color: #ffa7a0; background: rgba(242, 114, 107, .14); }
.badge-warn { color: #f0cd85; background: rgba(232, 184, 92, .13); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; width: fit-content;
  font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--fg-3); white-space: nowrap;
}
.pill .icon { width: 14px; height: 14px; }
.progress { position: relative; width: 100%; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.progress > span, .progress > i, .progress > .progress-fill {
  display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; background: var(--accent); transition: width .3s var(--ease-out);
}
progress.progress { -webkit-appearance: none; appearance: none; border: 0; display: block; }
progress.progress::-webkit-progress-bar { background: rgba(255, 255, 255, .14); border-radius: 2px; }
progress.progress::-webkit-progress-value { background: var(--accent); border-radius: 2px; }
progress.progress::-moz-progress-bar { background: var(--accent); border-radius: 2px; }
/* waiting mark: three quiet static dots «…» (the owner asked for waiting states without animation) */
.spinner {
  --dot: 6px;
  display: inline-block; flex: none; width: calc(var(--dot) * 4.5); height: var(--dot); color: var(--fg-3);
  background: radial-gradient(circle closest-side, currentColor 92%, transparent) 0 0 / calc(var(--dot) * 1.5) var(--dot) repeat-x;
}
.spinner-sm { --dot: 5px; }
.spinner-dark { color: rgba(12, 11, 13, .55); }
.loading { display: flex; align-items: center; justify-content: center; padding: 48px 0; }
.avatar-letter {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface-2); color: var(--fg); font-size: 16px; font-weight: 600; line-height: 1;
}
.avatar-lg { width: 48px; height: 48px; font-size: 20px; }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 40px 16px; }
.empty-icon { display: flex; color: var(--fg-4); margin-bottom: 6px; }
.empty-icon .icon { width: 32px; height: 32px; stroke-width: 1.6; }
.empty-title { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.empty-text { margin: 0; max-width: 36ch; color: var(--fg-3); font-size: 14px; line-height: 1.5; }
.empty-action { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* skeletons are static (owner: no animation in waiting states) */
.sk { border-radius: var(--r-sm); background: var(--surface); }
.sk-cover { width: 48px; height: 48px; flex: none; }
.sk-line { height: 12px; margin: 6px 0; }
.sk-sm { height: 10px; }

/* ------------------------------------------------------------------------------------------------ covers */

.cover { display: block; flex: none; object-fit: cover; background: var(--surface); border-radius: var(--r-md); color: transparent; -webkit-user-drag: none; }
.cover-s { width: 48px; height: 48px; border-radius: var(--r-sm); }
.cover-m { width: 64px; height: 64px; }
.cover-l { width: 100%; height: auto; aspect-ratio: 1; }
.cover-xl { width: 232px; height: 232px; }
.cover.round { border-radius: 50%; }
.liked-cover { display: flex; align-items: center; justify-content: center; color: var(--accent); background: #2b1c17; }
.liked-cover .icon { width: 38%; height: 38%; fill: currentColor; }
.cover-s.liked-cover .icon { width: 20px; height: 20px; }

/* ------------------------------------------------------------------------------------------------ tiles, grid, shelf */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(144px, 1fr)); gap: 20px 14px; }
.shelf {
  display: grid; grid-auto-flow: column; grid-auto-columns: 144px; gap: 14px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.shelf::-webkit-scrollbar { display: none; }
.shelf > * { scroll-snap-align: start; }
.page .shelf, .page-pad .shelf {
  margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter));
  padding-left: var(--gutter); padding-right: var(--gutter); scroll-padding: 0 var(--gutter);
}
.shelf-nav {
  display: none; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: 50%; background: var(--surface-2); color: var(--fg-2);
  transition: color var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.shelf-nav .icon { width: 18px; height: 18px; }
.at-start .shelf-nav[data-dir="-1"], .at-end .shelf-nav[data-dir="1"] { opacity: .35; pointer-events: none; }

.tile { position: relative; min-width: 0; }
.tile-art { position: relative; aspect-ratio: 1; margin-bottom: 8px; border-radius: var(--r-md); }
/* press feedback scales the picture only: a transform on .tile-art would put its play button under the tile link's
   overlay while pressed, and a tap on «pause» would open the page instead */
.tile-art .cover { width: 100%; height: 100%; transition: transform 150ms var(--ease-out); }
.tile-artist { text-align: center; }
.tile-artist .tile-sub { display: none; } /* OWNER-29: artist circles show the name only, inside the photo's width */
.tile-artist .tile-art, .tile-artist .tile-art .cover { border-radius: 50%; }
.tile-link { display: block; color: inherit; }
.tile-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--r-md); }
.tile-link:focus-visible { outline: none; }
.tile-link:focus-visible::after { outline: 2px solid var(--focus); outline-offset: 3px; }
.tile-title { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-sub { margin-top: 2px; font-size: 13px; line-height: 1.35; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-sub.is-reason { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.tile-play {
  position: absolute; right: 8px; bottom: 8px; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 16px rgba(0, 0, 0, .4);
  opacity: 0; transition: opacity var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out), transform 120ms var(--ease-out);
}
.tile-play:active { transform: scale(.94); }
.tile-play .icon { width: 20px; height: 20px; }
.tile-play .icon-play { margin-left: 2px; }
.tile-artist .tile-play { right: 6%; bottom: 6%; }
.tile:focus-within .tile-play, .tile.is-current .tile-play { opacity: 1; }
/* the list behind the tile is loading: a quiet, static dimmed icon */
.tile-play.is-loading .icon { opacity: .35; }
/* OWNER-23: its track is being prepared — a static ring filled to the server's percent (refreshed about once a second) */
.tile-play.is-preparing { opacity: 1; }
.tile-play.is-preparing::before {
  content: ""; position: absolute; inset: 4px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(var(--on-accent) var(--prep, 0%), rgba(28, 16, 12, .22) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
}
.tile-play.is-preparing .icon { width: 16px; height: 16px; }
.tile.is-current .tile-title { color: var(--accent); }
.tile:active .tile-art > .cover { transform: scale(.97); }
@media (hover: hover) {
  .tile:hover .tile-play { opacity: 1; }
}

/* ------------------------------------------------------------------------------------------------ track list (table-like rows) */

.track-list { display: flex; flex-direction: column; }
.track-list:empty { display: none; }
.track-head { display: none; }
.track-row {
  position: relative; display: flex; align-items: center; gap: 12px; min-width: 0;
  min-height: 60px; margin: 0 -8px; padding: 6px 4px 6px 8px;
  border-radius: var(--r-sm); cursor: pointer;
  transition: background-color 150ms var(--ease-out);
}
.track-row:active:not(.skeleton) { background-color: var(--press); }
.track-row:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.track-row.skeleton { cursor: default; }
.tr-index {
  position: relative; flex: none; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-3); font-size: 14px; font-variant-numeric: tabular-nums;
}
.tr-hover-play, .tr-index .eq { display: none; }
.tr-hover-play .icon { width: 16px; height: 16px; color: var(--fg); fill: currentColor; }
.track-row.is-current .tr-num, .track-row.is-current .tr-hover-play { display: none; }
.track-row.is-current .tr-index .eq { display: inline-flex; }
.tr-art { position: relative; flex: none; width: 48px; height: 48px; border-radius: var(--r-sm); overflow: hidden; background: var(--surface); }
.tr-art .cover { width: 100%; height: 100%; border-radius: inherit; }
.tr-art-eq { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(12, 11, 13, .55); }
.track-row.is-current .tr-art-eq { display: flex; }
.tr-main { flex: 1 1 auto; min-width: 0; }
/* title line: the name (ellipsis), then the tiny liked heart and the «цензура» marker that never get cut off */
.tr-title {
  display: flex; align-items: center; gap: 6px; min-width: 0;
  font-size: 16px; font-weight: 400; line-height: 1.3; color: var(--fg);
}
.tr-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-row.is-current .tr-title { color: var(--accent); }
.tr-sub { display: flex; align-items: center; gap: 6px; min-width: 0; margin-top: 2px; font-size: 14px; line-height: 1.3; color: var(--fg-3); }
/* a small muted marker next to a title (e.g. «цензура», OWNER-5) */
.tr-tag {
  display: inline; margin-left: 6px; padding: 0; border: 0;
  font-size: 13px; font-weight: 400; color: var(--fg-3); vertical-align: baseline; letter-spacing: 0;
}
.tr-title .tr-tag { flex: none; margin-left: 0; }
.np-title .tr-tag { font-size: 13px; }
/* liked track: a tiny coral heart after the title where the row has no ♥ button (phones, OWNER-17) */
.tr-heart { display: none; flex: none; align-items: center; color: var(--accent); }
.tr-heart .icon { width: 13px; height: 13px; }
/* quality tier (OWNER-18): compact «Супер» / «Студия» with a coral outline; never codec names */
.q-pill {
  flex: none; display: inline-flex; align-items: center; height: 18px; padding: 0 5px;
  border: 1px solid rgba(217, 119, 87, .7); border-radius: 4px;
  color: var(--accent); font-size: 12px; font-weight: 600; line-height: 1; letter-spacing: 0; white-space: nowrap;
}
.q-pill-lg { height: 24px; padding: 0 9px; border-radius: var(--r-sm); font-size: 13px; box-shadow: 0 0 12px rgba(217, 119, 87, .22); }
/* UX-8: on touch the whole row plays; artist/album stay one tap away in ⋯ (links remain on desktop) */
@media (hover: none) {
  .track-row .tr-sub a, .track-row .tr-album a { pointer-events: none; }
}
.tr-artist { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* legacy markup from older builders: never shown */
.tr-cloud, .tr-q { display: none !important; }
.tr-album { display: none; flex: 0 0 28%; min-width: 0; font-size: 14px; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-like, .tr-more {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--fg-3);
  transition: color var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out), transform 120ms var(--ease-out);
}
.tr-like:active, .tr-more:active { transform: scale(.9); }
.tr-like .icon, .tr-more .icon { width: 20px; height: 20px; }
.tr-like.on { color: var(--accent); }
.tr-dur { display: none; flex: none; width: 52px; text-align: right; font-size: 14px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.track-row.is-failed .tr-main, .track-row.is-failed .tr-art { opacity: .45; }
/* a track the server is getting right now: a quiet, static dimmed cover / number (no spinner, owner's wish) */
.track-row.is-preparing .tr-art .cover { opacity: .45; }
.track-row.is-preparing:not(.has-cover) .tr-num { opacity: .45; }
@media (hover: hover) {
  .track-row:not(.skeleton):hover { background-color: var(--hover); }
  .track-row:hover .tr-num { display: none; }
  .track-row:not(.is-current):hover .tr-hover-play { display: inline-flex; }
  .track-row.is-preparing:hover .tr-hover-play { display: none; }
  .tr-like:not(.on), .tr-more { opacity: 0; }
  .track-row:hover .tr-like, .track-row:hover .tr-more, .track-row:focus-within .tr-like, .track-row:focus-within .tr-more { opacity: 1; }
}

/* «now playing» equalizer */
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; flex: none; }
.eq i { display: block; width: 3px; height: 100%; border-radius: 1px; background: var(--accent); transform-origin: bottom; }
.eq i:nth-child(1) { transform: scaleY(.5); }
.eq i:nth-child(2) { transform: scaleY(.9); }
.eq i:nth-child(3) { transform: scaleY(.65); }
body.is-playing .eq i { animation: eq 1.05s ease-in-out infinite; }
body.is-playing .eq i:nth-child(2) { animation-delay: -.45s; }
body.is-playing .eq i:nth-child(3) { animation-delay: -.8s; }

/* ------------------------------------------------------------------------------------------------ page header + cover tint */

/* Cover-coloured fade behind a header (ui.tintWash / pageHeader). Starts under the top bar, fades out over ~400 px. */
.tint-wash {
  position: absolute; z-index: -1; left: 0; right: 0; top: calc(-1 * var(--main-pt));
  height: calc(var(--main-pt) + 420px); pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, var(--tint, transparent) 0%, transparent 100%);
  transition: opacity 250ms var(--ease-out);
}
.tint-wash.is-tinted { opacity: 1; }
@supports (background: color-mix(in srgb, red 50%, transparent)) {
  .tint-wash {
    background: linear-gradient(180deg, var(--tint, transparent) 0%, color-mix(in srgb, var(--tint, transparent) 50%, transparent) 50%, transparent 100%);
  }
}

.page-header { position: relative; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 8px 0 20px; }
.ph-cover .cover { width: min(62vw, 240px); height: auto; aspect-ratio: 1; box-shadow: var(--shadow-cover); }
.page-header.is-round .ph-cover .cover { border-radius: 50%; }
.ph-text { width: 100%; min-width: 0; }
.ph-title { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -.015em; line-height: 1.15; overflow-wrap: anywhere; }
.ph-sub { margin-top: 6px; color: var(--fg); font-size: 14px; font-weight: 600; line-height: 1.4; }
.ph-meta { margin-top: 4px; color: var(--fg-3); font-size: 13px; line-height: 1.4; }
.ph-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; width: 100%; margin-top: 4px; }
.page-header.no-cover { align-items: flex-start; }
.page-header .tint-wash { left: calc(-1 * var(--gutter)); right: calc(-1 * var(--gutter)); top: calc(-1 * var(--main-pt) - 8px); }
.ph-title-long { font-size: 20px; }

/* ------------------------------------------------------------------------------------------------ wordmark */

.wordmark {
  display: inline-block; height: 1em; width: auto; font-size: 24px; vertical-align: middle;
  color: #F6F1E9; overflow: visible; flex: none;
}

/* ------------------------------------------------------------------------------------------------ app shell */

.boot { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.boot .wordmark { font-size: 40px; opacity: 0; animation: fade-in .5s var(--ease-out) .2s forwards; }
.app { min-height: 100vh; min-height: 100dvh; }
.main {
  display: block; min-height: 100vh; min-height: 100dvh; overflow-x: clip;
  padding-top: var(--main-pt); padding-bottom: calc(var(--tab-h) + var(--safe-b) + 24px);
}
body.has-player .main { padding-bottom: calc(var(--tab-h) + var(--safe-b) + var(--mini-h) + 40px); }
.main:focus { outline: none; }
.view-host { min-height: 50vh; }
/* a screen's code is still loading: a static skeleton that appears after .35 s (no fade, nothing moves) */
.view-loading { opacity: 0; animation: appear 0s linear .35s forwards; }
.view-sk-title { width: 46%; height: 28px; margin: 8px 0 24px; }

/* sidebar (desktop) */
.sidebar { display: none; }
.side-brand { display: flex; align-items: center; height: 44px; padding: 0 12px; margin-bottom: 12px; border-radius: var(--r-sm); }
.side-brand .wordmark { font-size: 28px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a, .side-admin {
  display: flex; align-items: center; gap: 14px; height: 40px; padding: 0 12px; border-radius: var(--r-sm);
  color: var(--fg-2); font-size: 14px; font-weight: 600;
  transition: color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.side-nav a.on, .side-admin.on { color: var(--fg); background: rgba(255, 255, 255, .08); }
.side-nav .icon, .side-admin .icon { width: 22px; height: 22px; }
body:not(.is-admin) .side-admin { display: none; }
.side-lib { flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: 24px; }
.side-lib-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px 6px 12px; }
.side-lib-title { font-size: 13px; font-weight: 600; color: var(--fg-3); }
.side-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 2px 0 12px; scrollbar-width: thin; }
.side-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: var(--r-sm); transition: background-color 150ms var(--ease-out); }
.side-item.on { background: rgba(255, 255, 255, .08); }
.side-item .cover { width: 40px; height: 40px; border-radius: var(--r-sm); }
.side-text { flex: 1; min-width: 0; }
.side-name { display: block; font-size: 14px; font-weight: 500; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-sub { display: block; margin-top: 1px; font-size: 13px; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-eq { display: none; flex: none; padding-right: 4px; }
.side-item.is-playing-ctx .side-eq { display: inline-flex; }
.side-item.is-playing-ctx .side-name { color: var(--accent); }
.side-admin { margin-top: 8px; flex: none; }

/* top bar */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; gap: 4px;
  height: var(--main-pt); padding: var(--safe-t) 8px 0;
  border-bottom: 1px solid transparent;
  transition: background-color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.topbar.is-scrolled {
  background-color: rgba(18, 17, 20, .82); border-bottom-color: var(--line);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.top-fwd { display: none; }
body.is-root .top-back { display: none; }
.top-brand { display: none; align-items: center; height: 44px; padding: 0 8px; }
.top-brand .wordmark { font-size: 24px; }
body.is-root .top-brand { display: flex; }
.top-title {
  flex: 1; min-width: 0; text-align: center; font-size: 16px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity var(--dur) var(--ease-out);
}
.topbar.is-scrolled .top-title { opacity: 1; }
body.is-root .top-title { visibility: hidden; }
.avatar-btn {
  flex: none; margin-left: auto; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent;
  transition: transform 120ms var(--ease-out);
}
.avatar-btn:active { transform: scale(.94); }
.avatar-btn .avatar-letter { width: 32px; height: 32px; font-size: 14px; transition: background-color var(--dur) var(--ease-out); }

/* tab bar (mobile) */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(3, 1fr);
  height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background-color: var(--glass); border-top: 1px solid var(--line);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--fg-3); font-size: 13px; font-weight: 500; line-height: 1.15; transition: color var(--dur) var(--ease-out);
}
.tabbar a.on { color: var(--fg); }
.tabbar .icon { width: 26px; height: 26px; transition: transform 120ms var(--ease-out); }
.tabbar a:active .icon { transform: scale(.9); }

/* ------------------------------------------------------------------------------------------------ player: mini (mobile) */

/* OWNER-29: 72 px, 52 px cover, title 16 / artists 14 px, a 44 px ♥ and ONE 48 px play/pause, hairline progress on
   top; tap / swipe up opens the full-screen player (player.js). touch-action none: a swipe never scrolls the page. */
.mini {
  position: fixed; left: 8px; right: 8px; z-index: 41;
  bottom: calc(var(--tab-h) + var(--safe-b) + 8px);
  border-radius: var(--r-lg); overflow: hidden; touch-action: none;
  background-color: rgba(38, 36, 41, .9);
  box-shadow: var(--shadow-float);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  transition: background-color 250ms var(--ease-out);
}
@supports (background: color-mix(in srgb, red 50%, transparent)) {
  .player-root.is-tinted .mini { background-color: color-mix(in srgb, var(--tint) 78%, rgba(18, 17, 20, .7)); }
}
.mini-in { display: flex; align-items: center; gap: 2px; height: var(--mini-h); padding: 0 6px 0 10px; }
.mini-main {
  flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; gap: 12px; padding: 0;
  border: 0; background: transparent; text-align: left;
}
/* flex: none — a long title must never squeeze the cover (img max-width: 100% would let the wrapper shrink) */
.mini-art, .np-mini-main > [data-art] { flex: none; }
.mini-art .cover { width: 52px; height: 52px; border-radius: var(--r-sm); }
.mini-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mini-title { font-size: 16px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-sub { font-size: 14px; line-height: 1.25; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.mini-play {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--fg);
  transition: transform 120ms var(--ease-out), color var(--dur) var(--ease-out);
}
.mini-play .icon { width: 28px; height: 28px; }
.mini-play:active { transform: scale(.9); }
.mini-like {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--fg-2);
  transition: transform 120ms var(--ease-out), color var(--dur) var(--ease-out);
}
.mini-like .icon { width: 24px; height: 24px; }
.mini-like:active { transform: scale(.9); }
.mini-progress { position: absolute; z-index: 1; left: 12px; right: 12px; top: 0; height: 2px; border-radius: 1px; background: rgba(255, 255, 255, .14); overflow: hidden; pointer-events: none; }
.mini-progress i { display: block; height: 100%; background: var(--accent); transform-origin: left center; transform: scaleX(0); }
/* while the track is being prepared the hairline shows the preparing percent: static, a little dimmer */
.player-root.has-prep .mini-progress i { opacity: .55; }
.like-btn.on { color: var(--accent); }

/* ------------------------------------------------------------------------------------------------ player: bar (desktop) */

.pbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: none; grid-template-columns: minmax(200px, 1fr) minmax(360px, 620px) minmax(200px, 1fr); align-items: center; gap: 16px;
  height: var(--bar-h); padding: 0 16px;
  background-color: var(--glass); border-top: 1px solid var(--line);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.pbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pbar-art { position: relative; flex: none; width: 56px; height: 56px; padding: 0; border: 0; border-radius: var(--r-sm); overflow: hidden; background: var(--surface); }
.pbar-art .cover { width: 100%; height: 100%; border-radius: inherit; }
.pbar-art-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .5); color: #fff; opacity: 0; transition: opacity var(--dur) var(--ease-out); }
.pbar-art:focus-visible .pbar-art-hint { opacity: 1; }
.pbar-text { min-width: 0; }
.pbar-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbar-sub { margin-top: 2px; font-size: 13px; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbar-center { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.pbar-controls { display: flex; align-items: center; gap: 10px; }
.p-icon {
  position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--fg-2);
  transition: color var(--dur) var(--ease-out), transform 120ms var(--ease-out);
}
.p-icon:active { transform: scale(.9); }
.p-icon.is-on { color: var(--fg); }
.p-icon.like-btn.on { color: var(--accent); }
.p-icon .icon { width: 20px; height: 20px; }
.play-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%;
  background: var(--fg); color: var(--bg); transition: transform 120ms var(--ease-out), background-color var(--dur) var(--ease-out);
}
.play-btn:active { transform: scale(.92); }
.play-btn .icon { width: 18px; height: 18px; }
.play-btn .icon-play { margin-left: 2px; }
.p-skip .icon { fill: currentColor; }
.pbar-seek { display: flex; align-items: center; gap: 8px; width: 100%; }
.ptime { flex: none; min-width: 40px; font-size: 12px; color: var(--fg-3); text-align: center; font-variant-numeric: tabular-nums; }
.pbar-right { display: flex; align-items: center; justify-content: flex-end; gap: 4px; min-width: 0; }
.pbar-right .vol { width: 96px; flex: none; }

/* range inputs: seek + volume (4 px track, coral fill for the progress, white for the volume) */
input.seek, input.vol {
  --p: 0%;
  -webkit-appearance: none; appearance: none; display: block;
  width: 100%; height: 16px; margin: 0; padding: 0; background: transparent; cursor: pointer; touch-action: none;
}
input.seek:disabled { cursor: default; }
input.seek::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(var(--accent), var(--accent)) 0 0 / var(--p) 100% no-repeat, rgba(255, 255, 255, .18);
}
input.vol::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(var(--fg-2), var(--fg-2)) 0 0 / var(--p) 100% no-repeat, rgba(255, 255, 255, .18);
}
input.seek::-webkit-slider-thumb, input.vol::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 12px; height: 12px; margin-top: -4px; border: 0; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); opacity: 0; transition: opacity 150ms var(--ease-out);
}
input.seek:focus-visible::-webkit-slider-thumb, input.seek:active::-webkit-slider-thumb,
input.vol:focus-visible::-webkit-slider-thumb, input.vol:active::-webkit-slider-thumb { opacity: 1; }
input.seek:disabled::-webkit-slider-thumb { opacity: 0; }
input.seek::-moz-range-track, input.vol::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .18); }
input.seek::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent); }
input.vol::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--fg-2); }
input.seek::-moz-range-thumb, input.vol::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
input.seek:focus-visible, input.vol:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

/* ------------------------------------------------------------------------------------------------ full-screen player */

.np {
  position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg); transform: translateY(100%); transition: transform 250ms var(--ease-out);
}
.np.is-open { transform: none; }
/* artwork-tinted background: the colour comes from the cover (ui.tintFromImage) */
.np-bg { position: absolute; inset: 0; pointer-events: none; background-color: var(--tint, #2a2729); transition: background-color 250ms var(--ease-out); }
.np-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 11, 13, .12) 0%, rgba(12, 11, 13, .55) 42%, var(--bg) 92%); }
.np-shell {
  position: relative; flex: 1; min-height: 0; width: 100%; max-width: 1280px; margin: 0 auto;
  display: flex; flex-direction: column;
  padding: calc(var(--safe-t) + 4px) 20px calc(var(--safe-b) + 14px);
}
.np-head { flex: none; display: flex; align-items: center; gap: 8px; height: 52px; margin: 0 -8px; }
.np-head .btn-icon { color: var(--fg); }
.np-ctx { flex: 1; min-width: 0; text-align: center; font-size: 13px; font-weight: 600; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-body {
  flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto auto auto auto;
  grid-template-areas: "cover" "info" "seek" "controls" "bottom";
  row-gap: 18px; padding-top: 8px;
}
.np-main, .np-side { display: contents; }
.np-cover { grid-area: cover; min-height: 0; display: flex; align-items: center; justify-content: center; container-type: size; }
.np-cover .cover {
  width: min(100cqw, 100cqh); height: min(100cqw, 100cqh); border-radius: var(--r-md);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .45);
}
.np-mini { grid-area: mini; display: none; align-items: center; gap: 8px; min-width: 0; }
.np-mini-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 0; border: 0; background: transparent; text-align: left; }
.np-mini .cover { width: 48px; height: 48px; border-radius: var(--r-sm); }
.np-mini-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.np-mini-title { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-mini-sub { margin-top: 2px; font-size: 14px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-info { grid-area: info; display: flex; align-items: center; gap: 12px; min-width: 0; }
.np-info-text { flex: 1; min-width: 0; }
.np-title { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.012em; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-sub { margin-top: 2px; font-size: 16px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-sub .dot { color: var(--fg-3); }
.np-like { width: 44px; height: 44px; margin-right: -8px; color: var(--fg-2); }
.np-like .icon { width: 26px; height: 26px; }
.np-like.on { color: var(--accent); }
.np-prep { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; color: var(--fg-2); }
.np-seek { grid-area: seek; }
.np-seek input.seek { height: 20px; }
.np-seek input.seek::-webkit-slider-thumb { opacity: 1; }
.np-times { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 26px; margin-top: 4px; font-size: 13px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
/* «Готовим трек… 37 %» while preparing, else the quality badge «Супер качество» / «Студия» (OWNER-18) */
.np-quality { display: inline-flex; align-items: center; min-width: 0; font-size: 13px; font-weight: 600; color: var(--fg-2); white-space: nowrap; }
.np-controls { grid-area: controls; display: flex; align-items: center; justify-content: space-between; margin: 0 -8px; }
.np-controls .btn-icon { width: 48px; height: 48px; color: var(--fg); }
.np-controls .btn-icon .icon { width: 30px; height: 30px; }
.np-controls [data-p="prev"] .icon, .np-controls [data-p="next"] .icon { fill: currentColor; }
.np-controls [data-shuffle], .np-controls [data-repeat] { color: var(--fg-3); }
.np-controls [data-shuffle] .icon, .np-controls [data-repeat] .icon { width: 24px; height: 24px; }
.np-controls [data-shuffle].is-on, .np-controls [data-repeat].is-on { color: var(--fg); }
.np-play {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 68px; height: 68px; padding: 0; border: 0; border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
  transition: background-color var(--dur) var(--ease-out), transform 120ms var(--ease-out);
}
.np-play:active { transform: scale(.94); background: var(--accent-press); }
.np-play .icon { width: 30px; height: 30px; }
.np-play .icon-play { margin-left: 3px; }
.np-bottom { grid-area: bottom; display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 34px; }
.np-seg { width: min(100%, 280px); }
.np-vol { display: none; align-items: center; gap: 10px; flex: 1; color: var(--fg-3); }
.np-vol .vol { flex: 1; }
.np-side-seg { display: none; }
.np-pane {
  grid-area: pane; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; margin: 0 -20px; padding: 8px 20px 24px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12px, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 12px, #000 calc(100% - 28px), transparent);
}
.np-pane::-webkit-scrollbar { display: none; }
/* phone: a pane (lyrics / queue) replaces the cover; the controls stay */
.np[data-view="lyrics"] .np-body, .np[data-view="queue"] .np-body {
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  grid-template-areas: "mini" "pane" "seek" "controls" "bottom";
  row-gap: 14px;
}
.np[data-view="lyrics"] .np-cover, .np[data-view="queue"] .np-cover,
.np[data-view="lyrics"] .np-info, .np[data-view="queue"] .np-info { display: none; }
.np[data-view="lyrics"] .np-mini, .np[data-view="queue"] .np-mini { display: flex; }

/* queue + «Похожие треки» inside the full-screen player */
.q-sec { margin-bottom: 24px; }
.q-sec:last-child { margin-bottom: 0; }
.q-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; margin-bottom: 4px; }
.q-sec-title { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.q-sec-sub { margin: -2px 0 6px; font-size: 13px; color: var(--fg-3); }
.np .track-row { min-height: 56px; }
.np .tr-art { width: 44px; height: 44px; }
.q-more, .q-note { margin: 8px 0 0; font-size: 13px; color: var(--fg-3); }
.q-similar-sk .track-row { cursor: default; }

/* lyrics */
.ly-lines { padding: 16px 0 45%; }
.ly-line {
  margin: 0; padding: 6px 0; cursor: pointer;
  font-size: 20px; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; color: var(--fg-5);
  transition: color 250ms var(--ease-out);
}
.ly-line.past { color: var(--fg-4); }
.ly-line.on { color: var(--fg); }
.ly-gap { font-weight: 500; }
.ly-plain { padding: 12px 0 40px; white-space: pre-wrap; font-size: 16px; line-height: 1.7; color: var(--fg-2); }
.ly-sk .ly-line { cursor: default; }
.ly-sk .sk { display: block; height: .9em; margin: .2em 0; border-radius: var(--r-sm); background: rgba(255, 255, 255, .08); }
.np .empty { padding: 32px 0; }

/* ------------------------------------------------------------------------------------------------ sheets, menus, dialogs */

.overlay {
  position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0, 0, 0, .5); animation: fade-in 200ms var(--ease-out);
}
.overlay.closing { animation: fade-out 160ms ease forwards; }
.sheet {
  position: relative; width: 100%; max-height: 88vh; max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain;
  padding: 6px 12px calc(12px + var(--safe-b));
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background-color: var(--glass-2);
  -webkit-backdrop-filter: blur(32px) saturate(170%); backdrop-filter: blur(32px) saturate(170%);
  box-shadow: 0 -6px 28px rgba(0, 0, 0, .35);
  animation: sheet-up 250ms var(--ease-out);
}
.overlay.closing .sheet { animation: sheet-down 160ms ease forwards; }
.sheet:focus { outline: none; }
.sheet-grip { width: 36px; height: 5px; margin: 4px auto 8px; border-radius: 3px; background: rgba(255, 255, 255, .24); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 4px 10px; }
.sheet-title { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.overlay.is-dialog { align-items: center; padding: 16px; }
.overlay.is-dialog .sheet { width: min(400px, 100%); padding: 20px; border-radius: var(--r-lg); animation: pop-in 200ms var(--ease-out); }
.overlay.is-dialog.closing .sheet { animation: pop-out 150ms ease forwards; }
.overlay.is-popover { background: transparent; align-items: flex-start; justify-content: flex-start; animation: none; }
.overlay.is-popover .sheet {
  position: fixed; width: 280px; max-height: min(520px, calc(100vh - 16px)); padding: 6px;
  border-radius: var(--r-lg); box-shadow: var(--shadow-float), 0 0 0 1px var(--line); animation: pop-in 150ms var(--ease-out);
}
.overlay.is-popover.closing .sheet { animation: pop-out 120ms ease forwards; }
.as-list { display: flex; flex-direction: column; padding: 2px 0; }
.as-item {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 48px; padding: 0 12px;
  border: 0; border-radius: var(--r-md); background: transparent; color: var(--fg); text-align: left; font-size: 16px; font-weight: 400;
  transition: background-color 120ms var(--ease-out);
}
.as-item:focus-visible { background: rgba(255, 255, 255, .08); outline: none; }
.as-item:active { background: rgba(255, 255, 255, .12); }
.as-item:disabled { opacity: .4; }
.as-icon { flex: none; width: 22px; display: inline-flex; justify-content: center; color: var(--fg-2); }
.as-icon .icon { width: 20px; height: 20px; }
.as-label { flex: 1; min-width: 0; }
.as-sub { flex: none; font-size: 13px; color: var(--fg-3); }
.as-item.danger, .as-item.danger .as-icon { color: #ff9d95; }
.as-sep { height: 1px; margin: 4px 10px; background: var(--line); }
.as-header { padding: 4px 4px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.as-track, .as-user { display: flex; align-items: center; gap: 12px; min-width: 0; }
.as-user .avatar-letter { background: rgba(255, 255, 255, .12); }
.as-track .cover { width: 48px; height: 48px; border-radius: var(--r-sm); }
.as-track .cover.round { border-radius: 50%; }
.as-track-text { min-width: 0; }
.as-track-title { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-track-sub { margin-top: 2px; font-size: 14px; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.is-popover .as-item { min-height: 40px; font-size: 14px; border-radius: var(--r-sm); }
.is-popover .as-header { padding: 6px 6px 10px; }
.is-popover .as-track .cover { width: 40px; height: 40px; }
.is-popover .as-track-title { font-size: 14px; }
.is-popover .as-track-sub { font-size: 13px; }
.pl-sheet .as-track { padding: 0 4px 12px; border-bottom: 1px solid var(--line); }
.pl-pick { display: flex; flex-direction: column; gap: 2px; padding-top: 8px; }
.pl-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 6px 8px; border-radius: var(--r-md);
  border: 0; background: transparent; text-align: left; transition: background-color 120ms var(--ease-out);
}
.pl-item:focus-visible { background: rgba(255, 255, 255, .08); outline: none; }
.pl-item:active { background: rgba(255, 255, 255, .12); }
.pl-item .cover { width: 44px; height: 44px; border-radius: var(--r-sm); }
.pl-new-ico { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .1); color: var(--fg); }
.pl-text { min-width: 0; }
.pl-name { display: block; font-size: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-sub { display: block; margin-top: 1px; font-size: 13px; color: var(--fg-3); }
.pl-hint, .pl-err { margin: 8px; font-size: 14px; text-align: center; }
.pl-sk { cursor: default; }
.pl-sk-art { width: 44px; height: 44px; flex: none; }
.pl-sk .pl-text { flex: 1; }
.dialog-title { margin: 0 0 8px; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.dialog-text { margin: 0; color: var(--fg-2); font-size: 14px; line-height: 1.5; }
.dialog-label { display: block; margin: 14px 0 6px; font-size: 13px; font-weight: 600; color: var(--fg-2); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* toasts */
.toasts {
  position: fixed; left: 50%; z-index: 90; transform: translateX(-50%);
  bottom: calc(var(--tab-h) + var(--safe-b) + 12px);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: min(440px, calc(100vw - 24px)); pointer-events: none;
}
body.has-player .toasts { bottom: calc(var(--tab-h) + var(--safe-b) + var(--mini-h) + 20px); }
body.np-open .toasts, body.is-auth .toasts { bottom: calc(var(--safe-b) + 20px); }
/* phones: while a bottom sheet / menu is open a toast goes to the top, so it never covers the sheet */
@media (max-width: 1023px) {
  body.has-overlay .toasts, body.has-overlay.has-player .toasts { top: calc(var(--safe-t) + 12px); bottom: auto; }
}
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 100%;
  padding: 10px 12px; border-radius: var(--r-lg);
  background-color: var(--glass-3); box-shadow: var(--shadow-float);
  -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%);
  font-size: 14px; line-height: 1.35; animation: toast-in 200ms var(--ease-out);
}
.toast.out { animation: toast-out 180ms ease forwards; }
.toast-mark { flex: none; display: inline-flex; color: var(--fg-2); }
.toast-mark .icon { width: 18px; height: 18px; }
.toast-ok .toast-mark { color: var(--ok); }
.toast-bad .toast-mark { color: var(--bad); }
.toast-text { flex: 1; min-width: 0; }
.toast-action { flex: none; margin: -4px -2px -4px 4px; padding: 6px 10px; border: 0; border-radius: var(--r-sm); background: rgba(255, 255, 255, .1); color: var(--fg); font-size: 13px; font-weight: 600; transition: background-color var(--dur) var(--ease-out); }

/* infinite scroll */
.infinite-sentinel { display: flex; justify-content: center; min-height: 1px; padding: 8px 0; }
.infinite-error { display: flex; align-items: center; gap: 12px; color: var(--fg-3); font-size: 14px; }

/* ------------------------------------------------------------------------------------------------ auth */

.auth-host { min-height: 100vh; min-height: 100dvh; display: flex; }
.auth {
  flex: 1; display: flex; align-items: center; justify-content: center;
  min-height: 100vh; min-height: 100dvh; padding: calc(32px + var(--safe-t)) 24px calc(32px + var(--safe-b));
}
.auth-card { width: min(360px, 100%); }
.auth-brand { margin-bottom: 40px; }
.auth-brand .wordmark { font-size: 40px; }
.auth-title { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -.015em; line-height: 1.15; }
.auth-lead { margin: 8px 0 0; color: var(--fg-2); font-size: 16px; line-height: 1.45; }
.auth-notice { display: flex; align-items: flex-start; gap: 10px; margin: 20px 0 0; padding: 10px 12px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .07); color: var(--fg-2); font-size: 14px; line-height: 1.4; }
.auth-notice .icon { width: 18px; height: 18px; margin-top: 1px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; margin-top: 28px; }
.auth-submit { width: 100%; margin-top: 8px; }
.auth-switch { margin: 24px 0 0; font-size: 14px; color: var(--fg-3); }

/* ------------------------------------------------------------------------------------------------ phones (OWNER-17) */
/* «на телефоне всё мелко, неудобно, нагромождено»: every control ≥ 44×44, body 15–16 px, secondary ≥ 13–14 px,
   rows ≥ 64 px with ONE trailing ⋯ (no ♥: like via ⋯ / long press / the player; liked rows get a tiny coral heart). */
@media (max-width: 600px) {
  .track-row { min-height: 64px; gap: 12px; padding-right: 0; }
  .tr-like { display: none; }
  .track-row.is-liked .tr-heart { display: inline-flex; }
  /* opacity 1: a phone-width desktop window (mouse, hover) shows the same rows as a phone (OWNER-29) */
  .tr-more { width: 44px; height: 44px; margin-left: -4px; opacity: 1; }
  .tr-more .icon { width: 22px; height: 22px; }
  .np .track-row { min-height: 64px; }
  .np .tr-art { width: 48px; height: 48px; }

  .btn { height: 44px; }
  .btn-sm { position: relative; height: 36px; font-size: 14px; }
  .btn-sm::before { content: ""; position: absolute; left: 0; right: 0; top: -4px; bottom: -4px; }
  .btn-icon { width: 44px; height: 44px; }
  .btn-icon.btn-sm { width: 40px; height: 40px; }
  .btn-icon.btn-sm::before { content: ""; position: absolute; inset: -2px; border-radius: 50%; }
  .tabs-inline > button, .tabs-inline > a { height: 36px; font-size: 14px; }
  .np-seg > button { height: 44px; }
  .section-more { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 4px; }
  /* a shelf title that is a link is a 44 px target too */
  .section-title a { display: inline-flex; align-items: center; min-height: 44px; }
  /* chips stay 36 px tall (OWNER-17) with a 44 px touch area inside the scroll row */
  .chips { padding: 4px 2px; margin: -4px -2px; }
  .chip { position: relative; }
  .chip::before { content: ""; position: absolute; left: 0; right: 0; top: -4px; bottom: -4px; }
  .pw-eye, .secret-eye { width: 44px; height: 44px; }
  .toast-action { position: relative; min-height: 36px; padding: 8px 12px; font-size: 14px; }
  .toast-action::before { content: ""; position: absolute; left: 0; right: 0; top: -4px; bottom: -4px; }
  .badge { height: 22px; font-size: 13px; }

  .shelf { grid-auto-columns: 150px; }
  .section-title { font-size: 22px; } /* OWNER-29: section titles 22 px on phones */
  .tile-title { font-size: 15px; }
  .tile-sub { font-size: 14px; }
  .ph-meta { font-size: 14px; }
  .empty-text { font-size: 15px; }
  .as-track-sub { font-size: 14px; }
}

/* full-screen player below desktop: the seek bar and the links in it get 44 px touch areas without moving anything */
@media (max-width: 1023px) {
  .np-seek input.seek { height: 44px; margin: -12px 0; }
  .np-ctx a { display: block; line-height: 44px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* the paddings give the links their height; negative margins cancel them (the two inner ones collapse into one,
     so it is -22 = -(11 + 13) + the old 2 px gap) */
  .np-title { padding: 11px 0; margin: -11px 0 -22px; }
  .np-title a { padding: 11px 0; }
  .np-sub { padding: 13px 0; margin: -22px 0 -13px; }
  .np-sub a { padding: 13px 0; }
}

/* ------------------------------------------------------------------------------------------------ wider screens */

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(164px, 1fr)); gap: 24px 18px; }
  .shelf { grid-auto-columns: 164px; gap: 18px; }
  .tr-dur { display: block; }
  .page-header { flex-direction: row; align-items: flex-end; gap: 24px; padding: 16px 0 24px; }
  .ph-cover .cover { width: 200px; }
  .ph-title { font-size: 40px; }
  .ph-title-long { font-size: 28px; }
  .ph-actions { margin-top: 0; }
  .page-header { flex-wrap: wrap; }
  .sheet { padding-left: 16px; padding-right: 16px; }
}

@media (min-width: 1024px) {
  :root { --gutter: 32px; --main-pt: 64px; }
  .sidebar {
    display: flex; flex-direction: column; position: fixed; z-index: 35; top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w); padding: 18px 12px 12px; background: var(--bg-2);
  }
  body.has-player .sidebar { bottom: var(--bar-h); }
  .topbar { left: var(--sidebar-w); height: 64px; padding: 0 24px 0 20px; gap: 8px; }
  .topbar.is-scrolled { background-color: rgba(14, 13, 16, .84); }
  .top-back, body.is-root .top-back, .top-fwd { display: inline-flex; width: 32px; height: 32px; background: rgba(0, 0, 0, .42); color: var(--fg); }
  .top-back:hover, .top-fwd:hover { background: rgba(0, 0, 0, .6); }
  .top-back .icon, .top-fwd .icon { width: 20px; height: 20px; }
  .top-brand, body.is-root .top-brand { display: none; }
  .top-title { text-align: left; padding-left: 8px; font-size: 20px; font-weight: 700; }
  body.is-root .top-title { visibility: visible; }
  .main { margin-left: var(--sidebar-w); padding-bottom: 48px; }
  body.has-player .main { padding-bottom: calc(var(--bar-h) + 48px); }
  .tabbar, .mini { display: none !important; }
  .pbar:not([hidden]) { display: grid; }
  .toasts, body.has-player .toasts { bottom: 28px; }
  body.has-player .toasts { bottom: calc(var(--bar-h) + 20px); }
  body.np-open .toasts { bottom: 28px; }
  .shelf { grid-auto-columns: 180px; gap: 20px; scroll-snap-type: x proximity; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 28px 20px; }
  .shelf-nav { display: inline-flex; }
  .section { margin-top: 40px; }
  .section-title { font-size: 20px; }
  .tile-title { font-size: 16px; }
  .tile-sub { font-size: 14px; }

  /* table-like track list */
  .track-head {
    display: flex; align-items: center; gap: 16px; height: 36px; margin: 0 0 8px; padding: 0 4px 0 12px;
    border-bottom: 1px solid var(--line); color: var(--fg-3); font-size: 13px;
  }
  .th-index { flex: none; width: 24px; text-align: center; }
  .th-title { flex: 1 1 auto; min-width: 0; }
  .th-album { flex: 0 0 28%; min-width: 0; }
  .th-gap { flex: none; width: 40px; }
  .th-dur { flex: none; width: 52px; display: flex; justify-content: flex-end; }
  .th-dur .icon { width: 16px; height: 16px; }
  .track-list:not(.has-album) .th-album { display: none; }
  .track-row { min-height: 56px; margin: 0; padding: 4px 4px 4px 12px; gap: 16px; }
  .tr-art { width: 40px; height: 40px; }
  .tr-album { display: block; }
  .track-row:not(.has-album) .tr-album { display: none; }

  .page-header { padding: 24px 0 28px; gap: 28px; }
  .ph-cover .cover { width: 232px; }
  .ph-actions { margin-top: 4px; }

  .overlay:not(.is-popover):not(.is-dialog) { align-items: center; padding: 16px; }
  .overlay:not(.is-popover):not(.is-dialog) .sheet {
    width: min(440px, 100%); max-height: min(720px, calc(100vh - 32px)); padding: 12px 16px 16px;
    border-radius: var(--r-lg); animation: pop-in 200ms var(--ease-out);
  }
  .overlay:not(.is-popover):not(.is-dialog) .sheet-grip { display: none; }
  .overlay.closing:not(.is-popover):not(.is-dialog) .sheet { animation: pop-out 150ms ease forwards; }

  /* full-screen player: cover + controls on the left, queue / lyrics on the right */
  .np { transform: none; opacity: 0; transition: opacity 220ms var(--ease-out); }
  .np.is-open { opacity: 1; }
  .np-shell { padding: 12px 40px 32px; }
  .np-head { height: 56px; margin: 0 -8px 8px; }
  .np-body, .np[data-view] .np-body {
    grid-template-columns: minmax(320px, 440px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
    grid-template-areas: "main side"; column-gap: 72px; row-gap: 0; padding-top: 0;
  }
  .np-main { grid-area: main; display: flex; flex-direction: column; justify-content: center; gap: 20px; min-height: 0; }
  .np-side { grid-area: side; display: flex; flex-direction: column; min-height: 0; }
  .np-cover, .np[data-view] .np-cover { display: block; container-type: normal; flex: none; }
  .np-cover .cover { width: min(100%, calc(100dvh - 400px)); min-width: 220px; height: auto; aspect-ratio: 1; margin: 0 auto; }
  .np-info, .np[data-view] .np-info { display: flex; }
  .np-mini, .np[data-view] .np-mini { display: none; }
  .np-title { font-size: 28px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .np-bottom { justify-content: flex-start; }
  .np-bottom .np-seg { display: none; }
  .np-vol { display: flex; }
  .np-side-seg { display: inline-flex; align-self: flex-start; width: 240px; margin: 4px 0 16px; }
  .np-pane { flex: 1; margin: 0 -12px; padding: 0 12px 24px; }
  .np .track-row { margin-left: -12px; margin-right: -12px; }
  .ly-line { font-size: 28px; padding: 8px 0; }
  .ly-plain { font-size: 20px; }
}

@media (min-width: 1440px) {
  .shelf { grid-auto-columns: 196px; }
  .np-body, .np[data-view] .np-body { grid-template-columns: minmax(360px, 480px) minmax(0, 1fr); column-gap: 96px; }
}

@media (max-width: 370px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .shelf { grid-auto-columns: 132px; }
  .np-play { width: 60px; height: 60px; }
}

@media (max-height: 700px) and (max-width: 1023px) {
  .np-body { row-gap: 12px; }
  .np-controls .btn-icon { width: 44px; height: 44px; }
  .np-play { width: 60px; height: 60px; }
}

/* hover styles only where a real pointer hovers (no sticky hover after a tap on phones) */
@media (hover: hover) {
  ::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, .24); }
  .section-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
  .section-more:hover { color: var(--fg); }
  .btn:hover { background-color: var(--hover); }
  .btn-primary:hover { background: #fff; }
  .btn-ghost:hover { color: var(--fg); background: var(--hover); }
  .btn-danger:hover { background: rgba(242, 114, 107, .2); }
  .btn-icon:hover { color: var(--fg); background-color: var(--hover); }
  .btn-play:hover { background: var(--accent-hover); }
  .link-btn:hover { text-decoration-color: var(--fg); }
  .chip:hover { background-color: #2f2d32; }
  .tabs-inline > button:hover, .tabs-inline > a:hover { color: var(--fg); }
  .input:hover { background-color: #201f23; }
  .pw-eye:hover, .secret-eye:hover { color: var(--fg); }
  .shelf-nav:hover { color: var(--fg); background: #302e33; }
  .tile-play:hover { background: var(--accent-hover); }
  .tr-sub a:hover, .tr-album a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
  .tr-like:hover, .tr-more:hover { color: var(--fg); }
  .ph-sub a:hover, .ph-meta a:hover { text-decoration: underline; text-underline-offset: 3px; }
  .side-nav a:hover, .side-admin:hover { color: var(--fg); background: var(--hover); }
  .side-item:hover { background: var(--hover); }
  .avatar-btn:hover .avatar-letter { background: #312f35; }
  .pbar-art:hover .pbar-art-hint { opacity: 1; }
  .pbar-title a:hover, .pbar-sub a:hover { text-decoration: underline; text-underline-offset: 3px; color: var(--fg); }
  .p-icon:hover { color: var(--fg); }
  .play-btn:hover { background: #fff; }
  input.seek:hover::-webkit-slider-thumb, input.vol:hover::-webkit-slider-thumb { opacity: 1; }
  .np-ctx a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
  .np-title a:hover, .np-sub a:hover { text-decoration: underline; text-underline-offset: 3px; }
  .np-play:hover { background: var(--accent-hover); }
  .np .track-row:hover { background-color: rgba(255, 255, 255, .07); }
  .ly-line:hover { color: var(--fg-3); }
  .as-item:hover { background: rgba(255, 255, 255, .08); }
  .pl-item:hover { background: rgba(255, 255, 255, .08); }
  .toast-action:hover { background: rgba(255, 255, 255, .16); }
  /* selected / liked states keep their look under the pointer */
  .chip.on:hover, .chip[aria-pressed="true"]:hover, .chip[aria-selected="true"]:hover { background: var(--fg); }
  .tr-like.on:hover, .like-btn.on:hover, .btn-icon[data-like-id].on:hover { color: var(--accent); }
  .ly-line.on:hover { color: var(--fg); }
}

/* touch: no hover-only affordances, no scrollbars */
@media (hover: none) {
  .tile-play { display: none; }
  .tile.is-current .tile-play { display: flex; }
  .pbar-art-hint { display: none; }
}
@media (hover: none) and (pointer: coarse) {
  html, body, * { scrollbar-width: none; }
  ::-webkit-scrollbar { display: none; width: 0; height: 0; }
}

/* ------------------------------------------------------------------------------------------------ fallbacks & motion */

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .mini, .pbar, .tabbar, .topbar.is-scrolled { background-color: rgba(22, 21, 24, .98); }
  .sheet, .toast { background-color: rgba(36, 34, 39, .99); }
}

/* ------------------------------------------------------------------------------------------------ loading motion (OWNER-37) */
/* While a track is being prepared on the server or buffered in the browser the player shows calm motion, so a tap never
   looks like a freeze. player.js toggles .is-preparing / .is-buffering on .player-root; rows/tiles get .is-preparing. */
.mini-play, .np-play, .play-btn { position: relative; }
.player-root.is-preparing .mini-play::after, .player-root.is-buffering .mini-play::after,
.player-root.is-preparing .play-btn::after, .player-root.is-buffering .play-btn::after,
.player-root.is-preparing .np-play::after, .player-root.is-buffering .np-play::after {
  content: ''; position: absolute; inset: 2px; border-radius: 50%; pointer-events: none;
  border: 2px solid transparent; border-top-color: var(--accent); border-right-color: var(--accent);
  animation: spin .9s linear infinite;
}
.player-root.is-preparing .np-play::after, .player-root.is-buffering .np-play::after {
  inset: -6px; border-top-color: var(--fg); border-right-color: var(--fg);
}
.player-root.is-preparing .mini-progress::after, .player-root.is-buffering .mini-progress::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -35%; width: 35%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: load-sweep 1.15s ease-in-out infinite;
}
.track-row.is-preparing .tr-art .cover, .track-row.is-preparing:not(.has-cover) .tr-num {
  animation: load-pulse 1.2s ease-in-out infinite;
}
.tile-play.is-preparing::after {
  content: ''; position: absolute; inset: -3px; border-radius: 50%; pointer-events: none;
  border: 2px solid transparent; border-top-color: var(--on-accent); animation: spin .9s linear infinite;
}
@keyframes load-sweep { to { left: 100%; } }
@keyframes load-pulse { 0%, 100% { opacity: .35; } 50% { opacity: .8; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  .spin {
    animation-duration: 1.6s !important; animation-iteration-count: infinite !important;
  }
  .player-root.is-preparing .mini-play::after, .player-root.is-buffering .mini-play::after,
  .player-root.is-preparing .play-btn::after, .player-root.is-buffering .play-btn::after,
  .player-root.is-preparing .np-play::after, .player-root.is-buffering .np-play::after,
  .tile-play.is-preparing::after {
    animation-duration: 1.6s !important; animation-iteration-count: infinite !important;
  }
  body.is-playing .eq i { animation: none !important; }
  .view-loading, .boot .wordmark { opacity: 1; }
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes appear { to { opacity: 1; } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-down { from { transform: none; } to { transform: translateY(100%); } }
@keyframes pop-in { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }
@keyframes pop-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: scale(.98); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { from { opacity: 1; } to { opacity: 0; } }

/* pwa ------------------------------------------------------------------------------------- (pwa agent, js/pwa.js) */

/* «Нет соединения»: a small floating note under the status bar; never blocks taps; empty = hidden */
.pwa-offline {
  position: fixed; z-index: 95; top: calc(var(--safe-t) + 10px); left: 0; right: 0;
  display: flex; align-items: center; gap: 8px; width: max-content; max-width: calc(100% - 32px); margin: 0 auto;
  padding: 7px 12px; border-radius: var(--r-lg);
  background-color: var(--glass-3); box-shadow: var(--shadow-float);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  color: var(--fg); font-size: 13px; font-weight: 500; line-height: 1.3; white-space: nowrap;
  pointer-events: none; animation: fade-in 200ms var(--ease-out);
}
.pwa-offline:empty { display: none; }
.pwa-offline .icon { width: 16px; height: 16px; color: var(--fg-2); }
@media (min-width: 1024px) {
  body:not(.is-auth) .pwa-offline { left: var(--sidebar-w); top: 16px; }
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .pwa-offline { background-color: rgba(36, 34, 39, .99); }
}

/* Профиль → «Приложение» */
.pwa-done { flex: none; display: inline-flex; align-items: center; gap: 6px; color: var(--fg-3); font-size: 14px; }
.pwa-done .icon { width: 16px; height: 16px; }
.pwa-install-btn { flex: none; }
.pwa-hint .icon { width: 16px; height: 16px; margin: -3px 1px 0; color: var(--fg-2); }
