@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Tiny5&display=swap');

:root {
  --bg: #1a1b28;
  --panel: #222435;
  --panel-2: #2a2d42;
  --text: #f4eee0;
  --muted: #b3b7cc;
  --muted-2: #9297ae;
  --accent: #e9cf9a;
  --accent-2: #f1c3cb;
  --accent-3: #a8819a;
  --accent-ink: #191425;
  --accent-soft: rgba(233, 207, 154, .14);
  --line: rgba(233, 207, 154, .13);
  --line-2: rgba(233, 207, 154, .28);
  --shadow: 0 20px 48px rgba(5, 6, 14, .55);
  --glow: 0 0 26px rgba(233, 207, 154, .18);
  --radius: 16px;
  --header: 72px;
  --font-display: 'Tiny5', 'Manrope', sans-serif;
}

html[data-theme="light"] {
  --bg: #f4f0e6;
  --panel: #fffdf8;
  --panel-2: #f2ecdf;
  --text: #1d1c28;
  --muted: #5f6072;
  --muted-2: #7c7e91;
  --accent: #8f6320;
  --accent-2: #9c4560;
  --accent-3: #8a6478;
  --accent-ink: #fffdf8;
  --accent-soft: rgba(143, 99, 32, .12);
  --line: rgba(29, 28, 40, .1);
  --line-2: rgba(29, 28, 40, .2);
  --shadow: 0 18px 44px rgba(60, 48, 28, .14);
  --glow: 0 0 24px rgba(143, 99, 32, .14);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  color: var(--text);
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color-scheme: dark;
}
html[data-theme="light"] body { color-scheme: light; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(1000px 560px at 10% -10%, rgba(168, 129, 154, .22), transparent 62%),
    radial-gradient(820px 480px at 92% -8%, rgba(233, 207, 154, .1), transparent 60%),
    radial-gradient(700px 400px at 50% 110%, rgba(122, 88, 107, .16), transparent 65%),
    url('/images/starfield.svg');
  background-repeat: no-repeat, no-repeat, no-repeat, repeat;
  background-size: auto, auto, auto, 260px 260px;
}
html[data-theme="light"] body::before {
  background-image:
    radial-gradient(1000px 560px at 10% -10%, rgba(168, 129, 154, .16), transparent 62%),
    radial-gradient(820px 480px at 92% -8%, rgba(143, 99, 32, .1), transparent 60%);
  background-repeat: no-repeat;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: var(--header);
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: max-content; }
.brand img { width: 42px; height: 42px; border-radius: 50%; }
.brand-name {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: .04em;
  line-height: 1;
}
.brand-badge {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 999px;
  padding: 4px 8px 2px;
}
.header-nav { display: flex; gap: 6px; }
.header-nav a, .theme, .ghost, .search button, .more-wrap button {
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
}
.header-nav a.is-active, .header-nav a:hover, .theme:hover, .ghost:hover {
  color: var(--text);
  background: var(--accent-soft);
}
#fav-count {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.search { display: flex; flex: 1; min-width: 0; gap: 8px; }
.search input, .order select, #country-filter {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
}
.search button, .more-wrap button, .hero button {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}
.theme { margin-left: auto; }

.shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px 128px;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 28px;
}
.side { position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 200px); overflow: auto; }
.side-label {
  margin: 14px 0 8px;
  color: var(--muted-2);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side a {
  padding: 7px 10px;
  border-radius: 10px;
  color: var(--muted);
}
.side a:hover, .side a.is-active { background: var(--accent-soft); color: var(--text); }
.side a.more { color: var(--accent); }

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: 12px;
}
.hero h1, .block-head h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 400;
  letter-spacing: .04em;
  line-height: 1;
}
.hero p { margin: 8px 0 0; max-width: 46ch; color: var(--muted); }
.studio-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}
.studio-top h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 400;
  letter-spacing: .04em;
  line-height: 1;
}
.studio-top p { margin: 8px 0 0; max-width: 52ch; color: var(--muted); }
.studio-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.studio-actions button[data-random] {
  border-radius: 999px;
  padding: 12px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}
