@font-face { font-family: Unbounded; font-weight: 400 800; font-display: swap; src: url(/fonts/unbounded-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Unbounded; font-weight: 400 800; font-display: swap; src: url(/fonts/unbounded-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Manrope; font-weight: 400 800; font-display: swap; src: url(/fonts/manrope-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Manrope; font-weight: 400 800; font-display: swap; src: url(/fonts/manrope-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --bg: #08070f;
  --bg-2: #0e0c1a;
  --glass: rgb(255 255 255 / .05);
  --glass-2: rgb(255 255 255 / .09);
  --glass-3: rgb(255 255 255 / .14);
  --line: rgb(255 255 255 / .08);
  --text: #f5f3ff;
  --muted: #a39ec7;
  --dim: #6f6a94;
  --pink: #ff3d9a;
  --violet: #8a5cff;
  --cyan: #3fd5ff;
  --live: #ff3b5c;
  --ok: #3fe0a0;
  --grad: linear-gradient(135deg, var(--pink), var(--violet) 55%, var(--cyan));
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.4, .5, 1);
  --sidebar: 248px;
  --dock: 84px;
  --r: 18px;
  --display: Unbounded, system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 16px/1.45 Manrope, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
svg { width: 24px; height: 24px; fill: currentColor; flex: none; }
.display { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.error { color: var(--live); min-height: 1.3em; margin: 0; font-size: 14px; }

/* ---------- Фон: размытая обложка текущей станции ---------- */
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ambient-layer {
  position: absolute; inset: -15%;
  background-size: cover; background-position: center;
  filter: blur(70px) saturate(1.6);
  opacity: 0; transition: opacity 1.4s var(--ease);
}
.ambient-layer.on { opacity: .38; }
.ambient-glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 15% 0%, rgb(138 92 255 / .22), transparent 70%),
    radial-gradient(50% 45% at 100% 10%, rgb(255 61 154 / .14), transparent 70%),
    linear-gradient(180deg, transparent 30%, var(--bg) 100%);
}

/* ---------- Кнопки ---------- */
.btn {
  min-height: 46px; padding: 0 20px; border-radius: 14px;
  background: var(--glass-2); font-weight: 700;
  transition: background .2s, transform .15s var(--ease);
}
.btn:hover { background: var(--glass-3); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 8px 30px -8px rgb(255 61 154 / .6); }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { background: var(--glass); }
.btn.danger { color: var(--live); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn.wide { width: 100%; }

.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  color: var(--muted); transition: background .2s, color .2s, transform .15s;
}
.icon-btn:hover { background: var(--glass-2); color: var(--text); }
.icon-btn:active { transform: scale(.92); }

.ctl {
  display: grid; place-items: center; border-radius: 50%; color: var(--text);
  transition: transform .2s var(--spring), background .2s, opacity .2s;
}
.ctl:hover { background: var(--glass-2); }
.ctl:active { transform: scale(.88); }
.ctl.xs { width: 38px; height: 38px; color: var(--muted); }
.ctl.xs:hover { color: var(--text); }
.ctl.xs svg { width: 20px; height: 20px; }
.ctl.sm { width: 46px; height: 46px; }
.ctl.md { width: 72px; height: 72px; }
.ctl.md svg { width: 34px; height: 34px; }

.play-btn { position: relative; background: var(--text); color: var(--bg); }
.play-btn:hover { background: #fff; transform: scale(1.05); }
.play-btn.sm { width: 48px; height: 48px; }
.play-btn.lg { width: 96px; height: 96px; background: var(--grad); color: #fff; box-shadow: 0 14px 50px -10px rgb(255 61 154 / .7); }
.play-btn.lg svg { width: 42px; height: 42px; }
.play-btn svg { transition: transform .25s var(--spring), opacity .2s; }
.play-btn .i-pause, .play-btn.playing .i-play { opacity: 0; transform: scale(.4) rotate(-30deg); position: absolute; }
.play-btn.playing .i-pause { opacity: 1; transform: none; position: static; }
.spinner {
  position: absolute; inset: -5px; border-radius: 50%;
  border: 3px solid transparent; border-top-color: var(--cyan); border-right-color: var(--pink);
  opacity: 0; transition: opacity .3s;
}
.play-btn.loading .spinner { opacity: 1; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 22px; background: var(--glass-2); color: var(--muted); font-weight: 700; font-size: 15px;
  transition: background .2s, color .2s, transform .15s;
}
.pill svg { width: 18px; height: 18px; }
.pill:hover { background: var(--glass-3); color: var(--text); }
.pill:active { transform: scale(.95); }

/* ---------- Вход ---------- */
.login { position: relative; z-index: 1; min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login-card {
  width: min(380px, 100%); display: grid; gap: 14px; text-align: center; justify-items: center;
  padding: 36px 28px; border-radius: 28px; background: rgb(20 17 38 / .7);
  backdrop-filter: blur(20px); box-shadow: inset 0 0 0 1px var(--line), 0 30px 80px -20px #000;
  animation: rise .6s var(--ease) both;
}
.login-card h1 { margin: 6px 0 0; font-size: 34px; }
.login-card p { margin: 0 0 8px; }
.login-card input {
  width: 100%; min-height: 54px; padding: 0 18px; border-radius: 14px; border: 0;
  background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line); outline: none; transition: box-shadow .2s;
}
.login-card input:focus { box-shadow: inset 0 0 0 2px var(--violet); }

.logo-mark {
  width: 30px; height: 30px; border-radius: 50%; flex: none; position: relative;
  background: var(--grad); box-shadow: 0 0 24px -4px rgb(255 61 154 / .8);
}
.logo-mark::after { content: ""; position: absolute; inset: 37%; border-radius: 50%; background: var(--bg); }
.logo-mark.big { width: 64px; height: 64px; }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

/* ---------- Каркас ---------- */
.app { position: relative; z-index: 1; }
.sidebar {
  position: fixed; left: 0; top: 0; bottom: var(--dock-h, 0px); width: var(--sidebar);
  padding: 22px 14px; display: flex; flex-direction: column; gap: 6px;
  border-right: 1px solid var(--line); background: rgb(8 7 15 / .55); backdrop-filter: blur(20px);
  transition: bottom .4s var(--ease);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 12px 18px; color: var(--text); text-decoration: none; font-size: 20px; }
.side-nav { display: grid; gap: 4px; flex: 1; align-content: start; }
.side-link {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 0 14px;
  border-radius: 12px; color: var(--muted); font-weight: 700; text-align: left; transition: background .2s, color .2s;
}
.side-link svg { width: 20px; height: 20px; }
.side-link:hover { background: var(--glass); color: var(--text); }
.side-link.active { background: var(--glass-2); color: var(--text); }
.side-link .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--violet)); box-shadow: 0 0 10px var(--c, var(--violet)); margin: 0 6px; }
.side-link .count { margin-left: auto; font-size: 13px; color: var(--dim); }

.content { margin-left: var(--sidebar); padding: 0 36px calc(var(--dock-h, 0px) + 40px); min-height: 100dvh; }

.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  margin: 0 -36px; padding: 16px 36px 14px; transition: background .3s, box-shadow .3s;
}
.scrolled .topbar { background: rgb(8 7 15 / .72); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5); box-shadow: 0 1px 0 var(--line); }
.search {
  flex: 1; max-width: 420px; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px;
  border-radius: 23px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); color: var(--dim);
  transition: box-shadow .2s, background .2s;
}
.search:focus-within { background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--violet); color: var(--text); }
.search svg { width: 18px; height: 18px; }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--text); }
.search input::-webkit-search-cancel-button { filter: invert(1); opacity: .5; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 16px 6px; margin: 0 -16px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 40px; padding: 0 18px; border-radius: 20px; background: var(--glass); color: var(--muted);
  font-weight: 700; font-size: 15px; box-shadow: inset 0 0 0 1px var(--line); transition: all .25s var(--ease);
}
.chip.active { background: var(--text); color: var(--bg); box-shadow: none; }

