/* Общая тёмная тема в стилистике MAX: чёрный фон, белый текст,
   сине-фиолетовые градиенты и единая типографика на всех страницах. */
@font-face {
  font-family: "Manrope";
  src: url("assets/fonts/Manrope-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

html { background: #0D0D0D; }
body.max-theme.radio-modern {
  --theme-bg: #0D0D0D;
  --theme-surface: #181818;
  --theme-surface-raised: #241C31;
  --theme-text: #FFFFFF;
  --theme-muted: #C3C3C3;
  --theme-subtle: #B5B5B5;
  --theme-line: #3A3445;
  --theme-accent: #572DFF;
  --theme-accent-hover: #354EF3;
  --theme-link: #68C9FF;
  --theme-hover: #A891FF;
  --theme-info: #68C9FF;
  --theme-navy: #111018;
  --theme-navy-raised: #211B30;
  --theme-navy-muted: #C3C3C3;
  --theme-warm: #8F3FFF;
  --theme-gradient-text: linear-gradient(96deg, #43D6FF 0%, #5A8CFF 48%, #8F3FFF 100%);
  --theme-button-bg: linear-gradient(135deg, #161F8A 0%, #2D085F 100%);
  --theme-button-hover: linear-gradient(97deg, #08798B 0%, #075CE1 45%, #572DFF 100%);
  --theme-shadow: 0 18px 40px rgba(0, 0, 0, .22);
  --theme-radius: 24px;
  --theme-hero-title-size: clamp(32px, 3.4vw, 40px);
  color-scheme: dark;
  color: var(--theme-text);
  background: var(--theme-bg);
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-weight: 400;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.max-theme ::selection { background: #572DFF; color: #fff; }
.max-theme [hidden] { display: none !important; }
.max-theme :focus-visible { outline: 3px solid var(--theme-info); outline-offset: 5px; }
.max-theme a { color: var(--theme-link); }
.max-theme button, .max-theme select, .max-theme input { font: inherit; }
body.max-theme.radio-modern .doc-card :is(h1, h2, h3, p, ul, ol, li, a, span, strong, label, button, select, summary) { font-family: inherit; text-shadow: none; }
.max-theme :is(h1, h2, h3) { text-wrap: balance; }
.max-theme :is(section, article, nav, div) { min-width: 0; }
.max-theme #player { scroll-margin-top: 28px; }

/* Header presentation lives exclusively in assets/header-neon-v1.css. */

.max-theme .theme-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 18px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.max-theme .theme-button span { font-size: 20px; font-weight: 400; }

body.max-theme.radio-modern .page.page-doc {
  display: block;
  width: 100%;
  max-width: 1160px;
  min-height: 0;
  margin: 0 auto;
  padding: 24px 24px 64px;
}

body.max-theme.radio-modern .doc-card {
  width: 100%;
  min-width: 0;
  margin: 0;
}

body.max-theme.radio-modern .doc-card:not(.radio-page) {
  width: 100%;
  margin: 32px 0 0;
  padding: clamp(24px, 5vw, 64px);
  border: 1px solid var(--theme-line);
  border-radius: var(--theme-radius);
  background: var(--theme-surface);
  box-shadow: var(--theme-shadow);
}

body.max-theme.radio-modern .feature-blue-page::before { display: none; }
body.max-theme.radio-modern .doc-card :is(h1, h2, h3) {
  color: var(--theme-text);
  background: none;
  font-family: inherit;
  font-weight: 600;
  letter-spacing: -.035em;
  text-shadow: none;
  animation: none;
}
body.max-theme.radio-modern .doc-card h1 { margin: 0 0 28px; font-size: var(--theme-hero-title-size); line-height: 1.12; }
body.max-theme.radio-modern .doc-card h2 { margin: 36px 0 16px; font-size: clamp(25px, 3vw, 36px); line-height: 1.22; }
body.max-theme.radio-modern .doc-card h3 { font-size: 21px; line-height: 1.4; }
body.max-theme.radio-modern .doc-card :is(p, li) { color: var(--theme-muted); font-size: 16px; line-height: 1.8; font-family: inherit; }
body.max-theme.radio-modern .doc-card strong { color: var(--theme-text); }
body.max-theme.radio-modern .feature-blue-page a:not(.cta) { color: var(--theme-link); border-bottom-color: #68C9FF55; }
body.max-theme.radio-modern .feature-blue-page a:not(.cta):hover { color: var(--theme-hover); border-bottom-color: currentColor; }

/* Shared editorial headings: the same type and accent as the instruction hero. */
body.max-theme.radio-modern .doc-card .page-hero {
  margin: 0 0 24px;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid #312342;
  border-radius: 28px;
  background: radial-gradient(ellipse at 100% 100%, #572DFF26, transparent 58%), #111018;
  box-shadow: var(--theme-shadow), inset 0 1px 0 #FFFFFF0A;
}
body.max-theme.radio-modern .doc-card .page-eyebrow {
  margin: 0 0 18px;
  color: var(--theme-info);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .13em;
  text-transform: uppercase;
}
body.max-theme.radio-modern .page-eyebrow::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--theme-warm);
  vertical-align: 1px;
}
body.max-theme.radio-modern .doc-card .page-hero-title {
  margin: 0 0 24px;
  font-size: var(--theme-hero-title-size);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.045em;
  color: var(--theme-text);
  text-wrap: balance;
}
body.max-theme.radio-modern .page-hero-title span {
  display: block;
  width: fit-content;
  max-width: 100%;
  color: var(--theme-info);
  background: var(--theme-gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
body.max-theme.radio-modern .doc-card .playlist-hero .page-hero-title {
  margin-bottom: 0;
  font-size: var(--theme-hero-title-size);
  white-space: nowrap;
}
body.max-theme.radio-modern .doc-card .playlist-hero .page-hero-title span {
  display: inline;
  width: auto;
  max-width: none;
}
body.max-theme.radio-modern .doc-card .page-hero .feature-source { margin: 0 0 16px; max-width: 800px; font-size: 16px; line-height: 1.75; }
body.max-theme.radio-modern .doc-card .page-hero .feature-source :is(strong, a) { font-size: inherit; }
body.max-theme.radio-modern .doc-card .page-hero .feature-source:last-child { margin-bottom: 0; }
body.max-theme.radio-modern .doc-card:not(.radio-page).rules-page {
  margin-top: 28px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body.max-theme.radio-modern [data-site-page="playlist"] .playlist-hero { margin-top: 28px; }
body.max-theme.radio-modern .rules-content {
  padding: clamp(22px, 4vw, 48px);
  border: 1px solid var(--theme-line);
  border-radius: var(--theme-radius);
  background: var(--theme-surface);
  box-shadow: var(--theme-shadow);
}
body.max-theme.radio-modern .rules-content > h2 {
  margin: 36px 0 16px;
  padding-top: 28px;
  border-top: 1px solid var(--theme-line);
  font-size: clamp(24px, 2.6vw, 32px);
}
body.max-theme.radio-modern .rules-content > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
body.max-theme.radio-modern .rules-content :is(p, li) { line-height: 1.8; overflow-wrap: anywhere; }
body.max-theme.radio-modern .rules-content :is(ul, ol) { padding-left: 24px; }
body.max-theme.radio-modern .rules-content li + li { margin-top: 12px; }
body.max-theme.radio-modern .rules-content li::marker { color: var(--theme-info); font-weight: 700; }
body.max-theme.radio-modern .rules-content .feature-plain-block {
  padding: clamp(18px, 2.5vw, 26px);
  border: 1px solid var(--theme-line);
  border-radius: 18px;
  background: #1D1924;
}
body.max-theme.radio-modern .rules-content .feature-note-block { padding: 20px 24px; border-radius: 0 16px 16px 0; background: #21182E; }
body.max-theme.radio-modern .rules-content :is(.feature-plain-block, .feature-note-block) > :first-child { margin-top: 0; }
body.max-theme.radio-modern .rules-content :is(.feature-plain-block, .feature-note-block) > :last-child { margin-bottom: 0; }
body.max-theme.radio-modern .rules-content .feature-faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
body.max-theme.radio-modern .rules-content .feature-faq-item { margin: 0; padding: 24px; background: #1D1924; }
body.max-theme.radio-modern .rules-content .feature-faq-item h3 { margin: 0 0 12px; font-size: 19px; letter-spacing: -.02em; }
body.max-theme.radio-modern .rules-content .feature-links { margin-bottom: 0; }
body.max-theme.radio-modern .rules-content .feature-links h2 { font-size: clamp(24px, 2.6vw, 32px); }
body.max-theme.radio-modern .rules-content .feature-links p + p { margin-top: 12px; }
@media (max-width: 700px) {
  body.max-theme.radio-modern .doc-card .page-hero { padding: 28px 22px; border-radius: 24px; }
  body.max-theme.radio-modern .doc-card .page-hero-title { letter-spacing: -.04em; }
  body.max-theme.radio-modern .rules-content { padding: 24px 20px; }
  body.max-theme.radio-modern .rules-content .feature-faq { grid-template-columns: 1fr; }
  body.max-theme.radio-modern .rules-content :is(.feature-faq-item, .feature-note-block, .feature-links) { padding: 20px; }
  body.max-theme.radio-modern .doc-card .playlist-hero .page-hero-title { white-space: normal; }
  body.max-theme.radio-modern .doc-card .playlist-hero .page-hero-title span { display: block; width: fit-content; max-width: 100%; }
}
@media (forced-colors: active) {
  body.max-theme.radio-modern .page-hero-title span { background: none; color: CanvasText; -webkit-text-fill-color: CanvasText; }
}

/* Первый экран: короткое вступление, быстрые ссылки и настоящий плеер. */
.max-theme .home-intro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, .85fr);
  gap: 36px;
  align-items: center;
  margin: 28px 0 16px;
  padding: 32px 44px;
  border: 1px solid #312342;
  border-radius: 28px;
  background-color: #111018;
  background-image:
    radial-gradient(ellipse at 100% 90%, rgba(87, 45, 255, .22), transparent 55%),
    linear-gradient(135deg, #111018, #171021);
  box-shadow: var(--theme-shadow), inset 0 1px 0 rgba(255, 255, 255, .04);
}
body.max-theme.radio-modern .home-intro h1 { margin: 0; color: #fff; font-size: var(--theme-hero-title-size); line-height: 1.2; font-weight: 600; letter-spacing: -.045em; text-wrap: initial; }
body.max-theme.radio-modern .home-intro .theme-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  color: var(--theme-navy-muted);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.max-theme .theme-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #43D6FF; box-shadow: 0 0 12px #43D6FF70; }
.max-theme .theme-gradient-text { color: #68C9FF; }
@supports (background-clip: text) {
  .max-theme .theme-gradient-text { background-image: var(--theme-gradient-text); background-clip: text; -webkit-background-clip: text; color: transparent; }
}
body.max-theme.radio-modern .home-intro-copy p { margin: 0 0 18px; color: var(--theme-navy-muted); font-size: 16px; line-height: 1.55; max-width: 360px; }
.max-theme .home-intro-copy .theme-button { margin: 0 18px 12px 0; }
.max-theme .theme-text-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--theme-link); font-size: 14px; font-weight: 600; text-decoration: none; }
.max-theme .theme-text-link:is(:hover, :focus-visible) { color: var(--theme-hover); text-decoration: underline; text-underline-offset: 5px; }
.max-theme .home-intro-copy .theme-text-link { display: inline-flex; color: var(--theme-link); }
.max-theme .home-intro-copy .theme-text-link:is(:hover, :focus-visible) { color: #fff; }

body.max-theme.radio-modern .action-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 24px; }
body.max-theme.radio-modern .action-tile {
  position: relative;
  min-height: 88px;
  padding: 16px 45px 16px 22px;
  border: 1px solid var(--theme-line);
  border-radius: 18px;
  box-shadow: none;
}
body.max-theme.radio-modern .action-tile::after { content: none; }
body.max-theme.radio-modern .action-tile-title { color: currentColor; font-size: 17px; font-weight: 600; line-height: 1.35; }
body.max-theme.radio-modern .action-tile-sub { color: var(--action-muted, var(--theme-muted)); font-size: 13px; line-height: 1.5; margin-top: 6px; }

/* Плеер: сохранены селекторы и состояния существующего JavaScript. */
body.max-theme.radio-modern .radio-hero-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, .85fr);
  align-items: center;
  gap: 40px;
  margin-top: 0;
  padding: 36px;
  border: 1px solid var(--theme-line);
  border-radius: 28px;
  border-color: #3A2852;
  background-color: var(--theme-navy);
  background-image:
    radial-gradient(ellipse at 100% 40%, rgba(66, 49, 194, .25), transparent 55%),
    linear-gradient(145deg, #14111C, #111018 65%, #1B1231);
  box-shadow: var(--theme-shadow), inset 0 1px 0 rgba(255, 255, 255, .06);
}
body.max-theme.radio-modern .radio-widget h2 { max-width: 500px; margin: 12px 0 24px; color: #fff; font-size: clamp(27px, 3.6vw, 42px); line-height: 1.14; }
body.max-theme.radio-modern .station-badge { padding: 6px 12px; background: #2B1750; border-color: #6845A0; color: #DFCCFF; font-size: 12px; font-weight: 600; }
body.max-theme.radio-modern .fm-selector-wrap { gap: 10px; }
body.max-theme.radio-modern .fm-selector-label { color: var(--theme-navy-muted); font-size: 13px; }
body.max-theme.radio-modern .fm-city-select { max-width: min(260px, 100%); min-height: 42px; border-radius: 12px; border-color: var(--theme-line); background-color: var(--theme-surface); color: var(--theme-text); font-size: 13px; }
body.max-theme.radio-modern .fm-city-select option { background: var(--theme-surface); color: var(--theme-text); }
body.max-theme.radio-modern .fm-station-combobox { border-color: #51416B; background: #1B1724; color: #fff; }
body.max-theme.radio-modern .fm-station-combobox:not(:disabled):is(:hover, :focus-visible),
body.max-theme.radio-modern .fm-station-picker.is-open .fm-station-combobox { border-color: #8257FF; background: #21182F; box-shadow: 0 0 0 3px rgba(126, 80, 255, .17), inset 0 1px 0 rgba(255, 255, 255, .06); }
body.max-theme.radio-modern .fm-station-panel { border-color: #4C3869; background: linear-gradient(155deg, #21182E, #121018 74%); box-shadow: 0 28px 70px #000b, inset 0 1px 0 rgba(255, 255, 255, .07); }
body.max-theme.radio-modern .fm-station-search-label { color: var(--theme-navy-muted); }
body.max-theme.radio-modern .fm-station-search { border-color: #4B3A62; background: #100E16; color: #fff; }
body.max-theme.radio-modern .fm-station-search::placeholder { color: #8F839F; }
/* Keep focus visible on the input border, without a second outer frame. */
body.max-theme.radio-modern .fm-station-search:focus { border-color: #7D50FF; outline: none; box-shadow: none; }
body.max-theme.radio-modern .fm-station-country-tab { border-color: #4B3A62; background: #18131F; color: #B8A9C8; }
body.max-theme.radio-modern .fm-station-country-tab:is(:hover, :focus-visible) { border-color: #7652C7; background: #251A35; color: #fff; }
body.max-theme.radio-modern .fm-station-country-tab[aria-selected="true"] { border-color: #7950DB; background: linear-gradient(110deg, #302083, #51159B); color: #fff; }
body.max-theme.radio-modern .fm-station-browse-header { border-bottom-color: #3B2D4C; }
body.max-theme.radio-modern .fm-station-back { border-color: #4B3A62; background: #18131F; color: #E4D9F0; }
body.max-theme.radio-modern .fm-station-back:is(:hover, :focus-visible) { border-color: #7652C7; background: #251A35; }
body.max-theme.radio-modern .fm-station-region-card { border-color: #3E304E; background: #17131E; color: #fff; }
body.max-theme.radio-modern .fm-station-region-card:is(:hover, :focus-visible) { border-color: #6846A0; background: #292036; }
body.max-theme.radio-modern .fm-station-region-meta { color: var(--theme-navy-muted); }
body.max-theme.radio-modern .fm-station-results-heading { color: #66D8FF; }
body.max-theme.radio-modern .fm-station-list { scrollbar-color: #6842CE #17121F; }
body.max-theme.radio-modern .fm-station-country-heading { background: #2C1D45; color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
body.max-theme.radio-modern .fm-station-subgroup-heading { color: #62D5FF; }
body.max-theme.radio-modern .fm-station-region-heading { color: #AD9FBE; }
body.max-theme.radio-modern .fm-station-option { color: #fff; }
body.max-theme.radio-modern .fm-station-option:is(.is-active, :hover) { border-color: #5C4380; background: #2A2038; }
body.max-theme.radio-modern .fm-station-option[aria-selected="true"] { border-color: #7950DB; background: linear-gradient(100deg, #302083, #421379); }
body.max-theme.radio-modern .fm-station-option-region { color: var(--theme-navy-muted); }
body.max-theme.radio-modern .fm-station-empty { color: var(--theme-navy-muted); }
body.max-theme.radio-modern .fm-freq-badge { padding: 8px 12px; border-color: #345B8C; background: #10253F; color: #86D9FF; font-size: 12px; }
body.max-theme.radio-modern .station-stream-notice { border-color: #3E5C76; background: #172433; color: #BCE9FF !important; }
body.max-theme.radio-modern .station-stream-notice.is-warning { border-color: #60418B; background: #241836; color: #E0CAFF !important; }
body.max-theme.radio-modern .radio-widget p { color: var(--theme-navy-muted); font-size: 13px; line-height: 1.7; }
body.max-theme.radio-modern .radio-widget p a { color: var(--theme-link); }
body.max-theme.radio-modern .radio-player-inline { margin: 24px 0 22px; }
body.max-theme.radio-modern #radioVolume { width: 100%; height: 26px; margin: 0; cursor: pointer; }
body.max-theme.radio-modern #radioVolume::-webkit-slider-runnable-track { height: 5px; border: 0; background: linear-gradient(to right, #43D6FF 0%, #7D50FF var(--volume-percent), #42364F var(--volume-percent), #42364F 100%); }
body.max-theme.radio-modern #radioVolume::-webkit-slider-thumb { height: 19px; width: 19px; margin-top: -7px; border: 3px solid #fff; background: var(--theme-accent); box-shadow: 0 0 16px #7542FF80; }
body.max-theme.radio-modern #radioVolume::-moz-range-track { height: 5px; border: 0; background: linear-gradient(to right, #43D6FF 0%, #7D50FF var(--volume-percent), #42364F var(--volume-percent), #42364F 100%); }
body.max-theme.radio-modern #radioVolume::-moz-range-thumb { height: 15px; width: 15px; border: 3px solid #fff; background: var(--theme-accent); box-shadow: 0 0 16px #7542FF80; }
body.max-theme.radio-modern .radio-playback-actions { display: flex; align-items: center; gap: 14px; }
body.max-theme.radio-modern .reaction-bar { gap: 8px; padding: 8px; background: #1A1426; border-color: #3D2D52; border-radius: 17px; }
body.max-theme.radio-modern .reaction-btn { display: grid; place-items: center; width: 34px; height: 34px; font-size: 23px; }
body.max-theme.radio-modern #player.radio-widget { padding-bottom: 10px; }
body.max-theme.radio-modern #radioStatus { display: block; margin: 24px 0 0; color: var(--theme-navy-muted); font-size: 13px; }
/* Native media events set is-playing; the text also communicates the state. */
body.max-theme.radio-modern #radioStatus::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 50%;
  background: #EF4444;
  box-shadow: 0 0 8px #EF444440;
  vertical-align: 1px;
  pointer-events: none;
}
body.max-theme.radio-modern #radioStatus.is-playing::before {
  background: #22C55E;
  box-shadow: 0 0 8px #22C55E40;
}
body.max-theme.radio-modern .now-card { padding: 26px; border-color: #51416B; border-radius: 22px; background: linear-gradient(150deg, #292039, #131019 70%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 12px 36px rgba(0, 0, 0, .32); }
body.max-theme.radio-modern .now-card h2 { margin: 0 0 20px; font-size: 18px; font-weight: 700; color: #fff; }
body.max-theme.radio-modern .now-cover-wrap { width: 166px; height: 166px; margin: 0 auto 20px; border-radius: 20px; }
body.max-theme.radio-modern .now-cover { border: 0; border-radius: 20px; box-shadow: 0 10px 24px #0006; }
body.max-theme.radio-modern .now-cover-wrap.is-placeholder { border-color: #65488C; background: var(--theme-button-bg); }
body.max-theme.radio-modern .now-cover-wrap.is-placeholder::before { color: #fff; }
body.max-theme.radio-modern .now-card .live-track { color: #fff; font-size: 18px; line-height: 1.5; text-shadow: none; }
body.max-theme.radio-modern .now-card .live-artist { color: var(--theme-navy-muted); font-size: 14px; line-height: 1.5; }
body.max-theme.radio-modern .now-card :is(.live-meta, .live-updated) { color: var(--theme-navy-muted); text-shadow: none; }

/* История, фильтры и раскрывающийся плейлист. */
body.max-theme.radio-modern .history-card,
body.max-theme.radio-modern .playlist-panel {
  padding: 28px 32px;
  background: var(--theme-surface);
  border: 1px solid var(--theme-line);
  border-radius: var(--theme-radius);
  box-shadow: var(--theme-shadow);
}
body.max-theme.radio-modern .history-card h2 { margin: 0 0 22px; font-size: clamp(25px, 3vw, 32px); font-family: inherit; }
body.max-theme.radio-modern .history-list { margin: 12px 0 0; padding: 0; }
body.max-theme.radio-modern .history-item { grid-template-columns: 65px 50px minmax(0, 1fr); gap: 14px; margin: 0; padding: 14px 0; border-color: var(--theme-line); }
body.max-theme.radio-modern .history-time { color: var(--theme-muted); font-size: 13px; font-family: inherit; }
body.max-theme.radio-modern .history-cover { width: 50px; height: 50px; border: 0; border-radius: 12px; background: var(--theme-surface-raised); }
body.max-theme.radio-modern .history-cover:not(.is-loaded) { background: var(--theme-surface-raised); }
body.max-theme.radio-modern .history-title { color: var(--theme-text); font-size: 15px; font-family: inherit; font-weight: 600; line-height: 1.5; }
body.max-theme.radio-modern .history-cover-link { display: block; width: fit-content; max-width: 100%; line-height: 0; border-radius: 12px; }
body.max-theme.radio-modern .history-cover-link:hover .history-cover { filter: brightness(1.08); }
body.max-theme.radio-modern .history-title-link { display: block; min-width: 0; text-decoration: none; }
body.max-theme.radio-modern .history-title-link:is(:hover, :focus-visible) { text-decoration: underline; text-decoration-color: var(--theme-link); text-underline-offset: 3px; }
body.max-theme.radio-modern .history-artist { color: var(--theme-subtle); font-size: 13px; font-family: inherit; line-height: 1.5; }
body.max-theme.radio-modern .history-empty { color: var(--theme-muted); list-style: none; }
body.max-theme.radio-modern .playlist-sort-controls { gap: 12px; margin: 0 0 24px; }
body.max-theme.radio-modern .playlist-sort-label { color: var(--theme-muted); font-family: inherit; font-size: 13px; }
body.max-theme.radio-modern .playlist-sort-select { max-width: 100%; min-height: 44px; padding: 10px 12px; border-color: var(--theme-line); border-radius: 12px; background: var(--theme-surface); color: var(--theme-text); font-family: inherit; }
body.max-theme.radio-modern .history-date-filters { gap: 8px; margin-bottom: 20px; }
body.max-theme.radio-modern .history-date-chip { min-width: 54px; min-height: 55px; gap: 5px; padding: 10px 13px; border-radius: 14px; }
body.max-theme.radio-modern .history-date-day, body.max-theme.radio-modern .history-date-weekday { font-family: inherit; }
body.max-theme.radio-modern .history-date-weekday { font-size: 11px; opacity: 1; }

/* Единый вид действий; [hidden] и порядок элементов сохраняют старую логику. */
body.max-theme.radio-modern .cta,
body.max-theme.radio-modern .doc-actions-bar .cta,
body.max-theme.radio-modern .playlist-open-btn,
body.max-theme.radio-modern .playlist-toggle-btn,
body.max-theme.radio-modern .tg-promo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 22px;
  border: 1px solid var(--theme-accent);
  border-radius: 15px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  cursor: pointer;
}
body.max-theme.radio-modern .doc-actions-bar { position: static; margin-top: 38px; padding-top: 24px; border-top-color: var(--theme-line); gap: 12px; }
body.max-theme.radio-modern .doc-actions-bar .cta:focus-visible { outline: 3px solid var(--theme-info); outline-offset: 4px; }

/* Информационные секции используют ту же палитру, что плеер и инструкция. */
body.max-theme.radio-modern .tg-promo { margin-top: 36px; padding: 40px; gap: 28px; border-color: #493463; border-radius: var(--theme-radius); background: linear-gradient(115deg, #211332, #15131E); box-shadow: inset 0 1px 0 #FFFFFF0A; }
body.max-theme.radio-modern .tg-promo-icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 24px; font-size: 40px; color: #fff; background: var(--theme-button-bg); }
body.max-theme.radio-modern .tg-promo-body h2 { margin: 0 0 14px; font-size: clamp(25px, 3.3vw, 36px); }
body.max-theme.radio-modern .tg-promo-body p { margin: 0 0 24px; font-size: 16px; color: var(--theme-muted); }
body.max-theme.radio-modern .tg-promo-actions { align-items: center; gap: 12px; }
body.max-theme.radio-modern .seo-panel { margin-top: 32px; padding: 32px; border-color: var(--theme-line); border-radius: var(--theme-radius); background: var(--theme-surface); box-shadow: var(--theme-shadow); }
body.max-theme.radio-modern .radio-page .seo-panel h2, body.max-theme.radio-modern .radio-page .seo-panel h3 { color: var(--theme-text); }
body.max-theme.radio-modern .radio-page .seo-panel h2 { margin: 0 0 18px; font-size: clamp(24px, 2.8vw, 32px); }
body.max-theme.radio-modern .radio-page .seo-panel p, body.max-theme.radio-modern .radio-page .seo-panel li { color: var(--theme-muted); font-size: 16px; line-height: 1.8; }
body.max-theme.radio-modern .radio-page .seo-panel a { color: var(--theme-link); border-bottom-color: #68C9FF55; font-weight: 500; }
body.max-theme.radio-modern .radio-page .seo-panel a:hover { color: var(--theme-hover); }
body.max-theme.radio-modern :is(.feature-info-box, .feature-info-box-warn, .feature-faq-item, .feature-links) { padding: 24px; border-color: var(--theme-line); border-radius: 18px; background: #1D1924; box-shadow: none; }
body.max-theme.radio-modern .feature-info-box-warn { background: #291B38; border-color: #684785; }
body.max-theme.radio-modern .feature-faq-item h3 { color: var(--theme-text); font-size: 19px; }
body.max-theme.radio-modern .feature-faq-item p { color: var(--theme-muted); }
body.max-theme.radio-modern .feature-links h2 { margin-top: 0; }
body.max-theme.radio-modern .feature-note-block { padding: 12px 16px 12px 22px; border-left-color: #A272FF; background: #241831; }
body.max-theme.radio-modern .feature-shot-link { border-color: var(--theme-line); background: var(--theme-surface); box-shadow: none; }
body.max-theme.radio-modern .feature-shot figcaption { color: var(--theme-subtle); }
body.max-theme.radio-modern .feature-checklist li::marker { color: var(--theme-info); }
body.max-theme.radio-modern .feature-source { color: var(--theme-muted); }
body.max-theme.radio-modern .doc-nav a { min-height: 44px; border-radius: 13px; }

/* Сине-фиолетовая заливка и плавное появление яркого градиента при наведении.
   Отдельный слой не размывает текст и не меняет геометрию элементов. */
body.max-theme.radio-modern :is(
  .theme-button, .action-tile, .cta, .doc-actions-bar .cta,
  .playlist-open-btn, .playlist-toggle-btn, .tg-promo-btn,
  .reaction-btn, .history-date-chip, .doc-nav a,
  .instruction-page a.instruction-channel, .instruction-page .instruction-related-links a
) {
  position: relative;
  isolation: isolate;
  background: var(--action-bg, var(--theme-button-bg));
  border-color: var(--action-border, #433084);
  color: var(--action-text, #fff);
  box-shadow: var(--action-shadow, inset 0 1px 0 rgba(255, 255, 255, .08));
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease, transform .2s ease;
}

body.max-theme.radio-modern :is(.history-date-chip, .reaction-btn, .doc-nav a, .instruction-related-links a) {
  --action-bg: #241B34;
  --action-text: var(--theme-text);
  --action-border: #554366;
  --action-hover: #413056;
  --action-hover-text: #fff;
  --action-hover-border: #8C67C2;
}

body.max-theme.radio-modern .action-tile { --action-muted: #DED8EF; }

/* Цвет зависит от назначения ссылки, а не её позиции в ряду. */
body.max-theme.radio-modern a[href^="https://t.me/"],
body.max-theme.radio-modern .instruction-channel-telegram {
  --action-bg: linear-gradient(125deg, #0769BE, #2542A8);
  --action-text: #fff;
  --action-border: #367ECC;
  --action-hover: linear-gradient(100deg, #08798B, #075CE1 70%, #572DFF);
  --action-hover-text: #fff;
  --action-hover-border: #68B6FF;
}

body.max-theme.radio-modern .history-date-chip.is-active {
  --action-bg: linear-gradient(135deg, #254FE1, #572DFF);
  --action-text: #fff;
  --action-border: #AD8CFF;
  --action-shadow: inset 0 0 0 1px #AD8CFF;
  --action-hover: var(--theme-button-hover);
  --action-hover-text: #fff;
  --action-hover-border: #C8B3FF;
}

body.max-theme.radio-modern :is(
  .theme-button, .action-tile, .cta, .doc-actions-bar .cta,
  .playlist-open-btn, .playlist-toggle-btn, .tg-promo-btn, .history-date-chip,
  .doc-nav a, .instruction-page a.instruction-channel, .instruction-page .instruction-related-links a
)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--action-hover, var(--theme-button-hover));
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

body.max-theme.radio-modern :is(
  .theme-button, .action-tile, .cta, .doc-actions-bar .cta,
  .playlist-open-btn, .playlist-toggle-btn, .tg-promo-btn, .history-date-chip,
  .doc-nav a, .instruction-page a.instruction-channel, .instruction-page .instruction-related-links a
):is(:hover, :focus-visible)::before { opacity: 1; }

body.max-theme.radio-modern :is(
  .theme-button, .action-tile, .cta, .doc-actions-bar .cta,
  .playlist-open-btn, .playlist-toggle-btn, .tg-promo-btn,
  .reaction-btn, .history-date-chip, .doc-nav a,
  .instruction-page a.instruction-channel, .instruction-page .instruction-related-links a
):is(:hover, :focus-visible) {
  background: var(--action-bg, var(--theme-button-bg));
  border-color: var(--action-hover-border, #7871F5);
  color: var(--action-hover-text, #fff);
  box-shadow: var(--action-shadow, 0 8px 28px rgba(76, 45, 255, .28));
  transform: translateY(-2px);
}

body.max-theme.radio-modern :is(
  .theme-button, .action-tile, .cta, .doc-actions-bar .cta,
  .playlist-open-btn, .playlist-toggle-btn, .tg-promo-btn,
  .reaction-btn, .history-date-chip, .doc-nav a,
  .instruction-page a.instruction-channel, .instruction-page .instruction-related-links a
):active {
  background: var(--action-bg, var(--theme-button-bg));
  color: var(--action-hover-text, #fff);
  transform: translateY(0) scale(.98);
}

body.max-theme.radio-modern .reaction-btn:is(:hover, :focus-visible) {
  background: var(--action-hover, var(--theme-button-hover));
}

body.max-theme.radio-modern :is(.fm-city-select, .playlist-sort-select):is(:hover, :focus-visible) {
  border-color: var(--theme-info);
  background-color: var(--theme-surface-raised);
}

.max-theme .site-footer {
  display: block;
  text-align: center;
  width: min(1112px, calc(100% - 48px));
  margin: 0 auto;
  padding: 30px 0 40px;
  border-top: 1px solid var(--theme-line);
}
.max-theme .site-footer p { margin: 0; color: var(--theme-subtle); font-size: 12px; line-height: 1.8; }

@media (max-width: 960px) {
  .max-theme .home-intro { gap: 28px; }
  body.max-theme.radio-modern .radio-hero-grid { gap: 24px; padding: 26px; grid-template-columns: minmax(0, 1.4fr) minmax(235px, 1fr); }
  body.max-theme.radio-modern .now-card { padding: 24px 18px; }
}

@media (max-width: 760px) {
  body.max-theme.radio-modern { --theme-hero-title-size: clamp(34px, 6.8vw, 46px); }
  body.max-theme.radio-modern .page.page-doc { padding: 14px 16px 44px; }
  .max-theme .home-intro { grid-template-columns: 1fr; gap: 20px; margin-top: 14px; padding: 28px 26px; }
  body.max-theme.radio-modern .home-intro-copy p { max-width: 560px; margin-bottom: 18px; font-size: 16px; }
  .max-theme .home-intro-copy .theme-button { margin: 0 18px 0 0; }
  .max-theme .home-intro-copy .theme-text-link { display: inline-flex; }
  body.max-theme.radio-modern .action-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  body.max-theme.radio-modern .action-tile { min-height: 100px; padding: 18px 32px 18px 16px; border-radius: 18px; }
  body.max-theme.radio-modern .action-tile::after { right: 13px; top: 15px; font-size: 17px; }
  body.max-theme.radio-modern .action-tile-title { font-size: 15px; }
  body.max-theme.radio-modern .action-tile-sub { font-size: 12px; }
  body.max-theme.radio-modern .radio-hero-grid { grid-template-columns: 1fr; gap: 30px; padding: 26px; border-radius: 25px; }
  body.max-theme.radio-modern .radio-widget h2 { max-width: 460px; font-size: 34px; }
  body.max-theme.radio-modern .radio-player-footer { gap: 15px; flex-wrap: wrap; }
  body.max-theme.radio-modern .now-card { padding: 24px; }
  body.max-theme.radio-modern .now-card .now-cover-wrap { width: 172px; height: 172px; }
  body.max-theme.radio-modern .history-card, body.max-theme.radio-modern .playlist-panel { padding: 24px; }
  body.max-theme.radio-modern .tg-promo { padding: 28px; gap: 20px; align-items: flex-start; }
  body.max-theme.radio-modern .tg-promo-icon { width: 50px; height: 50px; font-size: 30px; border-radius: 17px; }
  body.max-theme.radio-modern .seo-panel { padding: 26px; }
  body.max-theme.radio-modern .doc-card:not(.radio-page) { margin-top: 18px; padding: 28px; }
  body.max-theme.radio-modern .doc-actions-bar { flex-direction: column; }
  body.max-theme.radio-modern .doc-actions-bar .cta { width: 100%; }
  .max-theme .site-footer { width: calc(100% - 40px); padding-top: 24px; }
}

@media (max-width: 440px) {
  body.max-theme.radio-modern { --theme-hero-title-size: clamp(29px, 8.2vw, 36px); }
  body.max-theme.radio-modern .page.page-doc { padding-right: 12px; padding-left: 12px; }
  body.max-theme.radio-modern .home-intro .theme-eyebrow { font-size: 10px; margin-bottom: 18px; letter-spacing: .075em; }
  .max-theme .home-intro-copy .theme-button { margin-bottom: 8px; }
  body.max-theme.radio-modern .action-tile { padding: 17px 27px 17px 13px; }
  body.max-theme.radio-modern .action-tile-title { font-size: 13px; }
  body.max-theme.radio-modern .radio-hero-grid { padding: 22px 18px; }
  body.max-theme.radio-modern .radio-widget h2 { font-size: 29px; }
  body.max-theme.radio-modern .fm-city-select { max-width: 100%; }
  body.max-theme.radio-modern .fm-selector-label { width: 100%; }
  body.max-theme.radio-modern .reaction-bar { gap: 3px; padding: 6px; }
  body.max-theme.radio-modern .reaction-btn { width: 30px; height: 32px; font-size: 21px; }
  body.max-theme.radio-modern .history-card, body.max-theme.radio-modern .playlist-panel { padding: 22px 16px; }
  body.max-theme.radio-modern .history-item { grid-template-columns: 49px 40px minmax(0, 1fr); gap: 10px; }
  body.max-theme.radio-modern .history-cover { width: 40px; height: 40px; border-radius: 10px; }
  body.max-theme.radio-modern .history-title { font-size: 13px; }
  body.max-theme.radio-modern .history-time, body.max-theme.radio-modern .history-artist { font-size: 11px; }
  body.max-theme.radio-modern .playlist-sort-label { width: 42px; }
  body.max-theme.radio-modern .playlist-sort-select { width: calc(100% - 54px); }
  body.max-theme.radio-modern .tg-promo { flex-direction: column; text-align: left; padding: 26px 22px; }
  body.max-theme.radio-modern .tg-promo-actions { flex-direction: column; align-items: stretch; }
  body.max-theme.radio-modern .seo-panel { padding: 24px 20px; }
  body.max-theme.radio-modern .doc-card:not(.radio-page) { padding: 24px 20px; }
  body.max-theme.radio-modern :is(.feature-info-box, .feature-faq-item, .feature-links) { padding: 20px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  body.max-theme.radio-modern *, body.max-theme.radio-modern *::before, body.max-theme.radio-modern *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Controls use vectors, not platform-dependent emoji arrows. */
.player-icon { width: 27px; height: 27px; fill: currentColor; position: relative; z-index: 2; }
.player-icon .pause-shape { display: none; }
.is-playing .player-icon .play-shape { display: none; }
.is-playing .player-icon .pause-shape { display: block; }

/* The hidden home stays in the document: removing it would stop its audio element. */
main[data-site-page][hidden], .mini-player[hidden], .mini-restore[hidden], .site-navigation-notice[hidden] { display: none !important; }
body.has-mini-player { padding-bottom: 124px; }
body.has-mini-restore { padding-bottom: 76px; }
.max-theme .mini-player {
  position: fixed; z-index: 90; left: 50%; bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%); width: min(900px, calc(100% - 32px)); box-sizing: border-box;
  display: grid; grid-template-columns: 54px minmax(0, 1fr) 56px 44px 180px 30px; align-items: center; gap: 10px;
  padding: 13px 18px; border: 1px solid #624c87; border-radius: 23px;
  background: linear-gradient(120deg, #1b1426 15%, #281649 100%); color: #fff;
  box-shadow: 0 14px 48px #0009, inset 0 1px 0 #ffffff16;
}
.max-theme .mini-cover { width: 54px; height: 54px; border-radius: 13px; object-fit: cover; background: #24135c; }
.max-theme .mini-track { min-width: 0; display: grid; gap: 3px; text-decoration: none; color: #fff; }
.max-theme .mini-track:hover .mini-title { color: #77d9ff; }
.max-theme .mini-track > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.max-theme .mini-station { color: #b8a7d1; font-size: 10px; letter-spacing: .025em; }
.max-theme .mini-title { font-size: 15px; line-height: 1.35; font-weight: 700; }
.max-theme .mini-artist { color: #d0c5df; font-size: 12px; line-height: 1.4; }
.max-theme .mini-collapse {
  display: grid; grid-column: 6; grid-row: 1; align-self: center; place-items: center; width: 30px; height: 30px; padding: 0;
  border: 1px solid transparent; border-radius: 11px; background: transparent; color: #eadfff; cursor: pointer;
}
.max-theme .mini-collapse svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.max-theme .mini-collapse:hover:not(:disabled) { border-color: #b69bff; background: #49316a; }
.max-theme :is(.mini-collapse, .mini-restore):focus-visible { outline: 2px solid #87d9ff; outline-offset: 3px; }
.max-theme .mini-restore {
  position: fixed; z-index: 90; right: 20px; bottom: max(16px, env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 5px; padding: 9px 13px;
  border: 1px solid #7d5dba; border-radius: 999px; background: #291c45; color: #fff;
  box-shadow: 0 8px 24px #0009, inset 0 1px 0 #ffffff26; font: inherit; font-size: 13px; cursor: pointer;
}
.max-theme .mini-restore:hover { border-color: #ae94ff; background: #3b2567; }
.max-theme .mini-restore svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.max-theme .mini-volume { display: flex; grid-column: 5; grid-row: 1; min-width: 0; gap: 6px; align-items: center; }
.max-theme .mini-volume input { min-width: 0; width: 100%; height: 24px; margin: 0; appearance: none; -webkit-appearance: none; background: transparent; cursor: pointer; }
.max-theme .mini-volume input::-webkit-slider-runnable-track { height: 5px; border-radius: 6px; background: linear-gradient(to right, #648dff, #9255ff var(--volume-percent, 80%), #4c3c60 var(--volume-percent, 80%), #4c3c60); }
.max-theme .mini-volume input::-moz-range-track { height: 5px; border-radius: 6px; background: #4c3c60; }
.max-theme .mini-volume input::-moz-range-progress { height: 5px; border-radius: 6px; background: #8a60ff; }
.max-theme .mini-volume input::-webkit-slider-thumb { -webkit-appearance: none; width: 15px; height: 15px; margin-top: -5px; border: 2px solid #e8dfff; border-radius: 50%; background: #8046ff; }
.max-theme .mini-volume input::-moz-range-thumb { width: 11px; height: 11px; border: 2px solid #e8dfff; border-radius: 50%; background: #8046ff; }
.mini-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.max-theme .site-navigation-notice {
  position: fixed; z-index: 95; top: 16px; left: 50%; transform: translateX(-50%);
  width: min(650px, calc(100% - 32px)); box-sizing: border-box; padding: 16px 20px;
  background: #261a36; color: #fff; border: 1px solid #8361ab; border-radius: 18px;
  box-shadow: 0 12px 40px #0008; font-size: 14px; line-height: 1.6;
}
.max-theme .site-navigation-notice button { margin: 8px 12px 0 0; padding: 6px 12px; border: 1px solid #8d6fb1; border-radius: 9px; background: #43246a; color: #fff; font: inherit; cursor: pointer; }
.max-theme .site-navigation-notice a { display: inline-block; margin-top: 8px; color: #8edcff; }
@media (max-width: 600px) {
  body.has-mini-player { padding-bottom: calc(146px + env(safe-area-inset-bottom)); }
  body.has-mini-restore { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .max-theme .mini-player { grid-template-columns: 54px 44px minmax(0, 1fr) 30px; gap: 8px; padding: 6px 12px; border-radius: 20px; bottom: max(8px, env(safe-area-inset-bottom)); width: calc(100% - 24px); }
  .max-theme .mini-cover { grid-column: 1; grid-row: 1; width: 44px; height: 44px; border-radius: 11px; }
  .max-theme .mini-track { grid-column: 2 / 5; grid-row: 1; }
  .max-theme .mini-title { font-size: 13px; }
  .max-theme .mini-artist { font-size: 11px; }
  .max-theme .mini-station { font-size: 9px; }
  .max-theme .mini-toggle { grid-column: 1; grid-row: 2; }
  .max-theme .mini-reconnect { grid-column: 2; grid-row: 2; }
  .max-theme .mini-volume { grid-column: 3; grid-row: 2; min-height: 44px; }
  .max-theme .mini-collapse { grid-column: 4; grid-row: 2; }
  .max-theme .mini-restore { right: 12px; bottom: max(8px, env(safe-area-inset-bottom)); }
}

/* Player controls variant 3: one treatment for the existing six buttons. */
body.max-theme.radio-modern :is(.radio-playback-actions, .mini-player) .player-control-btn {
  --control-size: 46px;
  --control-icon-size: 21px;
  --control-bg: radial-gradient(circle at 34% 25%, #342447, #21162f 72%, #191125);
  --control-hover-bg: radial-gradient(circle at 34% 25%, #403052, #291b3a 72%, #1e142c);
  --control-active-bg: #1a1128;
  --control-border: #9470d1;
  --control-hover-border: #bea1f2;
  --control-color: #e9ddff;
  --control-hover-color: #fff;
  --control-shadow: inset 0 1px 0 #ffffff25, 0 0 10px #8552d159;
  --control-hover-shadow: inset 0 1px 0 #ffffff32, 0 0 15px #9661de80;
  display: grid;
  place-items: center;
  position: relative;
  flex: 0 0 var(--control-size);
  align-self: center;
  justify-self: center;
  box-sizing: border-box;
  width: var(--control-size);
  min-width: var(--control-size);
  max-width: var(--control-size);
  height: var(--control-size);
  min-height: var(--control-size);
  padding: 0;
  border: 1px solid var(--control-border);
  border-radius: 50%;
  background: var(--control-bg);
  color: var(--control-color);
  box-shadow: var(--control-shadow);
  line-height: 1;
  cursor: pointer;
  transform: none;
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}
body.max-theme.radio-modern :is(.radio-playback-actions, .mini-player) .player-control-btn--primary {
  --control-bg: linear-gradient(135deg, #254dff, #4b2af4 55%, #7222e9);
  --control-hover-bg: linear-gradient(135deg, #3b61ff, #6040ff 55%, #8737ff);
  --control-active-bg: linear-gradient(135deg, #1f3dda, #3c22d1 55%, #5c1bbf);
  --control-border: #a895ff;
  --control-hover-border: #c8b8ff;
  --control-color: #fff;
  --control-shadow: inset 0 1px 0 #ffffff50, 0 0 16px #7040f17a;
  --control-hover-shadow: inset 0 1px 0 #ffffff69, 0 0 21px #7951ff99;
}
body.max-theme.radio-modern :is(.radio-playback-actions, .mini-player) .player-control-btn--secondary {
  --control-bg: radial-gradient(circle at 35% 25%, #342047, #1e1230 72%, #160d26);
  --control-hover-bg: radial-gradient(circle at 35% 25%, #432855, #29173c 72%, #1b102e);
  --control-border: #b869ff;
  --control-hover-border: #d39aff;
  --control-color: #fff;
  --control-shadow: inset 0 1px 0 #ffffff30, 0 0 0 1px #a050ed30, 0 0 10px #963eff80;
  --control-hover-shadow: inset 0 1px 0 #ffffff44, 0 0 0 1px #b062ff4d, 0 0 14px #a24cff9c;
}
body.max-theme.radio-modern .radio-playback-actions .player-control-btn--primary {
  --control-size: 58px;
  --control-icon-size: 28px;
  margin-right: 4px;
}
body.max-theme.radio-modern .radio-playback-actions .player-control-btn--secondary { --control-size: 32px; --control-icon-size: 17px; }
body.max-theme.radio-modern .mini-player .player-control-btn--primary {
  --control-size: 50px;
  --control-icon-size: 24px;
  justify-self: start;
}
body.max-theme.radio-modern .mini-player .player-control-btn--secondary { --control-size: 28px; --control-icon-size: 15px; }
body.max-theme.radio-modern .mini-player .mini-reconnect { justify-self: end; }
body.max-theme.radio-modern .mini-player .mini-mute { margin-right: 16px; }
body.max-theme.radio-modern .radio-playback-actions .player-control-btn--primary::before,
body.max-theme.radio-modern .radio-playback-actions .player-control-btn--primary::after {
  inset: -5px;
  border: 1px solid #8976ff82;
  border-radius: 50%;
}
body.max-theme.radio-modern :is(.radio-playback-actions, .mini-player) .player-control-btn :is(.player-icon, .player-refresh-icon, .player-mute-icon) {
  display: block;
  width: var(--control-icon-size);
  height: var(--control-icon-size);
  position: relative;
  z-index: 1;
  pointer-events: none;
}
body.max-theme.radio-modern :is(.radio-playback-actions, .mini-player) .player-control-btn .player-icon { fill: currentColor; }
body.max-theme.radio-modern :is(.radio-playback-actions, .mini-player) .player-control-btn :is(.player-refresh-icon, .player-mute-icon) {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body.max-theme.radio-modern :is(.radio-playback-actions, .mini-player) .player-control-btn .volume-muted,
body.max-theme.radio-modern :is(.radio-playback-actions, .mini-player) .player-control-btn.is-muted .volume-waves { display: none; }
body.max-theme.radio-modern :is(.radio-playback-actions, .mini-player) .player-control-btn.is-muted .volume-muted { display: block; }
body.max-theme.radio-modern :is(.radio-playback-actions, .mini-player) .player-control-btn:hover:not(:disabled) {
  background: var(--control-hover-bg);
  border-color: var(--control-hover-border);
  color: var(--control-hover-color);
  box-shadow: var(--control-hover-shadow);
  transform: none;
}
body.max-theme.radio-modern :is(.radio-playback-actions, .mini-player) .player-control-btn:focus-visible {
  outline: 2px solid #9edcff;
  outline-offset: 3px;
  transform: none;
}
body.max-theme.radio-modern :is(.radio-playback-actions, .mini-player) .player-control-btn:active:not(:disabled) {
  background: var(--control-active-bg);
  box-shadow: inset 0 2px 7px #0c071c9c, 0 0 8px #7849c570;
  transform: none;
}
body.max-theme.radio-modern :is(.radio-playback-actions, .mini-player) .player-control-btn:disabled {
  opacity: .58;
  cursor: wait;
  transform: none;
}
body.max-theme.radio-modern :is(.radio-playback-actions, .mini-player) .player-control-btn--secondary:disabled { opacity: .72; }
@media (max-width: 600px) {
  body.max-theme.radio-modern .mini-player .player-control-btn--primary { --control-size: 48px; }
}
@media (forced-colors: active) {
  body.max-theme.radio-modern :is(.radio-playback-actions, .mini-player) .player-control-btn {
    background: ButtonFace;
    border-color: ButtonText;
    color: ButtonText;
    box-shadow: none;
  }
  body.max-theme.radio-modern :is(.radio-playback-actions, .mini-player) .player-control-btn:hover:not(:disabled) {
    background: ButtonFace;
    border-color: Highlight;
    color: Highlight;
    box-shadow: none;
  }
  body.max-theme.radio-modern :is(.radio-playback-actions, .mini-player) .player-control-btn:focus-visible { outline-color: Highlight; }
  body.max-theme.radio-modern :is(.radio-playback-actions, .mini-player) .player-control-btn:disabled {
    border-color: GrayText;
    color: GrayText;
    opacity: 1;
  }
}
body.max-theme.radio-modern .action-tile { padding-right: 22px; }
body.max-theme.radio-modern .live-meta { display: block; color: var(--theme-muted); font-size: 12px; line-height: 1.5; }
body.max-theme.radio-modern .live-meta:empty { display: none; }
body.max-theme.radio-modern .reaction-bar { display: flex; flex-wrap: wrap; max-width: 100%; }
body.max-theme.radio-modern .reaction-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: auto; min-width: 54px; min-height: 44px; height: auto; padding: 7px 9px; border-radius: 12px;
}
body.max-theme.radio-modern .reaction-btn .reaction-count { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: #fff; }
body.max-theme.radio-modern .reaction-btn[aria-pressed="true"] { background: #4f2acc; border-color: #aa91ff; box-shadow: inset 0 0 0 1px #aa91ff; }
body.max-theme.radio-modern .reaction-btn:disabled { cursor: wait; }
.max-theme .reaction-status { color: var(--theme-muted); font-size: 12px; line-height: 1.6; margin: 10px 0; }
.max-theme .reaction-status:empty { display: none; }
/* Identity fragments outside the header (for example, the reviews login prompt). */
.max-theme .site-user-avatar:not(:where(.site-header--neon-v1 *)) {
  display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #3965e9, #782fe0); color: #fff; font-size: 11px; font-weight: 800;
}
.max-theme .site-user-name:not(:where(.site-header--neon-v1 *)) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.max-theme .auth-dialog {
  width: min(480px, calc(100% - 32px)); max-height: calc(100dvh - 40px); box-sizing: border-box;
  overflow-y: auto; padding: 32px; border: 1px solid #59446e; border-radius: 26px;
  background: linear-gradient(145deg,#21192e,#111018); color: #fff; font: inherit;
  box-shadow: 0 30px 100px #0009;
}
.max-theme .auth-dialog::backdrop { background: #000a; backdrop-filter: blur(5px); }
.max-theme .auth-dialog h2 { margin: 12px 30px 18px 0; font-size: 25px; }
.max-theme .auth-dialog p { color: #c9c4d1; font-size: 14px; line-height: 1.7; }
.max-theme .auth-dialog .auth-description { margin: 0 0 22px; }
.max-theme .auth-dialog.is-profile h2 { margin-bottom: 6px; }
.max-theme .profile-details { margin: 22px 0; }
.max-theme .profile-person { display: flex; align-items: center; gap: 16px; }
.max-theme .profile-avatar {
  display: grid; place-items: center; flex: 0 0 60px; width: 60px; height: 60px; border-radius: 20px;
  background: linear-gradient(135deg, #3867e8, #7029d1); border: 1px solid #9470f3;
  box-shadow: inset 0 1px 0 #ffffff30; font-size: 23px; font-weight: 800; color: #fff;
}
.max-theme .profile-name { display: block; overflow-wrap: anywhere; font-size: 22px; line-height: 1.35; }
.max-theme .profile-session { display: block; margin-top: 6px; font-size: 12px; color: #b6e6d1; }
.max-theme .profile-session::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: #6fd6ac; vertical-align: middle; }
.max-theme .profile-reaction { margin-top: 24px; padding: 18px; border: 1px solid #443453; border-radius: 18px; background: #271d3480; }
.max-theme .profile-caption { display: block; color: #c9c4d1; font-size: 12px; }
.max-theme .profile-reaction-value { display: block; margin-top: 7px; font-size: 18px; }
.max-theme .auth-dialog .profile-reaction-help { margin: 8px 0 0; font-size: 12px; }
.max-theme .auth-note:empty { display: none; }
.max-theme .auth-dialog .auth-note { color: #f3d3af; }
.max-theme .auth-close { position: absolute; right: 14px; top: 14px; display: grid; place-items: center; min-width: 44px; min-height: 44px; background: transparent; color: #fff; border: none; border-radius: 12px; cursor: pointer; }
.max-theme .auth-close:hover { background: #4d365e; }
.max-theme .auth-providers { display: grid; gap: 10px; margin: 22px 0; }
.max-theme .auth-provider, .max-theme .auth-logout { display: block; padding: 13px 18px; border: 1px solid #654b85; border-radius: 14px; color: #fff; font: inherit; font-size: 14px; font-weight: 700; text-align: center; text-decoration: none; background: #38215a; cursor: pointer; }
.max-theme .auth-vk { background: #075bce; border-color: #448df1; }
.max-theme .auth-mail { background: #164da1; border-color: #5c91de; }
.max-theme .auth-ok { background: #91420d; border-color: #d77b39; }
.max-theme .auth-provider:hover, .max-theme .auth-logout:hover { filter: brightness(1.2); }
.max-theme .auth-logout {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 50px;
  margin-top: 22px; border-color: #ed7390; background: #b62f51; font-size: 15px;
  box-shadow: inset 0 1px 0 #ffffff25; transition: background .2s, border-color .2s;
}
.max-theme .auth-logout:is(:hover, :focus-visible) { background: #d23960; border-color: #ff9eb7; filter: none; }
.max-theme .auth-logout:disabled { background: #663347; border-color: #976478; cursor: wait; }
.max-theme .auth-dialog .auth-privacy { margin: 20px 0 0; font-size: 11px; color: #aaa2b6; border-top: 1px solid #3a2e46; padding-top: 16px; }
/* Equal-size group actions throughout the site, including the home link in document footers. */
body.max-theme.radio-modern .tg-promo-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); align-items: stretch; }
body.max-theme.radio-modern .tg-promo-actions .tg-promo-btn { width: 100%; min-width: 0; min-height: 48px; box-sizing: border-box; padding: 12px 10px; text-align: center; }
body.max-theme.radio-modern .tg-promo-actions > :not(.tg-promo-btn) { align-self: center; }
body.max-theme.radio-modern .doc-actions-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
body.max-theme.radio-modern .doc-actions-bar .cta { width: 100%; min-width: 0; min-height: 48px; height: 100%; box-sizing: border-box; padding: 12px 14px; text-align: center; }
body.max-theme.radio-modern .doc-actions-bar .cta[href="/"] { --action-bg: linear-gradient(135deg, #3c2aad, #6825a8); --action-border: #8060c2; --action-hover: linear-gradient(110deg, #3556dd, #8840e5); --action-hover-border: #bda0f7; --action-text: #fff; }
@media (max-width: 960px) {
  body.max-theme.radio-modern .tg-promo-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.max-theme.radio-modern .tg-promo-actions > :not(.tg-promo-btn) { grid-column: 1 / -1; padding-top: 4px; }
}
@media (max-width: 760px) {
  body.max-theme.radio-modern .doc-actions-bar { grid-template-columns: 1fr; }
}
@media (max-width: 440px) {
  body.max-theme.radio-modern .tg-promo-actions { grid-template-columns: 1fr; }
}
@media (max-width: 440px) {
  body.max-theme.radio-modern .reaction-btn { min-width: 50px; padding: 7px; }
  body.max-theme.radio-modern .radio-player-footer { align-items: center; }
  .max-theme .auth-dialog { padding: 25px 22px; }
}

/* Group CTAs: local vector icons and brand-colored neon panels. Keep the original
   link/container classes for navigation and analytics. Context specificity
   also wins over the later-loaded instruction theme. */
body.max-theme.radio-modern :is(.tg-promo-actions, .doc-actions-bar, .instruction-page .instruction-channel-grid) a:is(.max-cta, .telegram-cta) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  position: relative;
  min-width: 0;
  min-height: var(--group-height, 48px);
  box-sizing: border-box;
  padding: var(--group-padding, 7px 14px);
  border: 1px solid transparent;
  border-radius: var(--group-radius, 16px);
  background: var(--group-fill,
    radial-gradient(ellipse at 100% 0%, #8D38FA40, transparent 58%) padding-box,
    linear-gradient(115deg, #131958, #1C1545 55%, #30145B) padding-box,
    linear-gradient(110deg, #3844F4, #752DFF 58%, #BB58FF) border-box);
  color: #FFF;
  box-shadow: var(--group-shadow, inset 0 0 14px #6337FF29, 0 0 0 1px #6E34FF24, 0 0 14px #6025ED24);
  font-size: var(--group-font-size, 15px);
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: box-shadow .2s ease, transform .2s ease;
}

body.max-theme.radio-modern :is(.tg-promo-actions, .doc-actions-bar, .instruction-page .instruction-channel-grid) a:is(.max-cta, .telegram-cta)::before {
  content: none;
}

body.max-theme.radio-modern a:is(.max-cta, .telegram-cta):not(:where(.site-header-cta)) :is(.max-cta-icon, .telegram-cta-icon) {
  position: absolute;
  top: 50%;
  left: var(--group-icon-offset, 14px);
  display: block;
  width: var(--group-icon-size, 32px);
  height: var(--group-icon-size, 32px);
  margin: 0;
  border-radius: var(--group-icon-radius, 28%);
  filter: drop-shadow(0 3px 7px var(--group-icon-shadow, #13083B66));
  transform: translateY(-50%);
  pointer-events: none;
}

body.max-theme.radio-modern a:is(.max-cta, .telegram-cta):not(:where(.site-header-cta)) :is(.max-cta-label, .telegram-cta-label) {
  display: block;
  min-width: 0;
  margin: 0;
  justify-self: center;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-shadow: 0 0 12px #D9C5FF26;
  pointer-events: none;
}

body.max-theme.radio-modern :is(.tg-promo-actions, .doc-actions-bar, .instruction-page .instruction-channel-grid) a:is(.max-cta, .telegram-cta):is(:hover, :focus-visible) {
  border-color: transparent;
  background: var(--group-hover-fill,
    radial-gradient(ellipse at 100% 0%, #A94BFF59, transparent 62%) padding-box,
    linear-gradient(115deg, #192274, #271955 55%, #411977) padding-box,
    linear-gradient(110deg, #6572FF, #9A5BFF 58%, #D38AFF) border-box);
  color: #FFF;
  box-shadow: var(--group-hover-shadow, inset 0 0 18px #7543FF38, 0 0 0 1px #9456FF55, 0 0 22px #8435F54D);
  transform: translateY(-1px);
}

body.max-theme.radio-modern :is(.tg-promo-actions, .doc-actions-bar, .instruction-page .instruction-channel-grid) a:is(.max-cta, .telegram-cta):focus-visible {
  outline: 3px solid #84D9FF;
  outline-offset: 4px;
}

body.max-theme.radio-modern :is(.tg-promo-actions, .doc-actions-bar, .instruction-page .instruction-channel-grid) a:is(.max-cta, .telegram-cta):active {
  transform: translateY(0);
}

body.max-theme.radio-modern .instruction-channel-grid a:is(.max-cta, .telegram-cta) {
  --group-icon-size: 44px;
  --group-icon-offset: 16px;
  --group-font-size: 20px;
  --group-height: 94px;
  --group-padding: 18px 20px;
  --group-radius: 20px;
}

/* Telegram reference uses a circular icon and a blue panel. */
body.max-theme.radio-modern a.telegram-cta:not(:where(.site-header-cta)) {
  --group-icon-radius: 50%;
  --group-icon-shadow: #002B6966;
  --group-font-size: 14px;
  --group-fill:
    radial-gradient(ellipse at 0% 0%, #35C4FF40, transparent 60%) padding-box,
    linear-gradient(110deg, #0750A4, #073783 55%, #083C99) padding-box,
    linear-gradient(110deg, #48D8FF, #208CFF 58%, #47BBFF) border-box;
  --group-hover-fill:
    radial-gradient(ellipse at 0% 0%, #5ADBFF59, transparent 62%) padding-box,
    linear-gradient(110deg, #0867BD, #0A459A 55%, #104AB4) padding-box,
    linear-gradient(110deg, #8BEAFF, #48BCFF 58%, #83E1FF) border-box;
  --group-shadow: inset 0 0 14px #229FFF30, 0 0 0 1px #329CFF24, 0 0 14px #16A3FF26;
  --group-hover-shadow: inset 0 0 18px #37BEFF38, 0 0 0 1px #5BCFFF55, 0 0 22px #1DA7F54D;
}

@media (max-width: 1200px) {
  body.max-theme.radio-modern .instruction-channel-grid a:is(.max-cta, .telegram-cta) {
    --group-icon-size: 40px;
    --group-icon-offset: 14px;
    --group-font-size: 17px;
    --group-padding: 16px;
  }
}

@media (max-width: 480px) {
  body.max-theme.radio-modern .instruction-channel-grid a:is(.max-cta, .telegram-cta) { --group-height: 82px; }
}

@media (prefers-reduced-motion: reduce) {
  body.max-theme.radio-modern :is(.tg-promo-actions, .doc-actions-bar, .instruction-page .instruction-channel-grid) a:is(.max-cta, .telegram-cta):any-link {
    transition: none;
    transform: none;
  }
}

@media (forced-colors: active) {
  body.max-theme.radio-modern :is(.tg-promo-actions, .doc-actions-bar, .instruction-page .instruction-channel-grid) a:is(.max-cta, .telegram-cta):any-link {
    background: Canvas;
    color: LinkText;
    border-color: LinkText;
    box-shadow: none;
    outline-color: Highlight;
  }
}