.clocks { display: flex; gap: 8px; flex: none; }
.clock {
  min-width: 112px;
  padding: 10px 12px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  border: 1px solid var(--line);
}
.clock span {
  display: block;
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.clock strong { font-variant-numeric: tabular-nums; font-size: 20px; }
.stage { margin: 0 0 8px; padding: 16px; }
.stage h2 { margin: 0; font-size: 28px; }
.stage .mark { width: 72px; height: 72px; border-radius: 18px; font-size: 28px; }
.stage-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0;
  color: #9fe8b8;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 12px;
}
.stage-live i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.stage.is-on .stage-live i { animation: pulse 1.4s ease-in-out infinite; }
.strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.slot {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  border: 1px solid var(--line);
}
.slot .play, .slot .mark { width: 36px; height: 36px; }
.slot .play svg { width: 16px; height: 16px; }
.slot-text { min-width: 0; }
.slot-text strong, .slot-text span, .slot-text time {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.slot-text span, .slot-text time { color: var(--muted); font-size: 12px; }
.slot-text time { color: var(--accent); font-variant-numeric: tabular-nums; }
.slot.is-current, .card.is-hour, .slot.is-hour { border-color: var(--accent); box-shadow: var(--glow); }
.card.is-on h3::after, .slot.is-on strong::after {
  content: "В эфире";
  margin-left: 8px;
  color: #9fe8b8;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.desks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}
.desks .block { margin-top: 0; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.cities {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.city {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  border: 1px solid var(--line);
}
.city time { color: var(--accent); font-variant-numeric: tabular-nums; }

.block { margin-top: 8px; }
.block + .block { margin-top: 28px; }
.block-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.block-head h2 { margin: 0; font-size: 22px; }
.block-head a, .text-link { color: var(--accent); }
.note { margin: 6px 0 0; color: var(--muted); }
.order { display: flex; flex-direction: column; gap: 4px; color: var(--muted-2); font-size: 12px; }
.order select { min-width: 180px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card.is-current { border-color: var(--line-2); box-shadow: var(--glow); }
.play {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  flex: none;
}
.play svg, .fav svg { width: 20px; height: 20px; fill: currentColor; }
.mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(145deg, hsl(var(--hue, 30) 42% 48%), hsl(calc(var(--hue, 30) + 36) 28% 24%));
  color: #fff8ea;
  font-weight: 800;
}
.mark img { width: 100%; height: 100%; object-fit: cover; }
.card h3 { margin: 0; font-size: 16px; line-height: 1.3; }
.card .meta, .tags { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tags a {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
}
.tags a:hover { color: var(--text); }
.fav {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--muted-2);
}
.fav.is-on, .fav:hover { color: var(--accent-2); }
.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
}
.country {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  border: 1px solid var(--line);
}
.country small { color: var(--muted-2); }
#country-filter { max-width: 320px; margin: 0 0 14px; }

.empty { color: var(--muted); }
.more-wrap { display: flex; justify-content: center; margin-top: 16px; }

.dock {
  position: fixed;
  z-index: 40;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line-2);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.dock-meta { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.dock-text { min-width: 0; }
.name-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
#dock-name, #dock-sub {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  color: #9fe8b8;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.dock.is-on .live i { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}
#dock-sub { color: var(--muted); font-size: 13px; }
.eq { display: flex; align-items: flex-end; gap: 3px; height: 18px; width: 22px; flex: none; }
.eq i {
  display: block;
  width: 3px;
  height: 30%;
  border-radius: 99px;
  background: var(--accent);
}
.dock.is-on .eq i { animation: eq .9s ease-in-out infinite; }
.dock.is-on .eq i:nth-child(2) { animation-delay: .15s; }
.dock.is-on .eq i:nth-child(3) { animation-delay: .3s; }
.dock.is-on .eq i:nth-child(4) { animation-delay: .08s; }
.dock.is-on .eq i:nth-child(5) { animation-delay: .22s; }
.dock.is-wait .play { opacity: .7; }
@keyframes eq {
  0%, 100% { height: 25%; }
  50% { height: 100%; }
}
.vol { display: flex; flex-direction: column; gap: 2px; color: var(--muted-2); font-size: 11px; min-width: 110px; }
.vol input { width: 110px; accent-color: var(--accent); }
.ghost { border: 1px solid var(--line); }
.sleep { position: relative; }
#dock-sleep.is-on { color: var(--accent); border-color: var(--line-2); }
.sleep-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 148px;
  padding: 6px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
}
.sleep-menu button {
  border-radius: 10px;
  padding: 8px 10px;
  text-align: left;
  color: var(--text);
}
.sleep-menu button:hover,
.sleep-menu button:focus-visible { background: var(--accent-soft); }

.toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 108px;
  transform: translateX(-50%);
  max-width: min(520px, calc(100% - 32px));
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
}

@media (prefers-reduced-motion: reduce) {
  .eq i, .live i, .stage-live i { animation: none !important; }
  html { scroll-behavior: auto; }
}

@media (max-width: 900px) {
  .header-inner { height: auto; min-height: var(--header); flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .search { order: 5; flex-basis: 100%; }
  .theme { margin-left: 0; }
  .shell { grid-template-columns: 1fr; gap: 16px; }
  .side { position: static; max-height: none; overflow: visible; }
  .side nav { flex-direction: row; overflow: auto; padding-bottom: 4px; }
  .side a { white-space: nowrap; background: color-mix(in srgb, var(--panel) 80%, transparent); }
  .hero, .studio-top { flex-direction: column; align-items: flex-start; }
  .clocks, .strip, .desks, .cities { width: 100%; }
  .strip { grid-template-columns: 1fr 1fr; }
  .desks, .cities { grid-template-columns: 1fr; }
  .vol, #dock-home { display: none; }
}