/* ---------- Станции ---------- */
.sections { display: grid; gap: 34px; padding-top: 8px; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 14px; }
.section-head h2 { margin: 0; font-size: 24px; }
.section-head span { color: var(--dim); font-size: 14px; font-weight: 700; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 22px 18px; }
.empty { color: var(--muted); padding: 40px 0; text-align: center; }

.card { text-align: left; display: grid; gap: 10px; animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 25ms); }
.card-art {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden;
  box-shadow: 0 10px 30px -14px #000, inset 0 0 0 1px var(--line);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card:hover .card-art { transform: translateY(-4px); box-shadow: 0 20px 40px -16px #000, 0 0 0 1px var(--glass-3); }
.card:active .card-art { transform: scale(.97); }
.card.current .card-art { box-shadow: 0 0 0 2px var(--text), 0 18px 50px -12px rgb(138 92 255 / .7); }
.card-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgb(0 0 0 / .55)); }
.card-play {
  position: absolute; right: 12px; bottom: 12px; z-index: 2; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 8px 20px -6px #000;
  opacity: 0; transform: translateY(8px) scale(.9); transition: all .3s var(--ease);
}
.card-play svg { width: 22px; height: 22px; }
.card:hover .card-play { opacity: 1; transform: none; }
.card.current .card-play { opacity: 0; }
.card-badge { position: absolute; left: 10px; top: 10px; z-index: 2; }
.card-eq { position: absolute; right: 14px; bottom: 14px; z-index: 2; }
.card-name { font-weight: 800; font-size: 17px; line-height: 1.25; padding: 0 2px; }
.card-meta { color: var(--muted); font-size: 13px; margin-top: -6px; padding: 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.kind-badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 8px;
  font: 800 11px/1 var(--display); letter-spacing: .06em; color: #fff;
  background: rgb(0 0 0 / .5); backdrop-filter: blur(8px);
}
.kind-badge:empty { display: none; }
.kind-badge.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 8px var(--live); animation: pulse 1.6s ease-in-out infinite; }
.kind-badge.radio::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); }
.kind-badge.mix::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--pink); }
@keyframes pulse { 50% { opacity: .35; } }

