@font-face { font-family: "Unbounded"; src: url("../fonts/unbounded.ttf") format("truetype"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Golos"; src: url("../fonts/golos_text.ttf") format("truetype"); font-weight: 400 900; font-display: swap; }

:root {
  --bg: #0A0A0A; --surface: #151515; --surface2: #1A1A1A; --sheet: #161616; --border: #2A2A2A;
  --text: #F2F2EE; --muted: #8E8E88; --muted2: #A3A39C; --green: #5FC27E; --red: #E5484D;
  --top: env(safe-area-inset-top, 0px); --bottom: env(safe-area-inset-bottom, 0px);
}
[hidden] { display: none !important; }
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: var(--bg); }
body {
  color: var(--text); font-family: "Golos", system-ui, sans-serif; font-size: 16px; line-height: 1.4;
  overscroll-behavior: none; -webkit-user-select: none; user-select: none; overflow: hidden;
}
input, button { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
img { display: block; }
svg { display: block; }

#app { height: 100%; display: flex; flex-direction: column; max-width: 620px; margin: 0 auto; }
#screen { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-top: var(--top); padding-bottom: 16px; }

/* ---------- общие ---------- */
.pad { padding: 0 20px; }
.display { font-family: "Unbounded"; font-weight: 800; text-transform: uppercase; letter-spacing: -.01em; line-height: 1; }
.label { font-weight: 700; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.title { font-size: 28px; padding: 20px 20px 12px; }
.topbar { display: flex; align-items: center; gap: 8px; padding: 12px 12px 4px; min-height: 56px; }
.topbar .grow { flex: 1; }
.iconbtn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--muted2); }
.iconbtn:active { background: var(--surface2); }
.iconbtn svg { width: 24px; height: 24px; }
.box { width: 44px; height: 44px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; }
.badge { font-family: "Unbounded"; font-weight: 700; font-size: 15px; }
.box svg { width: 22px; height: 22px; }
.btn {
  height: 48px; padding: 0 20px; border-radius: 14px; font-weight: 700; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--text); color: var(--bg);
}
.btn.green { background: var(--green); color: var(--bg); }
.btn.ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn:active { opacity: .8; }
.btn svg { width: 20px; height: 20px; }
.btn[disabled] { opacity: .4; }
.section { padding: 22px 20px 6px; display: flex; align-items: center; justify-content: space-between; }
.empty { color: var(--muted); padding: 24px 20px; font-size: 15px; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--green); border-right-color: transparent; animation: rot .8s linear infinite; display: inline-block; flex: none; }
@keyframes rot { to { transform: rotate(360deg); } }
.loading { display: flex; align-items: center; gap: 10px; padding: 20px; color: var(--muted); }

/* ---------- ряд трека ---------- */
.row { display: flex; align-items: center; gap: 12px; padding: 7px 8px 7px 20px; }
.row:active { background: var(--surface); }
.cv { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--surface2); flex: none; }
.tx { flex: 1; min-width: 0; }
.tx b { display: block; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx span { display: block; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row.now .tx b { color: var(--green); }
.ic { width: 40px; height: 40px; display: grid; place-items: center; color: var(--muted); flex: none; border-radius: 10px; }
.ic svg { width: 22px; height: 22px; }
.ic.on { color: var(--green); }

/* ---------- эфир ---------- */
.onair { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.onair.live { color: var(--green); }
.onair i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.airtitle { font-size: 40px; margin-top: 8px; word-break: break-word; }
.airbar { display: flex; align-items: flex-end; margin-top: 16px; gap: 12px; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 44px; flex: 1; }
.bars i { width: 6px; border-radius: 3px; background: #3A3A3A; transform-origin: bottom; }
.bars.live i { background: var(--green); animation: bar .5s ease-in-out infinite alternate; }
@keyframes bar { from { transform: scaleY(.2); } to { transform: scaleY(1); } }
.status { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 13px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 24px 20px 0; }
.tile {
  border-radius: 16px; background: var(--surface); border: 1px solid var(--border); padding: 16px; height: 110px;
  display: flex; flex-direction: column; justify-content: space-between; text-align: left;
}
.tile.wide { grid-column: 1 / -1; height: 92px; }
.tile .n { font-family: "Unbounded"; font-weight: 700; font-size: 13px; color: var(--muted); }
.tile .t { display: flex; align-items: flex-end; gap: 8px; }
.tile .t b { font-family: "Unbounded"; font-weight: 700; font-size: 17px; flex: 1; }
.tile .t span { font-size: 13px; color: var(--muted); }
.tile.on { background: var(--green); border-color: var(--green); }
.tile.on .n, .tile.on b, .tile.on span { color: var(--bg); }
.tile:active { transform: scale(.98); }

/* ---------- поиск ---------- */
.search { margin: 0 20px; display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 14px; padding: 0 14px; height: 50px; }
.search svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.search input { flex: 1; background: none; border: 0; outline: 0; font-size: 16px; min-width: 0; -webkit-user-select: text; user-select: text; }
.search input::placeholder { color: var(--muted); }
.sugs { padding: 6px 20px 2px; }
.sugs .chip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex: none; color: var(--muted2); height: 34px; }
.sugs .chip svg { width: 14px; height: 14px; color: var(--muted); }
.searchbar { height: 2px; margin: 8px 0 4px; position: relative; overflow: hidden; }
.searchbar.on::after { content: ""; position: absolute; left: -40%; width: 40%; height: 100%; background: var(--green); animation: slide 1s linear infinite; }
@keyframes slide { to { left: 100%; } }
.cv.round { border-radius: 50%; }

/* ---------- опрос и главная ---------- */
.svcard { margin: 20px 20px 0; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.svcard b { font-family: "Unbounded"; font-size: 17px; }
.svcard span { color: var(--muted); font-size: 14px; }
.svcard .btn { align-self: flex-start; margin-top: 10px; height: 40px; font-style: normal; }
.steps { display: flex; gap: 6px; padding-left: 8px; }
.steps i { width: 12px; height: 6px; border-radius: 3px; background: var(--border); }
.steps i.done { background: var(--green); }
.steps i.cur { width: 28px; background: var(--green); }
.survey { padding: 8px 20px 0; }
.survey h1 { font-size: 32px; line-height: 1.05; margin-top: 8px; }
.survey p.muted { margin: 8px 0 16px; font-size: 15px; }
.survey .chips { padding: 0; }
.survey .item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 4px; text-align: left; font-size: 15px; border-bottom: 1px solid var(--border); }
.survey .item svg { width: 20px; height: 20px; color: var(--green); flex: none; }
.survey .item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.survey .item em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--green); }
/* поиск исполнителя — первым и заметно: друг его не увидел среди списка */
.svsearch { margin-top: 16px; }
.svsearch label { display: block; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--green); margin-bottom: 8px; }
.svsearch .search { margin: 0; height: 54px; border: 1.5px solid var(--green); background: rgba(95,194,126,.08); }
.svsearch .search svg { color: var(--green); width: 22px; height: 22px; }
.svfind { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 48px; margin-top: 16px;
  border-radius: 14px; border: 1px dashed var(--green); color: var(--green); font-weight: 600; font-size: 15px; }
