@font-face {
  font-family: "InterFallback"; font-weight: 100 900; font-style: normal; font-display: swap;
  src: url("fonts/inter-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "InterFallback"; font-weight: 100 900; font-style: normal; font-display: swap;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+2212, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f0f0f2;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, 0.09);
  --accent: #fa2d48;
  --accent-ink: #ffffff;
  --link: #0066cc;
  --glass: rgba(255, 255, 255, 0.72);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "InterFallback", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --text: #f5f5f7;
    --muted: #98989d;
    --line: rgba(255, 255, 255, 0.12);
    --link: #2997ff;
    --glass: rgba(28, 28, 30, 0.72);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: hidden; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.5 var(--font); -webkit-font-smoothing: antialiased; min-height: 100vh; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--link) 70%, transparent); outline-offset: 2px; border-radius: 10px; }

.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }

/* ---------- header with segmented control ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--line);
}
@media (prefers-reduced-transparency: reduce) { .top { background: var(--surface); backdrop-filter: none; } }
.top .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 58px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; }
.brand svg { width: 26px; height: 26px; flex: none; }
.seg { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-2); border-radius: 10px; padding: 3px; }
.seg a { position: relative; z-index: 1; padding: 6px 22px; border-radius: 8px; font-size: 0.9rem; font-weight: 500; color: var(--muted); text-align: center; white-space: nowrap; }
.seg a[aria-current="page"] { color: var(--text); background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 1px rgba(0,0,0,0.04); }
.top-right { justify-self: end; display: flex; gap: 8px; align-items: center; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; color: var(--text); }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active, .btn:active, .chip:active, .card:active { transform: scale(0.97); transition: transform 100ms ease-out; }
.icon-btn svg { width: 20px; height: 20px; }
.avatar-me { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #ff9f0a, #fa2d48); color: #fff; display: grid; place-items: center; font-size: 0.8rem; font-weight: 600; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 980px; padding: 10px 20px; font-weight: 500; background: var(--surface-2); color: var(--text); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { filter: brightness(1.06); }
.btn svg { width: 17px; height: 17px; }
.link { color: var(--link); }

/* ---------- music page ---------- */
.hero { padding: 72px 0 40px; text-align: center; }
.hero h1 { font-size: clamp(2.3rem, 6vw, 4.2rem); line-height: 1.05; letter-spacing: -0.03em; font-weight: 700; margin: 0 0 14px; }
.hero p { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--muted); margin: 0 auto 34px; max-width: 34ch; letter-spacing: -0.01em; }

.search { display: flex; align-items: center; gap: 8px; max-width: 680px; margin: 0 auto; background: var(--surface); border-radius: 18px; padding: 8px 8px 8px 18px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.search svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 4px; font-size: 1.02rem; outline: none; }
.search input::placeholder { color: var(--muted); }
.hint { text-align: center; color: var(--muted); font-size: 0.88rem; margin: 14px 0 0; min-height: 1.3em; }
.hint.err { color: var(--accent); }