/* Эквалайзер «сейчас играет» */
.eq { display: flex; align-items: flex-end; gap: 3px; height: 18px; }
.eq i { width: 4px; border-radius: 2px; background: #fff; height: 30%; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.4s; } .eq i:nth-child(3) { animation-delay: -.7s; } .eq i:nth-child(4) { animation-delay: -.2s; }
.paused .eq i { animation-play-state: paused; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }

/* Обложки: картинка или сгенерированный «закат» для радио */
.cover-box { position: relative; overflow: hidden; background: var(--bg-2); }
.cover-box > img, .cover-box > .gen { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-box > img { opacity: 0; transition: opacity .6s var(--ease); }
.cover-box > img.loaded { opacity: 1; }
.gen {
  background: linear-gradient(180deg, hsl(var(--h) 75% 10%) 0%, hsl(calc(var(--h) + 40) 80% 24%) 58%, #07040f 58%);
}
.gen::before {
  content: ""; position: absolute; left: 50%; top: 14%; width: 46%; aspect-ratio: 1; transform: translateX(-50%);
  border-radius: 50%; background: linear-gradient(180deg, hsl(calc(var(--h) + 120) 100% 66%), hsl(calc(var(--h) + 330) 100% 58%) 75%);
  -webkit-mask: linear-gradient(180deg, #000 52%, transparent 52% 57%, #000 57% 64%, transparent 64% 69%, #000 69% 75%, transparent 75% 80%, #000 80% 85%, transparent 85%);
          mask: linear-gradient(180deg, #000 52%, transparent 52% 57%, #000 57% 64%, transparent 64% 69%, #000 69% 75%, transparent 75% 80%, #000 80% 85%, transparent 85%);
  filter: drop-shadow(0 0 18px hsl(calc(var(--h) + 330) 100% 60% / .7));
}
.gen::after {
  content: ""; position: absolute; left: -50%; right: -50%; bottom: 0; height: 42%;
  background:
    linear-gradient(hsl(calc(var(--h) + 300) 100% 65% / .7) 1.5px, transparent 1.5px) 0 0 / 100% 18%,
    linear-gradient(90deg, hsl(calc(var(--h) + 300) 100% 65% / .7) 1.5px, transparent 1.5px) 0 0 / 8% 100%;
  transform: perspective(120px) rotateX(55deg); transform-origin: top;
}

/* ---------- Мини-плеер ---------- */
.dock {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 20;
  height: var(--dock); display: flex; align-items: center; gap: 18px; padding: 0 18px 0 12px;
  border-radius: 22px; background: rgb(22 19 40 / .78); backdrop-filter: blur(28px) saturate(1.5);
  box-shadow: inset 0 0 0 1px var(--line), 0 20px 60px -10px #000;
  animation: dock-in .5s var(--ease) both;
}
@keyframes dock-in { from { transform: translateY(140%); } }
.dock-progress { position: absolute; left: 22px; right: 22px; top: 0; height: 2px; border-radius: 1px; overflow: hidden; }
.dock-progress div { height: 100%; width: 0; background: var(--grad); transition: width .3s linear; }
.dock-now { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; text-align: left; }
.dock-cover { width: 60px; height: 60px; border-radius: 14px; flex: none; }
.dock-text { min-width: 0; }
.dock-station { font-weight: 800; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-title { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-controls { display: flex; align-items: center; gap: 6px; }
.dock-extra { display: flex; align-items: center; gap: 4px; }
.volume { display: flex; align-items: center; gap: 4px; }
.volume input { width: 100px; accent-color: var(--violet); }

/* ---------- Большой плеер ---------- */
.stage {
  position: fixed; inset: 0; z-index: 30; display: grid; grid-template-rows: auto 1fr auto;
  background: var(--bg); overflow: hidden;
  transform: translateY(100%); visibility: hidden;
  transition: transform .55s var(--ease), visibility 0s .55s;
}
.stage.open { transform: none; visibility: visible; transition: transform .55s var(--ease), visibility 0s; }
.stage.dragging { transition: none; }
.stage-bg { position: absolute; inset: -10%; z-index: 0; filter: blur(60px) saturate(1.7) brightness(.55); transform: scale(1.1); }
.stage-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(8 7 15 / .2), rgb(8 7 15 / .75)); }
.stage > :not(.stage-bg) { position: relative; z-index: 1; }
.stage-head { display: flex; align-items: center; justify-content: space-between; padding: calc(12px + env(safe-area-inset-top)) 16px 4px; }
.stage-genre { font: 700 12px var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.stage-body {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, 1fr); align-items: center;
  gap: clamp(24px, 5vw, 72px); padding: 12px clamp(20px, 6vw, 96px); min-height: 0;
}
.stage-art { display: grid; place-items: center; min-height: 0; touch-action: pan-y; }
.stage-cover {
  width: 100%; max-width: 760px; aspect-ratio: 16 / 9; border-radius: 26px;
  box-shadow: 0 40px 90px -30px #000, 0 0 0 1px rgb(255 255 255 / .06);
  transition: transform .5s var(--ease), opacity .3s;
}
.stage-cover.swipe-l { transform: translateX(-30px) scale(.97); opacity: .4; }
.stage-cover.swipe-r { transform: translateX(30px) scale(.97); opacity: .4; }
.stage.paused .stage-cover { transform: scale(.94); }
.stage-side { display: grid; gap: 26px; min-width: 0; }
.stage-info { display: grid; gap: 10px; justify-items: start; }
.stage-station { margin: 0; font-size: clamp(28px, 3.4vw, 46px); line-height: 1.08; overflow-wrap: anywhere; }
.stage-title { margin: 0; color: var(--muted); font-size: 18px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 1.45em; }
.stage-status { margin: 0; color: var(--cyan); font-size: 15px; font-weight: 700; }
.stage-status:empty { display: none; }

.seek { height: 24px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.seek::before { content: ""; position: absolute; }
.seek { position: relative; }
.seek::after { content: ""; position: absolute; left: 0; right: 0; height: 6px; border-radius: 3px; background: rgb(255 255 255 / .16); }
.seek-fill { position: relative; z-index: 1; height: 6px; width: 0; border-radius: 3px; background: var(--grad); }
.seek-knob { position: absolute; right: -8px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px #0008; transform: scale(0); transition: transform .2s var(--spring); }
.seek:hover .seek-knob, .seek.active .seek-knob { transform: none; }
.seek-times { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; font-weight: 700; }

.stage-controls { display: flex; align-items: center; justify-content: flex-start; gap: 22px; }
.stage-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.stage-strip { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding: 8px clamp(20px, 6vw, 96px) calc(22px + env(safe-area-inset-bottom)); scroll-behavior: smooth; }
.stage-strip::-webkit-scrollbar { display: none; }
.strip-item { flex: none; width: 150px; display: grid; gap: 6px; text-align: left; opacity: .7; transition: opacity .2s, transform .2s var(--ease); }
.strip-item:hover, .strip-item.current { opacity: 1; }
.strip-item:active { transform: scale(.95); }
.strip-item .cover-box { aspect-ratio: 16 / 9; border-radius: 12px; }
.strip-item.current .cover-box { box-shadow: 0 0 0 2px var(--text); }
.strip-item span { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mix-hidden .mix-only { display: none !important; }

/* ---------- Настройки ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgb(0 0 0 / .5); backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: opacity .35s, visibility 0s .35s; }
.scrim.on { opacity: 1; visibility: visible; transition: opacity .35s; }
.panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 41; width: min(520px, 100%);
  display: grid; grid-template-rows: auto 1fr; background: rgb(16 14 30 / .96); backdrop-filter: blur(30px);
  box-shadow: -30px 0 80px -20px #000; transform: translateX(105%); visibility: hidden;
  transition: transform .45s var(--ease), visibility 0s .45s;
}
.panel.open { transform: none; visibility: visible; transition: transform .45s var(--ease); }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: calc(16px + env(safe-area-inset-top)) 20px 12px 24px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 22px; }
.panel-body { overflow-y: auto; padding: 20px 24px calc(40px + env(safe-area-inset-bottom)); display: grid; gap: 18px; align-content: start; }
.group { display: grid; gap: 14px; padding: 18px; border-radius: var(--r); background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); }
.group h3 { margin: 0; font: 700 15px var(--display); }
.field-row { display: grid; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 700; }
select, .form input:not([type=checkbox]):not([type=radio]) {
  width: 100%; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 0; outline: none;
  background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); transition: box-shadow .2s;
}
select:focus, .form input:focus { box-shadow: inset 0 0 0 2px var(--violet); }
select option { background: var(--bg-2); }

.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 15px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { flex: none; width: 46px; height: 28px; border-radius: 14px; background: var(--glass-3); position: relative; transition: background .25s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .3s var(--spring); }
.switch input:checked + span { background: var(--violet); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }

.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 700; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { margin: -6px 0 0; font-size: 13px; color: var(--dim); }
.form-actions { display: flex; gap: 10px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; border-radius: 14px; background: var(--glass-2); }
.seg input { position: absolute; opacity: 0; }
.seg span { display: grid; place-items: center; min-height: 40px; padding: 0 6px; border-radius: 10px; font-size: 13px; font-weight: 800; color: var(--muted); text-align: center; cursor: pointer; transition: all .25s var(--ease); }
.seg input:checked + span { background: var(--text); color: var(--bg); }

.status { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.status b { color: var(--text); }
.meter { height: 6px; border-radius: 3px; background: var(--glass-3); overflow: hidden; }
.meter div { height: 100%; background: var(--grad); }

.admin-list { display: grid; gap: 2px; }
.adm { display: grid; gap: 6px; padding: 12px 0; border-top: 1px solid var(--line); }
.adm:first-child { border-top: 0; }
.adm-head { display: flex; align-items: center; gap: 10px; }
.adm-name { font-weight: 800; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm.off .adm-name { color: var(--dim); }
.adm-meta { font-size: 13px; color: var(--dim); overflow-wrap: anywhere; }
.adm-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.tracks { display: grid; font-size: 13px; max-height: 320px; overflow-y: auto; border-radius: 10px; background: rgb(0 0 0 / .2); }
.trk { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-top: 1px solid var(--line); }
.trk:first-child { border-top: 0; }
.trk-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.trk-st { flex: none; color: var(--dim); font-weight: 700; }
.trk-st.ready { color: var(--ok); }
.trk-st.error { color: var(--live); }
.trk button { flex: none; color: var(--dim); }
.trk button:hover { color: var(--live); }
.trk svg { width: 16px; height: 16px; }

/* ---------- Уведомление ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--dock-h, 0px) + 28px + env(safe-area-inset-bottom)); z-index: 60;
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 14px; background: #fff; color: var(--bg); font-weight: 700;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: all .35s var(--ease);
}
.toast.on { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Адаптив ---------- */
.mobile-only { display: none !important; }

@media (max-width: 899px) {
  :root { --dock: 72px; }
  .mobile-only { display: flex !important; }
  .desktop-only { display: none !important; }
  .sidebar { display: none; }
  .content { margin: 0; padding: 0 16px calc(var(--dock-h, 0px) + 28px); }
  .topbar { position: relative; margin: 0; padding: calc(10px + env(safe-area-inset-top)) 0 8px; flex-wrap: wrap; }
  .scrolled .topbar { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
  .chips { position: sticky; top: 0; z-index: 5; padding-top: calc(8px + env(safe-area-inset-top)); padding-bottom: 10px; transition: background .3s, box-shadow .3s; }
  .scrolled .chips { background: rgb(8 7 15 / .78); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5); box-shadow: 0 1px 0 var(--line); }
  .topbar .brand { padding: 0; flex: 1; }
  .search { order: 3; flex-basis: 100%; max-width: none; height: 44px; }
  .sections { gap: 26px; }
  .section-head h2 { font-size: 20px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px 12px; }
  .card-name { font-size: 15px; }
  .card-play { display: none; }
  .dock { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); gap: 10px; padding: 0 10px 0 8px; border-radius: 18px; }
  .dock-cover { width: 54px; height: 54px; border-radius: 12px; }
  .dock-controls .ctl.sm:not(.play-btn) { width: 44px; }

  .stage { grid-template-rows: auto 1fr auto; }
  .stage-body { grid-template-columns: 1fr; align-content: center; gap: 22px; padding: 8px 22px; }
  .stage-cover { border-radius: 20px; }
  .stage-side { gap: 20px; }
  .stage-station { font-size: clamp(26px, 8vw, 34px); }
  .stage-title { font-size: 16px; }
  .stage-controls { justify-content: space-between; padding: 0 4px; }
  .stage-actions { justify-content: center; }
  .stage-actions .pill { flex: 1; justify-content: center; }
  .strip-item { width: 120px; }
  .panel { width: 100%; top: auto; height: 94dvh; border-radius: 24px 24px 0 0; transform: translateY(105%); }
  .panel.open { transform: none; }
}

/* Телефон на держателе в машине: альбомная ориентация */
@media (max-width: 999px) and (orientation: landscape) and (max-height: 540px) {
  .stage-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; padding: 0 24px; }
  .stage-strip { display: none; }
  .stage-side { gap: 14px; grid-template-columns: 1fr auto; align-items: center; }
  .stage-info, .stage-progress { grid-column: 1 / -1; }
  .stage-info { gap: 6px; }
  .stage-cover { max-height: calc(100dvh - 90px); }
  .stage-actions { gap: 8px; }
  .stage-actions .pill { width: 52px; height: 52px; padding: 0; justify-content: center; font-size: 0; gap: 0; border-radius: 50%; }
  .stage-actions .pill svg { width: 22px; height: 22px; }
  .stage-station { font-size: 26px; }
  .stage-title { -webkit-line-clamp: 1; }
  .stage-controls { justify-content: flex-start; gap: 18px; }
  .ctl.md { width: 64px; height: 64px; }
  .play-btn.lg { width: 84px; height: 84px; }
  .stage-actions .pill { flex: none; }
  .stage-head { padding-top: 6px; }
}

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

.static .card { animation: none; }
.toast { display: flex; align-items: center; gap: 14px; }
.toast-act { color: var(--violet); font-weight: 800; padding: 4px 2px; }