.svfind svg { width: 18px; height: 18px; }
.chip.on { background: var(--green); border-color: var(--green); color: var(--bg); font-weight: 600; }
.chip { display: inline-flex; align-items: center; gap: 6px; }
.chip svg { width: 15px; height: 15px; }
.novelty { display: grid; gap: 10px; }
.novelty .tile { height: auto; min-height: 84px; gap: 6px; }
.section .ic svg { width: 20px; height: 20px; }
.svact { position: sticky; bottom: -16px; padding-top: 28px; padding-bottom: 16px; background: linear-gradient(to bottom, transparent, var(--bg) 40%); }

/* ---------- медиатека ---------- */
.seg { display: flex; gap: 8px; padding: 4px 20px 8px; overflow-x: auto; }
.seg button { height: 36px; padding: 0 16px; border-radius: 18px; background: var(--surface); font-size: 14px; white-space: nowrap; }
.seg button.on { background: var(--text); color: var(--bg); font-weight: 600; }
.pl { display: flex; align-items: center; gap: 14px; padding: 10px 20px; }
.pl:active { background: var(--surface); }
.pl .cover { width: 56px; height: 56px; border-radius: 10px; background: var(--surface2); display: grid; place-items: center; color: var(--green); flex: none; overflow: hidden; }
.pl .cover img { width: 100%; height: 100%; object-fit: cover; }
.pl .cover svg { width: 26px; height: 26px; }
.head { padding: 8px 20px 4px; }
.head h1 { font-size: 30px; }
.head .sub { color: var(--muted); font-size: 14px; margin-top: 6px; }
.actions { display: flex; gap: 10px; padding: 16px 20px 8px; }
.actions .btn { flex: 1; }