.result { text-align: left; max-width: 760px; margin: 34px auto 0; background: var(--surface); border-radius: 22px; padding: 22px; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; box-shadow: var(--shadow); border: 1px solid var(--line); animation: rise 360ms cubic-bezier(.2,.8,.2,1); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .result { animation: fade 200ms ease; } @keyframes fade { from { opacity: 0; } to { opacity: 1; } } }
@media (max-width: 640px) { .result { grid-template-columns: 1fr; } .result .art { max-width: 220px; } }
.art { aspect-ratio: 1; border-radius: 14px; overflow: hidden; box-shadow: 0 8px 22px rgba(0,0,0,0.18); }
.art canvas { width: 100%; height: 100%; }
.result h2 { font-size: 1.45rem; letter-spacing: -0.02em; margin: 2px 0 4px; line-height: 1.2; }
.result .by { color: var(--accent); font-weight: 500; margin: 0 0 2px; }
.result .meta { color: var(--muted); font-size: 0.88rem; margin: 0 0 16px; }
.formats { display: grid; gap: 8px; margin-bottom: 18px; }
.fmt { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; background: var(--surface-2); cursor: pointer; }
.fmt input { accent-color: var(--accent); width: 17px; height: 17px; }
.fmt .n { flex: 1; font-weight: 500; }
.fmt .n small { display: block; color: var(--muted); font-weight: 400; font-size: 0.8rem; }
.fmt .s { color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.fmt:has(input:checked) { outline: 2px solid var(--accent); outline-offset: -2px; }
.dl-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ring { width: 38px; height: 38px; flex: none; }
.ring circle { fill: none; stroke-width: 3.5; }
.ring .bg { stroke: var(--surface-2); }
.ring .fg { stroke: var(--accent); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset 300ms linear; }
.dl-status { color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; }

.section { padding: 56px 0 0; }
.section h3 { font-size: 1.5rem; letter-spacing: -0.02em; margin: 0 0 18px; }
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: 170px; gap: 20px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; }
.shelf::-webkit-scrollbar { height: 8px; }
.shelf::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.album { scroll-snap-align: start; cursor: pointer; text-align: left; border: 0; background: none; padding: 0; }
.album .art { margin-bottom: 9px; }
.album b { display: block; font-weight: 500; font-size: 0.93rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.album span { color: var(--muted); font-size: 0.85rem; }
@media (max-width: 520px) { .shelf { grid-auto-columns: 140px; gap: 14px; } }

.tracks { background: var(--surface); border-radius: 18px; border: 1px solid var(--line); overflow: hidden; }
.trow { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.trow:last-child { border-bottom: 0; }
.trow .mini { width: 44px; height: 44px; border-radius: 8px; overflow: hidden; }
.trow .t b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .t span { color: var(--muted); font-size: 0.85rem; }
.trow .q { color: var(--muted); font-size: 0.82rem; border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; }
.trow .d { color: var(--muted); font-size: 0.88rem; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .trow .q { display: none; } .trow { grid-template-columns: 44px minmax(0,1fr) auto; } }

.player-bar { position: sticky; bottom: 12px; z-index: 25; margin: 40px auto 18px; width: min(720px, 100% - 24px); display: flex; align-items: center; gap: 12px; padding: 9px 14px 9px 9px; border-radius: 16px; background: var(--glass); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); border: 1px solid var(--line); box-shadow: var(--shadow); }
.player-bar .mini { width: 44px; height: 44px; border-radius: 8px; overflow: hidden; flex: none; }
.player-bar .pb-t { flex: 1; min-width: 0; }
.player-bar .pb-t b { display: block; font-weight: 500; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-bar .pb-t span { color: var(--muted); font-size: 0.8rem; }
.pb-prog { height: 3px; background: var(--line); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.pb-prog i { display: block; height: 100%; width: 0; background: var(--accent); }

.foot { color: var(--muted); font-size: 0.8rem; padding: 34px 0 40px; border-top: 1px solid var(--line); margin-top: 60px; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }

/* ---------- video page (distinct from YouTube) ---------- */
.v-head { padding: 26px 0 8px; }
.v-head h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); letter-spacing: -0.03em; font-weight: 700; margin: 0 0 4px; }
.v-head p { color: var(--muted); margin: 0; font-size: 1.02rem; }
.v-search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 5px 6px 5px 15px; margin: 18px 0 20px; max-width: 520px; box-shadow: var(--shadow); }
.v-search svg { width: 18px; height: 18px; color: var(--muted); }
.v-search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 9px 4px; outline: none; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 26px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); border-radius: 980px; padding: 8px 16px; font-size: 0.9rem; font-weight: 500; background: var(--surface); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* big featured spotlight */
.spot { position: relative; border-radius: 24px; overflow: hidden; aspect-ratio: 21 / 9; margin-bottom: 40px; cursor: pointer; box-shadow: var(--shadow); }
@media (max-width: 680px) { .spot { aspect-ratio: 4 / 3; } }
.spot canvas { width: 100%; height: 100%; object-fit: cover; }
.spot .veil { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,0.78), rgba(0,0,0,0.25) 55%, transparent); }
.spot .in { position: absolute; left: 0; bottom: 0; padding: clamp(18px, 3.5vw, 40px); max-width: 640px; color: #fff; }
.spot .kick { display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #ffd0d0; margin-bottom: 10px; }
.spot h2 { font-size: clamp(1.4rem, 3.4vw, 2.4rem); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 10px; }
.spot .m { opacity: 0.85; font-size: 0.92rem; margin: 0 0 16px; }
.spot .go { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: #111; border: 0; border-radius: 980px; padding: 10px 18px; font-weight: 600; }
.spot .go svg { width: 16px; height: 16px; }

/* horizontal shelf of wide cards */
.row-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 14px; }
.row-head h3 { font-size: 1.3rem; letter-spacing: -0.02em; margin: 0; }
.row-head a { color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.vshelf { display: grid; grid-auto-flow: column; grid-auto-columns: 300px; gap: 18px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 40px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.vshelf::-webkit-scrollbar { display: none; }
@media (max-width: 520px) { .vshelf { grid-auto-columns: 260px; } }
.wcard { scroll-snap-align: start; cursor: pointer; }
.wcard .thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; }
.wcard .thumb canvas { width: 100%; height: 100%; }
.dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,0.78); color: #fff; font-size: 0.74rem; font-weight: 600; padding: 2px 7px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.wcard .cap { padding: 11px 2px 0; }
.wcard .cap b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; font-size: 0.98rem; line-height: 1.3; letter-spacing: -0.01em; }
.wcard .cap span { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 4px; }

/* editorial list: frame left, big meta right */
.vlist { display: grid; gap: 14px; margin-bottom: 20px; }
.lrow { display: grid; grid-template-columns: 300px minmax(0,1fr); gap: 20px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 12px; cursor: pointer; }
.lrow:hover { background: var(--surface-2); }
.lrow .thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.lrow .thumb canvas { width: 100%; height: 100%; }
.lrow .info h4 { font-size: 1.15rem; letter-spacing: -0.015em; margin: 0 0 8px; line-height: 1.25; }
.lrow .info .ch { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 0.9rem; margin-bottom: 8px; }
.lrow .info .ch i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 0.8rem; }
.lrow .info p { margin: 0; color: var(--muted); font-size: 0.9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lrow .info .stat { color: var(--muted); font-size: 0.85rem; margin-top: 8px; }
@media (max-width: 640px) { .lrow { grid-template-columns: 1fr; } .lrow .info h4 { font-size: 1.05rem; } }

/* ---------- watch page (vertical, no right rail) ---------- */
.w-wrap { max-width: 880px; }
.vplayer { border-radius: 18px; overflow: hidden; background: #000; }
.vstage { position: relative; aspect-ratio: 16 / 9; cursor: pointer; }
.vstage canvas { width: 100%; height: 100%; }
.vov { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,0.25); }
.vov[hidden] { display: none; }
.vplay { width: 76px; height: 76px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.92); color: #111; display: grid; place-items: center; }
.vplay svg { width: 32px; height: 32px; margin-left: 4px; }
.vspin { width: 36px; height: 36px; border: 3px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .vspin { animation-duration: 3s; } }
.vctrl { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 10px; background: linear-gradient(transparent, rgba(0,0,0,0.65)); color: #fff; }
.vseek { position: relative; height: 16px; cursor: pointer; touch-action: none; }
.vseek .r { position: absolute; left: 0; right: 0; top: 6px; height: 4px; background: rgba(255,255,255,0.3); border-radius: 2px; }
.vseek .b { position: absolute; left: 0; top: 6px; height: 4px; background: rgba(255,255,255,0.5); border-radius: 2px; width: 0; }
.vseek .p { position: absolute; left: 0; top: 6px; height: 4px; background: var(--accent); border-radius: 2px; width: 0; }
.vseek .k { position: absolute; top: 1px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--accent); left: 0; }
.vbar { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.vbar button { background: transparent; border: 0; color: #fff; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; }
.vbar button:hover { background: rgba(255,255,255,0.15); }
.vbar svg { width: 20px; height: 20px; }
.vtime { font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.vbar .sp { flex: 1; }
.vbar select { background: rgba(0,0,0,0.45); border: 1px solid rgba(255,255,255,0.25); color: #fff; border-radius: 8px; padding: 4px 6px; font-size: 0.82rem; }

.w-title { font-size: 1.5rem; letter-spacing: -0.02em; line-height: 1.22; margin: 18px 0 14px; }
.w-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.w-ch { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.w-ch .ava { width: 46px; height: 46px; font-size: 1rem; }
.w-ch b { display: block; font-weight: 600; }
.w-ch div span { color: var(--muted); font-size: 0.85rem; }
.sub-btn { background: var(--accent); color: #fff; }
.sub-btn[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }
.pill { display: inline-flex; align-items: center; background: var(--surface-2); border-radius: 980px; overflow: hidden; }
.pill button { border: 0; background: transparent; display: inline-flex; align-items: center; gap: 7px; padding: 10px 16px; font-weight: 500; }
.pill button + button { border-left: 1px solid var(--line); }
.pill svg { width: 17px; height: 17px; }
.pill button[aria-pressed="true"] { color: var(--accent); }
.desc { background: var(--surface-2); border-radius: 16px; padding: 16px; margin-top: 18px; font-size: 0.94rem; }
.desc b { font-weight: 600; }
.desc p { margin: 8px 0 0; white-space: pre-line; color: var(--muted); }
.comments { margin-top: 28px; }
.comments h3 { font-size: 1.15rem; margin: 0 0 18px; }
.cm-new { display: flex; gap: 12px; margin-bottom: 24px; align-items: center; }
.cm-new input { flex: 1; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 11px 14px; outline: none; }
.cm-new input:focus { border-color: var(--accent); }
.cm { display: flex; gap: 12px; margin-bottom: 20px; }
.cm .ava { width: 40px; height: 40px; font-size: 0.9rem; }
.cm b { font-size: 0.88rem; font-weight: 600; }
.cm b span { color: var(--muted); font-weight: 400; margin-left: 7px; }
.cm p { margin: 4px 0 0; font-size: 0.94rem; }
.ava { border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-weight: 600; }
.up-next { margin-top: 36px; }
.up-next h3 { font-size: 1.2rem; letter-spacing: -0.02em; margin: 0 0 16px; }
