/* Approved homepage palette. Scope follows the visible home main during navigation. */
body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) {
  --hp-surface: linear-gradient(118deg, #07151e, #0c1024 53%, #1d0c31);
  --hp-inner: linear-gradient(118deg, #0b1c2a, #11162c 53%, #221136);
  --hp-rim: linear-gradient(108deg, #38dcf49c, #4697f47a 38%, #934cff91 70%, #e256f2a1);
  --hp-inner-rim: linear-gradient(108deg, #38dcf452, #4697f44d 38%, #934cff60 70%, #e256f270);
  --hp-text-gradient: linear-gradient(100deg, #39d6f4, #9e9afa 56%, #d378ef);
  --hp-button: linear-gradient(112deg, #10415b, #24336c 48%, #51266f);
  --hp-button-hover: linear-gradient(112deg, #145670, #344580 48%, #693588);
  background-color: #0d0d0d;
}

body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) :is(.radio-page, .site-footer) {
  --theme-link: #53d4f4;
  --theme-hover: #c09af4;
  --theme-muted: #c5c8d8;
  --theme-subtle: #b6bed1;
  --theme-navy-muted: #c5c8d8;
}

/* Main panels share one fine rim. No extra nested frame is added. */
body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .radio-page :is(
  .home-intro, .action-tile, .game-stats, .radio-player-design,
  .history-with-hint, .tg-promo, .seo-panel
) {
  border-width: 1px;
  border-color: transparent;
  background: var(--hp-surface) padding-box, var(--hp-rim) border-box;
  box-shadow: 0 12px 30px #00000026;
}
body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .radio-page .home-intro {
  background: url("/assets/home-palette-waves.svg?v=20261019-home-palette-1") center / 100% 100% no-repeat padding-box,
    var(--hp-surface) padding-box, var(--hp-rim) border-box;
}
body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .theme-gradient-text,
body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .game-stats-heading h2 span {
  background-image: var(--hp-text-gradient);
  color: #b4a4ef;
  -webkit-text-fill-color: transparent;
}
body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .home-intro .theme-eyebrow { color: #7acbf0; }
body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .home-intro .theme-eyebrow::before { background: #65bff1; box-shadow: 0 0 10px #50c9f429; }
body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .action-tile {
  --action-hover: var(--hp-inner);
  --action-hover-border: #6d80c1;
  --action-shadow: 0 8px 20px #00000026;
  --action-muted: #c4c9dc;
}

/* Original header and messenger styles are intentionally retained. */
body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .home-intro .theme-button {
  --action-bg: var(--hp-button);
  --action-hover: var(--hp-button-hover);
  --action-border: #6b69bb80;
  --action-hover-border: #88b9dd;
  --action-shadow: inset 0 1px 0 #bdd2ff12;
}

/* Player: colors, border paint and glow only. Keep every size and position. */
body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .radio-player-design::after { opacity: .2; }
body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .radio-player-design .now-card {
  border-width: 1px;
  border-color: transparent;
  background: var(--hp-surface) padding-box, var(--hp-inner-rim) border-box;
  box-shadow: 0 8px 24px #00000022;
}
body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .radio-player-design .station-badge {
  border-color: #7192c38c;
  background: var(--hp-button);
  box-shadow: inset 0 1px 0 #bed9ff17;
}
body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .radio-player-design .fm-station-combobox {
  border-color: #6380ae78;
  background: var(--hp-inner);
  box-shadow: none;
}
body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .radio-player-design .radio-playback-actions .player-control-btn--primary {
  --control-bg: linear-gradient(118deg, #1197c0, #4661cc 53%, #9250c7);
  --control-hover-bg: linear-gradient(118deg, #22afd2, #6279e0 53%, #ac6cdb);
  --control-border: #9ab6e0;
  --control-shadow: inset 0 1px 2px #c8e3ff26, 0 0 13px #338cc930;
  --control-hover-shadow: inset 0 1px 2px #d6e9ff40, 0 0 18px #537ee34a;
}
body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .radio-player-design .radio-playback-actions .player-utility-capsule {
  border-color: #819dd3a1;
  background: linear-gradient(112deg, #116a8c, #3e4c98 52%, #803eac);
  box-shadow: inset 0 1px 0 #bcd9ff26, 0 0 12px #5089ce1f;
}
body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .radio-player-design #player .reaction-bar {
  border-color: #6b60834d;
  background: linear-gradient(118deg, #0b182a, #1c1330);
  box-shadow: none;
}
body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .radio-player-design #player .reaction-btn:not([aria-pressed="true"]) {
  border-color: #68538252;
  background: linear-gradient(118deg, #11233980, #281a3c80);
  box-shadow: none;
}
body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .radio-player-design #radioVolume::-webkit-slider-runnable-track {
  background: linear-gradient(to right, #3bd3f1 0%, #ac78df var(--volume-percent), #3e3c60 var(--volume-percent), #3e3c60 100%);
}
body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .radio-player-design #radioVolume::-webkit-slider-thumb {
  background: #7274d1;
  box-shadow: 0 0 8px #40b8d84d;
}
body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .radio-player-design #player .radio-mascot-close { background: #0e162ac9; border-color: #68779785; }
body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .radio-player-design .now-card .now-cover-wrap { box-shadow: 0 5px 18px #00000026; }
@media (min-width: 761px) {
  body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .game-stats .game-stat + .game-stat::before { content: none; }
  body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .radio-player-design .radio-control-panel {
    border-width: 1px;
    border-color: transparent;
    background: var(--hp-inner) padding-box, var(--hp-inner-rim) border-box;
    box-shadow: 0 7px 20px #00000022;
  }
}
@media (max-width: 760px) {
  body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .radio-player-design::after { opacity: .08; }
}

/* Lower homepage sections use quieter versions of the same color transition. */
body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .history-with-hint .history-hint {
  background: radial-gradient(ellipse at 100% 90%, #7844c71f, transparent 65%);
}
body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .history-with-hint .history-hint::after { opacity: .18; }
body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .history-with-hint .history-hint::before { background: linear-gradient(transparent, #5782af42, #895ca04f, transparent); }
body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .history-with-hint .history-item { border-color: #69759a2e; }
body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .history-with-hint .history-title-link,
body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .history-with-hint .history-hint h3 span { color: #4fd3f5; }
body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .history-with-hint .yandex-music-link {
  border-color: #9277c096;
  background: linear-gradient(118deg, #0e2940, #2b1742);
  box-shadow: inset 0 1px 0 #b2a9ed0d;
}
body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .tg-promo-icon {
  border-color: #7991da70;
  background: linear-gradient(118deg, #0b3a50, #311b50);
  color: #b7adfa;
  box-shadow: 0 0 18px #6945ad1c;
}
body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .radio-page .feature-faq-item {
  border-color: transparent;
  background: var(--hp-inner) padding-box, var(--hp-inner-rim) border-box;
  box-shadow: none;
}
body.max-theme.radio-modern:has(> main[data-site-page="home"]:not([hidden])) .site-footer { border-top-color: #62577b52; }

/* Balance the space around the three complete information groups. */
@media (min-width: 1100px) {
  body.max-theme.radio-modern .game-stats .game-stats-values {
    grid-template-columns: repeat(3, max-content);
    justify-content: space-between;
    align-items: start;
    column-gap: 24px;
  }
  body.max-theme.radio-modern .game-stats .game-stat {
    justify-content: flex-start;
  }
}

/* Keep the separators between tracks; the final row has no bottom rule. */
body.max-theme.radio-modern .history-with-hint .history-item:last-child {
  border-bottom: 0;
}