/* ---------- исполнитель ---------- */
.artist-top { display: flex; flex-direction: column; align-items: center; padding: 8px 20px 4px; text-align: center; }
.artist-top img, .artist-top .ph { width: 148px; height: 148px; border-radius: 50%; object-fit: cover; background: var(--surface2); }
.artist-top h1 { font-size: 26px; margin-top: 16px; }
.hscroll { display: flex; gap: 12px; overflow-x: auto; padding: 4px 20px 8px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.album { width: 132px; flex: none; text-align: left; }
.album img { width: 132px; height: 132px; border-radius: 10px; object-fit: cover; background: var(--surface2); }
.album b { display: block; font-size: 14px; font-weight: 600; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.album span { font-size: 12px; color: var(--muted); }
.section .more { color: var(--green); font-size: 14px; font-weight: 600; padding: 4px 0 4px 12px; }
/* жанры: цветные плитки на главной и шапка страницы жанра */
.gtile {
  width: 132px; height: 84px; flex: none; border-radius: 14px; padding: 12px; text-align: left; display: flex; align-items: flex-end;
  background: var(--g); background: linear-gradient(135deg, var(--g), color-mix(in srgb, var(--g) 45%, #000));
}
.gtile b { font-family: "Unbounded"; font-weight: 700; font-size: 13px; line-height: 1.15; color: #fff; }
.ghead {
  margin: 8px 20px 0; padding: 48px 18px 18px; border-radius: 18px;
  background: var(--g); background: linear-gradient(135deg, var(--g), color-mix(in srgb, var(--g) 40%, #000));
}
.ghead h1 { font-size: 24px; color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 20px; }
.chip { height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--border); font-size: 14px; }

/* ---------- настройки ---------- */
.set { padding: 0 20px; }
.set .line { margin: 14px 0 6px; font-size: 15px; }
input[type=range] { width: 100%; -webkit-appearance: none; appearance: none; background: transparent; height: 28px; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--green) var(--p, 50%), #2E2E2B var(--p, 50%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--text); margin-top: -7px; }
input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: #2E2E2B; }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--green); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: var(--text); }
.field { width: 100%; height: 50px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); padding: 0 14px; font-size: 16px; outline: 0; -webkit-user-select: text; user-select: text; }
.field:focus { border-color: var(--muted); }

/* ---------- вход ---------- */
.login { min-height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 24px; gap: 12px; max-width: 420px; margin: 0 auto; }
.login .logo { width: 64px; height: 64px; border-radius: 16px; }
.login h1 { font-size: 34px; margin: 12px 0 4px; }
.login p { color: var(--muted2); margin-bottom: 8px; }
.login .err { color: var(--red); font-size: 14px; min-height: 20px; }
.login .seg { padding: 0; }

/* ---------- мини-плеер и вкладки ---------- */
#mini { position: relative; background: var(--bg); padding: 6px 8px 4px; }
#mini .inner { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 14px; padding: 6px 4px 6px 6px; position: relative; overflow: hidden; }
#mini .cv { width: 44px; height: 44px; }
#mini .prog { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--green); width: 0; }
#tabs { display: flex; padding: 4px 8px calc(6px + var(--bottom)); background: var(--bg); }
#tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; color: var(--muted); padding: 4px 0; border-radius: 12px; }
#tabs button svg { width: 24px; height: 24px; }
#tabs button.on { color: var(--text); font-weight: 600; }
#tabs button.on svg { color: var(--green); }

/* ---------- шторки ---------- */
#scrim { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 20; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--sheet); border-radius: 22px 22px 0 0;
  padding: 8px 0 calc(12px + var(--bottom)); max-width: 620px; margin: 0 auto; max-height: 85vh; overflow-y: auto;
  animation: up .22s ease-out;
}
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet .grip { width: 40px; height: 4px; border-radius: 2px; background: #3A3A3A; margin: 4px auto 10px; }
.sheet .mhead { display: flex; align-items: center; gap: 12px; padding: 4px 20px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.sheet .item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 20px; font-size: 16px; text-align: left; }
.sheet .item:active { background: var(--surface2); }
.sheet .item svg { width: 22px; height: 22px; color: var(--muted2); flex: none; }
.sheet .item.dim { color: var(--muted2); }

/* полноэкранный плеер */
.sheet.full { top: 0; max-height: none; border-radius: 0; background: var(--bg); padding: calc(8px + var(--top)) 0 calc(16px + var(--bottom)); display: flex; flex-direction: column; }
.full .bar { display: flex; align-items: center; padding: 0 12px; }
.full .bar .grow { flex: 1; text-align: center; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.full .art { flex: 1; display: grid; place-items: center; padding: 16px 28px; min-height: 0; }
.full .art img { width: 100%; max-width: 420px; aspect-ratio: 1; object-fit: cover; border-radius: 16px; background: var(--surface2); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.full .meta { display: flex; align-items: center; gap: 8px; padding: 0 20px 0 28px; }
.full .meta .tx b { font-family: "Unbounded"; font-weight: 700; font-size: 20px; }
.full .meta .tx span { font-size: 15px; color: var(--muted2); margin-top: 4px; }
.full .seek { padding: 14px 28px 0; }
.full .times { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); padding: 0 28px; }
.full .ctl { display: flex; align-items: center; justify-content: center; gap: 28px; padding: 14px 0 6px; }
.full .ctl .ic { width: 56px; height: 56px; color: var(--text); }
.full .ctl .ic svg { width: 32px; height: 32px; }
.full .ctl .play { width: 72px; height: 72px; border-radius: 50%; background: var(--green); color: var(--bg); display: grid; place-items: center; }
.full .ctl .play svg { width: 34px; height: 34px; }
.full .src { text-align: center; font-size: 12px; color: var(--muted); min-height: 16px; }

#toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(150px + var(--bottom)); z-index: 50;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 600;
  max-width: calc(100% - 32px); text-align: center; box-shadow: 0 8px 30px rgba(0,0,0,.4);
}
.hint { margin: 8px 20px 0; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); font-size: 14px; color: var(--muted2); display: flex; gap: 10px; align-items: flex-start; }
.hint b { color: var(--text); }
.hint svg { width: 20px; height: 20px; flex: none; margin-top: 1px; color: var(--green); }
.hint button { color: var(--muted); margin-left: auto; font-size: 18px; line-height: 1; }
