/* Один шрифт — Golos Text, как в wetime. Иерархия — размером и насыщенностью. */
@font-face { font-family: 'Golos Text'; font-style: normal; font-weight: 400 900; font-display: swap; src: url(fonts/golos-text-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-weight: 400 900; font-display: swap; src: url(fonts/golos-text-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Сетка отступов 4 / 8 / 12 / 16 / 24; нажимаемое — от 44, чипы — 36.
   Схема — светлая или тёмная, как в Telegram. --tint — цвет текущей обложки. */
:root {
  color-scheme: light;
  --bg: #f6f3ef; --sec: #fffdfa; --field: #ece6de; --text: #1f1a1d; --hint: #776d68; --sep: rgba(31, 26, 29, .1);
  --accent: #ea6a3c; --accent-text: #2a1206; --accent-ink: #b0401a;
  --tint: #d9cfc4; --tint-o: .55;
  --r: 12px; --ease: cubic-bezier(.2, .8, .3, 1);
  --nav: 56px; --mini: 64px;
}
:root[data-scheme=dark] {
  color-scheme: dark;
  --bg: #121014; --sec: #1c191f; --field: #29252d; --text: #f3eee9; --hint: #9c929b; --sep: rgba(243, 238, 233, .09);
  --accent: #ff8c5a; --accent-text: #24120a; --accent-ink: #ff8c5a;
  --tint: #3a3340; --tint-o: .7;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); color: var(--text); }
body { font: 16px/1.4 "Golos Text", -apple-system, BlinkMacSystemFont, Roboto, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; min-height: 100dvh; overflow-x: hidden; }
body.lock { overflow: hidden; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; user-select: none; -webkit-user-select: none; }
input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
svg.i { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.f { fill: currentColor; stroke: none; }
::selection { background: var(--accent); color: var(--accent-text); }

main { max-width: 560px; margin: 0 auto; padding: calc(16px + env(safe-area-inset-top)) 16px calc(var(--nav) + 24px + env(safe-area-inset-bottom)); }
body.has-mini main { padding-bottom: calc(var(--nav) + var(--mini) + 24px + env(safe-area-inset-bottom)); }
h1 { font-size: clamp(26px, 7vw, 30px); line-height: 1.12; font-weight: 750; letter-spacing: -.03em; text-wrap: balance; }
h2 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; margin: 28px 0 12px; }
.hint { color: var(--hint); font-size: 14px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; margin-bottom: 16px; }

/* — кнопки — */
.ib { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--text); flex: none; position: relative;
  transition: transform .18s var(--ease), color .18s; }
.ib:active { transform: scale(.88); }
.ib.dim { color: var(--hint); }
/* переключатель языка — капсула с кодом языка рядом со значком загрузок */
.head-tools { display: flex; align-items: center; gap: 2px; }
.ib.lang { width: auto; height: 32px; padding: 0 11px; border-radius: 16px; background: var(--field);
  font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--hint); }
.ib.on { color: var(--accent-ink); }
.ib .dot { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px;
  background: var(--accent); color: var(--accent-text); font-weight: 650; transition: transform .18s var(--ease); }
.btn:active { transform: scale(.97); }
.btn.ghost { background: var(--field); color: var(--text); font-weight: 550; }
.btn.wide { width: 100%; }
.btn .i { width: 20px; height: 20px; }
.btn[aria-busy=true] { opacity: .7; pointer-events: none; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 36px; padding: 0 16px; border-radius: 999px; background: var(--field); font-size: 14px; font-weight: 550;
  display: inline-flex; align-items: center; gap: 6px; transition: background-color .18s, color .18s, transform .18s var(--ease); }
.chip:active { transform: scale(.95); }
.chip.on { background: var(--text); color: var(--bg); }
.chip .i { width: 18px; height: 18px; }
.playbtn { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--accent-text); display: grid; place-items: center;
  box-shadow: 0 6px 18px -6px var(--accent); transition: transform .18s var(--ease); flex: none; }
.playbtn:active { transform: scale(.92); }
.playbtn .i { width: 26px; height: 26px; }

/* — обложки — */
.art { position: relative; display: block; overflow: hidden; border-radius: 8px; flex: none; aspect-ratio: 1;
  background: linear-gradient(135deg, hsl(var(--h, 20) 35% 52%), hsl(calc(var(--h, 20) + 40) 40% 32%)); color: rgba(255, 255, 255, .7); }
.art > .i { position: absolute; inset: 0; margin: auto; width: 40%; height: 40%; stroke-width: 1.5; }
.art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.art.s { width: 48px; border-radius: 6px; }
.art.round { border-radius: 50%; }
.art.liked { background: linear-gradient(135deg, var(--accent), #7b4fd0); color: #fff; }
.art.liked > .i { width: 44%; height: 44%; fill: currentColor; stroke: none; }

/* — полки и плитки — */
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qt { display: flex; align-items: center; gap: 10px; height: 56px; border-radius: 8px; background: var(--sec); overflow: hidden; text-align: left;
  font-size: 13px; font-weight: 650; line-height: 1.2; padding-right: 8px; box-shadow: 0 1px 0 var(--sep); transition: transform .18s var(--ease); }
.qt:active { transform: scale(.97); }
.qt .art { width: 56px; border-radius: 0; }
.qt span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shelf { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; scroll-snap-type: x proximity; scroll-padding: 0 16px; }
.shelf::-webkit-scrollbar { display: none; }
.card { flex: none; width: 140px; text-align: left; scroll-snap-align: start; transition: transform .18s var(--ease); }
.card:active { transform: scale(.96); }
.card .art { width: 140px; border-radius: 10px; box-shadow: 0 8px 20px -12px rgba(0, 0, 0, .5); }
.card b { display: block; margin-top: 8px; font-size: 14px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card small { display: block; font-size: 13px; color: var(--hint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .badge { position: absolute; right: 6px; bottom: 6px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, .55); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.card .badge .i { width: 18px; height: 18px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px 12px; }
.grid .card, .grid .card .art { width: 100%; }

/* — строки списков — */
.list { margin: 0 -8px; }
.row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 6px 0 6px 8px; border-radius: 10px; text-align: left; width: 100%;
  transition: background-color .15s; }
.row:active { background: var(--field); }
.row .tx { flex: 1; min-width: 0; }
.row .tx b { display: block; font-weight: 550; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .tx small { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--hint); white-space: nowrap; overflow: hidden; }
.row .tx small span { overflow: hidden; text-overflow: ellipsis; }
.row .tx small .i { width: 14px; height: 14px; color: var(--accent-ink); }
.row.on .tx b { color: var(--accent-ink); }
.row .num { width: 32px; text-align: center; color: var(--hint); font-size: 15px; font-variant-numeric: tabular-nums; flex: none; }
.row .side { color: var(--hint); font-size: 13px; font-variant-numeric: tabular-nums; padding-right: 8px; }
.row.big .art { width: 56px; }
.row .ib { margin-right: 0; }
.row .ib.ok { color: var(--accent-ink); }

/* — заголовок альбома / исполнителя — */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 8px; }
.hero .art { width: min(62vw, 240px); border-radius: 12px; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .6); }
.hero .art.round { border-radius: 50%; }
.hero h1 { margin-top: 20px; }
.hero .hint { margin-top: 4px; }
.hero .hint a { color: var(--text); font-weight: 600; text-decoration: none; }
.acts { display: flex; align-items: center; gap: 4px; margin: 16px 0 8px; }
.acts .sp { flex: 1; }

/* — поиск — */
.searchbar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 4px 0 14px; border-radius: 12px;
  background: var(--field); margin: 0 0 8px; }
.searchbar-wrap { position: sticky; top: 0; z-index: 2; background: var(--bg); margin: -16px -16px 0; padding: calc(16px + env(safe-area-inset-top)) 16px 8px; }
.searchbar .i { color: var(--hint); width: 20px; height: 20px; }
.searchbar input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; font-size: 16px; }
.searchbar input::placeholder { color: var(--hint); }
.searchbar input::-webkit-search-cancel-button { display: none; }
.sec-note { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sec-note h2 { margin-bottom: 4px; }
.empty { text-align: center; padding: 48px 16px; }
.empty .art { width: 96px; margin: 0 auto 16px; border-radius: 50%; }
.empty b { display: block; font-size: 18px; font-weight: 650; }
.empty .hint { margin: 6px auto 20px; max-width: 300px; }
.spin { width: 20px; height: 20px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel { height: 60px; border-radius: 10px; background: var(--field); animation: pulse 1.2s ease-in-out infinite; }
.skel + .skel { margin-top: 8px; }
@keyframes pulse { 50% { opacity: .5; } }
.loading { display: grid; place-items: center; min-height: 60vh; }
.loading .pulse { width: 48px; height: 48px; border-radius: 50%; background: var(--field); animation: pulse 1.2s ease-in-out infinite; }

/* эквалайзер у играющего трека */
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.eq i { width: 3px; background: var(--accent-ink); border-radius: 1px; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { 0%, 100% { height: 30%; } 50% { height: 100%; } }
body.paused .eq i { animation-play-state: paused; }

/* — нижняя навигация — */
nav { position: fixed; z-index: 4; left: 0; right: 0; bottom: 0; display: flex; padding-bottom: env(safe-area-inset-bottom);
  background: linear-gradient(to top, var(--bg) 55%, color-mix(in srgb, var(--bg) 0%, transparent)); }
nav button { flex: 1; height: var(--nav); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 550; color: var(--hint); transition: color .18s, transform .18s var(--ease); }
nav button:active { transform: scale(.9); }
nav button.on { color: var(--text); }
nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
nav button.on svg { stroke-width: 2.4; }

/* — мини-плеер — */
#mini { position: fixed; z-index: 5; left: 8px; right: 8px; bottom: calc(var(--nav) + env(safe-area-inset-bottom)); max-width: 544px; margin: 0 auto; }
.mini-in { position: relative; display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 4px 0 8px; border-radius: 12px; overflow: hidden;
  background: color-mix(in srgb, var(--tint) 75%, var(--sec)); box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .5); cursor: pointer;
  transition: background-color .5s ease; }
.mini-in .art.s { width: 40px; border-radius: 6px; }
.mini-in .tx { flex: 1; min-width: 0; }
.mini-in .tx b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-in .tx small { display: block; font-size: 13px; color: var(--hint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-prog { position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; background: var(--sep); border-radius: 2px; overflow: hidden; }
.mini-prog i { display: block; height: 100%; width: 0; background: var(--text); }

/* — полноэкранный плеер — */
#player { position: fixed; z-index: 8; inset: 0; transform: translateY(100%); visibility: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tint) calc(var(--tint-o) * 100%), var(--bg)) 0%, var(--bg) 88%);
  transition: transform .38s var(--ease), visibility 0s .38s, background .6s ease; }
#player.open { transform: none; visibility: visible; transition: transform .38s var(--ease), visibility 0s, background .6s ease; }
.p-in { max-width: 480px; height: 100%; margin: 0 auto; display: flex; flex-direction: column;
  padding: calc(8px + env(safe-area-inset-top)) 24px calc(16px + env(safe-area-inset-bottom)); }
.p-head { display: flex; align-items: center; gap: 8px; margin: 0 -12px; }
.p-ctx { flex: 1; min-width: 0; text-align: center; line-height: 1.2; }
.p-ctx small { display: block; font-size: 11px; color: var(--hint); text-transform: uppercase; letter-spacing: .08em; }
.p-ctx b { display: block; font-size: 14px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 16px 0; position: relative; }
.p-art { width: min(100%, 52vh); }
.p-art .art { width: 100%; border-radius: 12px; box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .65); transition: transform .4s var(--ease); }
body.paused .p-art .art { transform: scale(.92); }
.p-lyr { position: absolute; inset: 8px 0; overflow-y: auto; scrollbar-width: none; mask-image: linear-gradient(transparent, #000 12%, #000 80%, transparent);
  -webkit-mask-image: linear-gradient(transparent, #000 12%, #000 80%, transparent); padding: 30vh 0; }
.p-lyr::-webkit-scrollbar { display: none; }
.p-lyr p { font-size: 24px; line-height: 1.3; font-weight: 700; letter-spacing: -.02em; color: var(--hint); opacity: .55; padding: 6px 0;
  transition: color .3s, opacity .3s; cursor: pointer; }
.p-lyr p.on { color: var(--text); opacity: 1; }
.p-lyr.plain p { opacity: 1; color: var(--text); font-size: 20px; cursor: default; }
.p-lyr .none { text-align: center; color: var(--hint); font-size: 16px; font-weight: 500; opacity: 1; }
.p-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.p-meta .tx { flex: 1; min-width: 0; }
.p-meta b { display: block; font-size: 22px; font-weight: 750; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-meta span { display: block; color: var(--hint); font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.p-meta .ib { margin-right: -10px; }
.scrub { margin-top: 16px; touch-action: none; cursor: pointer; padding: 10px 0 0; }
.scrub .bar { position: relative; height: 4px; border-radius: 2px; background: var(--sep); }
.scrub .bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 2px; background: var(--text); }
.scrub .bar s { position: absolute; top: 50%; left: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--text);
  transform: scale(.8); transition: transform .15s; }
.scrub.drag .bar s { transform: scale(1.2); }
.times { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--hint); font-variant-numeric: tabular-nums; }
.ctrl { display: flex; align-items: center; justify-content: space-between; margin: 8px -8px 0; }
.ctrl button { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; position: relative; transition: transform .18s var(--ease), color .18s; }
.ctrl button:active { transform: scale(.86); }
.ctrl button .i { width: 30px; height: 30px; }
.ctrl #p-shuf .i, .ctrl #p-rep .i { width: 24px; height: 24px; color: var(--hint); }
.ctrl button.on .i { color: var(--accent-ink) !important; }
.ctrl button.on::after { content: ""; position: absolute; bottom: 6px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent-ink); }
.ctrl .rep1 { position: absolute; font-size: 9px; font-weight: 800; color: var(--accent-ink); top: 13px; }
.ctrl .play { width: 68px; height: 68px; background: var(--text); color: var(--bg); }
.ctrl .play .i { width: 32px; height: 32px; }
.ctrl .play .spin { width: 28px; height: 28px; border-width: 3px; }
.p-tools { display: flex; justify-content: center; margin-top: 16px; }
/* как виджеты WHY NOT: одна капсула с фоном, варианты — голые значки на ней */
.capsule { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: color-mix(in srgb, var(--text) 8%, transparent); }
.capsule button { width: 48px; height: 40px; border-radius: 999px; display: grid; place-items: center; color: var(--hint); transition: color .18s, background-color .18s, transform .18s var(--ease); }
.capsule button:active { transform: scale(.9); }
.capsule button.on { color: var(--text); background: color-mix(in srgb, var(--text) 10%, transparent); }
.capsule .i { width: 22px; height: 22px; }

/* — нижний лист — */
#sheet { position: fixed; inset: 0; z-index: 12; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); animation: fade .2s ease; }
.sheet-wrap { position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; max-height: 86vh; display: flex; flex-direction: column;
  background: var(--sec); border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom); animation: up .3s var(--ease); }
.grip { display: grid; place-items: center; height: 20px; flex: none; }
.grip i { width: 36px; height: 4px; border-radius: 2px; background: var(--sep); }
.sheet-body { overflow-y: auto; padding: 0 16px 16px; }
.sheet-body .row { min-height: 52px; }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 4px 0 12px; border-bottom: .5px solid var(--sep); margin-bottom: 8px; }
.sheet-head .tx { min-width: 0; }
.sheet-head b { display: block; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-head small { display: block; color: var(--hint); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 52px; padding: 0 4px; border-radius: 10px; text-align: left; font-size: 16px; }
.act:active { background: var(--field); }
.act .i { color: var(--hint); }
.act.on .i { color: var(--accent-ink); }
@keyframes up { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

#toast { position: fixed; z-index: 20; left: 16px; right: 16px; top: calc(12px + env(safe-area-inset-top)); max-width: 420px; margin: 0 auto;
  padding: 12px 16px; border-radius: 12px; background: var(--text); color: var(--bg); font-size: 14px; font-weight: 550; text-align: center;
  opacity: 0; transform: translateY(-12px); pointer-events: none; transition: opacity .25s, transform .25s var(--ease); }
#toast.show { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* место на полке: подпись и тонкая полоска; .full — квота кончилась */
.space { margin: -6px 0 14px; }
.space small { display: block; font-size: 13px; color: var(--hint); margin-bottom: 6px; }
.space i { display: block; height: 4px; border-radius: 2px; background: var(--field); overflow: hidden; }
.space i b { display: block; height: 100%; border-radius: 2px; background: var(--accent); }
.space.full small { color: #e5484d; }
.space.full i b { background: #e5484d; }
.space.mini { margin: 4px 0 0; }
.space.mini small { font-size: 12px; margin-bottom: 4px; }
/* админка */
.adm-card { background: var(--field); border-radius: 16px; padding: 14px 14px 6px; }
.adm-card .space { margin: 0 0 10px; }
.adm-line { display: flex; align-items: center; gap: 8px; min-height: 40px; font-size: 14px; }
.adm-line span { color: var(--hint); flex: 1; }
.adm-line .chip { height: 32px; padding: 0 12px; margin-left: 4px; }
#tabs button[hidden] { display: none; }
