/**
 * Premium ambient ASMR — кнопка в шапке главных ЕГЭ/ОГЭ
 */

.home-ambient-widget {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
  z-index: 120;
}

.home-ambient-widget--header {
  align-self: center;
  margin-left: 0.35rem;
}

.header__user-menu__panel > .home-ambient-widget--user-menu {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  margin: 0 0 0.2rem;
  z-index: 1;
}

.header__user-menu__panel > .home-ambient-widget--user-menu .home-ambient {
  width: 100%;
  justify-content: flex-start;
  padding: 0.48rem 0.7rem;
}

.header__user-menu__panel > .home-ambient-widget--user-menu .home-ambient__label {
  display: inline;
}

.header__user-menu__panel > .home-ambient-widget--user-menu .home-ambient-panel {
  position: static;
  width: 100%;
  margin-top: 0.35rem;
  right: auto;
  top: auto;
}

.home-ambient-widget--header .home-ambient-panel {
  top: calc(100% + 0.45rem);
  right: 0;
  left: auto;
  bottom: auto;
}

/* В компактном task-хеадере — только иконка */
.header__right--task-focus .home-ambient__label,
.header--task .home-ambient__label {
  display: none;
}

.header__right--task-focus .home-ambient,
.header--task .home-ambient {
  padding: 0.44rem;
  min-width: 2.35rem;
  justify-content: center;
}

.home-ambient-widget--footer {
  align-self: center;
}

.home-ambient-widget--site {
  position: fixed;
  top: auto;
  left: auto;
  right: max(0.5rem, env(safe-area-inset-right));
  bottom: max(0.5rem, env(safe-area-inset-bottom));
  z-index: 240;
  align-items: flex-end;
}

/* Ниже панели масштаба условия, чтобы не перекрывать её. */
body.variant-exam-body--oge .home-ambient-widget--site {
  bottom: max(0.15rem, env(safe-area-inset-bottom, 0px));
}

/* Над мобильным доком заданий ЕГЭ/ОГЭ */
body.task-mobile-mode .home-ambient-widget--site,
body.ege-python-task-mobile.task-mobile-mode .home-ambient-widget--site,
body.variant-exam-body--oge.task-mobile-mode .home-ambient-widget--site,
body[class*="oge-task"].task-mobile-mode .home-ambient-widget--site,
body:has(.kumir-mobile-dock:not([hidden])) .home-ambient-widget--site,
body:has(.ege-task2-mobile-dock:not([hidden])) .home-ambient-widget--site {
  bottom: calc(3.85rem + env(safe-area-inset-bottom, 0px));
}

.home-ambient-widget--beside-ai {
  position: absolute;
  top: auto;
  left: auto;
  right: 3.15rem;
  bottom: 6px;
  z-index: 21;
  align-items: flex-end;
}

/* Рядом с кнопкой AI в редакторе Python */
#python-sandbox-editor-pane {
  position: relative;
}

.home-ambient-widget--site .home-ambient-panel,
.home-ambient-widget--beside-ai .home-ambient-panel {
  top: auto;
  bottom: calc(100% + 0.45rem);
  right: 0;
  left: auto;
  animation: home-ambient-panel-up 0.28s ease-out;
}

.home-ambient-widget--site .home-ambient__label,
.home-ambient-widget--beside-ai .home-ambient__label {
  display: none;
}

.home-ambient-widget--site .home-ambient,
.home-ambient-widget--beside-ai .home-ambient {
  padding: 0.44rem;
  min-width: 2.35rem;
  justify-content: center;
}

/* На страницах с футер-баром кнопка в хеадере/site не нужна */
body:has(.home-ambient-widget--footer) .home-ambient-widget--header,
body:has(.home-ambient-widget--footer) .home-ambient-widget--site,
body:has(.home-ambient-widget--footer) .home-ambient-widget--beside-ai {
  display: none !important;
}

.home-ambient-widget--footer .home-ambient-panel {
  top: auto;
  bottom: calc(100% + 0.45rem);
  animation: home-ambient-panel-up 0.28s ease-out;
}

@keyframes home-ambient-panel-up {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.footer-home-bar {
  position: relative;
  z-index: 15;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  padding: 0.85rem 1rem;
  background: transparent;
  border-top: none;
}

.page--home .footer-home-bar {
  height: var(--home-footer-bar-height);
  min-height: var(--home-footer-bar-height);
  max-height: var(--home-footer-bar-height);
}

[data-theme="light"] .footer-home-bar {
  background: transparent;
}

.footer-home-bar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 42rem;
  width: 100%;
  margin: 0 auto;
  flex-shrink: 0;
}

.footer-home-bar__inner--with-theme {
  max-width: none;
  padding-left: max(0.35rem, env(safe-area-inset-left, 0px));
  padding-right: max(0.35rem, env(safe-area-inset-right, 0px));
}

/* Переключатель тем — левый нижний угол, на одной высоте с «Нейрошка» */
.footer-home-bar__theme {
  position: fixed;
  left: max(1.25rem, env(safe-area-inset-left, 0px));
  bottom: var(--home-fab-bottom, 1.75rem);
  z-index: 46;
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.footer-home-bar__theme .header-theme-controls {
  display: inline-flex;
  align-items: center;
}

.footer-home-bar__theme .theme-cycle-toggle {
  --theme-toggle-seg: 3.2rem;
  transform: none;
}

.footer-home-bar__theme .theme-cycle-toggle__option {
  min-height: 2.7rem;
  padding: 0.3rem 0.22rem 0.24rem;
}

.footer-home-bar__theme .theme-cycle-toggle__label {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .footer-home-bar__theme {
    left: max(0.85rem, env(safe-area-inset-left, 0px));
  }

  .footer-home-bar__theme .theme-cycle-toggle {
    --theme-toggle-seg: 2.75rem;
  }
}

@media (max-width: 520px) {
  .footer-home-bar__theme {
    left: max(0.55rem, env(safe-area-inset-left, 0px));
  }

  .footer-home-bar__theme .theme-cycle-toggle {
    --theme-toggle-seg: 2.35rem;
  }

  .footer-home-bar__theme .theme-cycle-toggle__label {
    font-size: 0.52rem;
  }
}

@media (max-width: 900px) and (orientation: landscape) and (pointer: coarse) {
  .footer-home-bar__theme {
    left: max(0.65rem, env(safe-area-inset-left, 0px));
  }

  .footer-home-bar__theme .theme-cycle-toggle {
    --theme-toggle-seg: 2.45rem;
  }
}

/* Единый премиальный pill-бар: Ритмы мозга · Вход · Регистрация · VK · TG */
.footer-home-bar__cluster {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.22rem;
  padding: 0.22rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 16, 22, 0.58);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

[data-theme="light"] .footer-home-bar__cluster {
  border-color: rgba(5, 184, 125, 0.16);
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.94) 0%,
    rgba(248, 252, 250, 0.9) 100%
  );
  box-shadow:
    0 6px 22px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.footer-home-bar__sep {
  flex-shrink: 0;
  width: 1px;
  height: 1.35rem;
  margin: 0 0.08rem;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 255, 255, 0.16) 50%,
    transparent 100%
  );
}

[data-theme="light"] .footer-home-bar__sep {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(15, 23, 42, 0.12) 50%,
    transparent 100%
  );
}

.footer-home-bar__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 1.85rem;
  padding: 0.42rem 0.82rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  color: var(--white);
  cursor: pointer;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.18s ease;
}

.footer-home-bar__chip:hover {
  transform: translateY(-1px);
}

.footer-home-bar__chip--ghost {
  color: rgba(255, 255, 255, 0.88);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.footer-home-bar__chip--ghost:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .footer-home-bar__chip--ghost {
  color: rgba(15, 23, 42, 0.78);
  border-color: rgba(15, 23, 42, 0.1);
  background: rgba(15, 23, 42, 0.03);
}

[data-theme="light"] .footer-home-bar__chip--ghost:hover {
  color: var(--text-color, #0f172a);
  border-color: rgba(15, 23, 42, 0.14);
  background: rgba(15, 23, 42, 0.06);
}

.footer-home-bar__chip--primary {
  color: #ecfdf5;
  border-color: rgba(110, 231, 183, 0.72);
  background: linear-gradient(
    165deg,
    rgba(5, 184, 125, 0.62) 0%,
    rgba(16, 185, 129, 0.42) 52%,
    rgba(5, 184, 125, 0.24) 100%
  );
  box-shadow:
    0 4px 16px rgba(5, 184, 125, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.footer-home-bar__chip--primary:hover {
  border-color: rgba(110, 231, 183, 0.88);
  box-shadow:
    0 6px 20px rgba(5, 184, 125, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

[data-theme="light"] .footer-home-bar__chip--primary {
  color: #064e3b;
  border-color: rgba(5, 184, 125, 0.45);
  background: linear-gradient(165deg, #05b87d 0%, #04a070 100%);
  box-shadow: 0 4px 14px rgba(5, 184, 125, 0.22);
}

.footer-home-bar__chip--calculator {
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.5);
  background: linear-gradient(
    165deg,
    rgba(234, 88, 12, 0.3) 0%,
    rgba(245, 158, 11, 0.18) 55%,
    rgba(251, 191, 36, 0.1) 100%
  );
}

.footer-home-bar__chip--calculator:hover {
  color: #fff7ed;
  border-color: rgba(251, 191, 36, 0.72);
  background: linear-gradient(
    165deg,
    rgba(234, 88, 12, 0.4) 0%,
    rgba(245, 158, 11, 0.26) 55%,
    rgba(251, 191, 36, 0.14) 100%
  );
}

.footer-home-bar__chip--turing {
  color: #e9d5ff;
  border-color: rgba(168, 85, 247, 0.5);
  background: linear-gradient(
    165deg,
    rgba(126, 34, 206, 0.32) 0%,
    rgba(147, 51, 234, 0.2) 55%,
    rgba(168, 85, 247, 0.12) 100%
  );
}

.footer-home-bar__chip--turing:hover {
  color: #faf5ff;
  border-color: rgba(192, 132, 252, 0.72);
  background: linear-gradient(
    165deg,
    rgba(126, 34, 206, 0.42) 0%,
    rgba(147, 51, 234, 0.28) 55%,
    rgba(168, 85, 247, 0.16) 100%
  );
}

[data-theme="light"] .footer-home-bar__chip--calculator {
  color: #9a3412;
  border-color: rgba(245, 158, 11, 0.42);
  background: linear-gradient(
    165deg,
    rgba(255, 237, 213, 0.98) 0%,
    rgba(254, 243, 199, 0.92) 100%
  );
}

[data-theme="light"] .footer-home-bar__chip--turing {
  color: #6b21a8;
  border-color: rgba(168, 85, 247, 0.38);
  background: linear-gradient(
    165deg,
    rgba(243, 232, 255, 0.98) 0%,
    rgba(233, 213, 255, 0.92) 100%
  );
}

.footer-home-bar__chip--icon {
  width: 1.85rem;
  min-width: 1.85rem;
  padding: 0.42rem;
}

.footer-home-bar__chip-icon {
  display: block;
  width: 1rem;
  height: 1rem;
  pointer-events: none;
}

.footer-home-bar__chip--vk {
  border-color: rgba(76, 139, 245, 0.28);
  background: rgba(76, 139, 245, 0.08);
}

.footer-home-bar__chip--vk:hover {
  border-color: rgba(76, 139, 245, 0.5);
  background: rgba(76, 139, 245, 0.16);
  box-shadow: 0 4px 14px rgba(76, 139, 245, 0.2);
}

.footer-home-bar__chip--tg {
  border-color: rgba(42, 171, 238, 0.28);
  background: rgba(42, 171, 238, 0.08);
}

.footer-home-bar__chip--tg:hover {
  border-color: rgba(42, 171, 238, 0.5);
  background: rgba(42, 171, 238, 0.16);
  box-shadow: 0 4px 14px rgba(42, 171, 238, 0.2);
}

.footer-home-bar__chip--max {
  border-color: rgba(75, 81, 240, 0.32);
  background: rgba(75, 81, 240, 0.1);
}

.footer-home-bar__chip--max:hover {
  border-color: rgba(75, 81, 240, 0.55);
  background: rgba(75, 81, 240, 0.18);
  box-shadow: 0 4px 14px rgba(75, 81, 240, 0.22);
}

.footer-home-bar__chip--guide {
  border-color: rgba(5, 184, 125, 0.45);
  background: rgba(5, 184, 125, 0.16);
  color: #ecfdf5;
}

.footer-home-bar__chip--guide:hover {
  border-color: rgba(74, 222, 128, 0.7);
  background: rgba(5, 184, 125, 0.28);
  box-shadow: 0 4px 14px rgba(5, 184, 125, 0.24);
}

[data-theme="light"] .footer-home-bar__chip--guide {
  color: #065f46;
  border-color: rgba(5, 150, 105, 0.4);
  background: rgba(16, 185, 129, 0.12);
}

html[data-palette="pink"] .footer-home-bar__chip--guide {
  color: #fff1f2;
  border-color: rgba(251, 113, 133, 0.55);
  background: rgba(225, 29, 72, 0.22);
}

html[data-palette="pink"][data-theme="light"] .footer-home-bar__chip--guide {
  color: #9f1239;
  border-color: rgba(225, 29, 72, 0.4);
  background: rgba(251, 113, 133, 0.16);
}

/* «Ритмы мозга» — тот же chip внутри кластера */
.footer-home-bar .home-ambient-widget {
  position: relative;
  display: inline-flex;
  align-self: center;
}

.footer-home-bar .home-ambient {
  gap: 0.35rem;
  padding: 0.42rem 0.82rem 0.42rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(5, 184, 125, 0.38);
  background: rgba(5, 184, 125, 0.1);
  color: rgba(236, 253, 245, 0.95);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

[data-theme="light"] .footer-home-bar .home-ambient {
  color: #065f46;
  border-color: rgba(5, 184, 125, 0.28);
  background: rgba(5, 184, 125, 0.08);
  box-shadow: none;
}

.footer-home-bar .home-ambient:hover {
  transform: translateY(-1px);
  border-color: rgba(5, 184, 125, 0.52);
  background: rgba(5, 184, 125, 0.16);
  box-shadow: 0 4px 14px rgba(5, 184, 125, 0.18);
}

.footer-home-bar .home-ambient[aria-expanded="true"] {
  border-color: rgba(110, 231, 183, 0.72);
  background: linear-gradient(
    165deg,
    rgba(5, 184, 125, 0.5) 0%,
    rgba(16, 185, 129, 0.32) 100%
  );
  box-shadow:
    0 4px 16px rgba(5, 184, 125, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.footer-home-bar .home-ambient--sea,
.footer-home-bar .home-ambient--rain,
.footer-home-bar .home-ambient--forest,
.footer-home-bar .home-ambient--music,
.footer-home-bar .home-ambient--relax,
.footer-home-bar .home-ambient--focus {
  border-color: rgba(5, 184, 125, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.footer-home-bar .home-ambient__icon {
  font-size: 0.95rem;
}

.footer-home-bar .home-ambient-panel {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

.home-ambient {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.42rem 0.72rem 0.42rem 0.58rem;
  border-radius: 999px;
  border: 1px solid rgba(5, 184, 125, 0.32);
  background: linear-gradient(
    165deg,
    rgba(22, 28, 36, 0.9) 0%,
    rgba(14, 18, 24, 0.94) 100%
  );
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.18s ease,
    background 0.22s ease;
}

[data-theme="light"] .home-ambient {
  border-color: rgba(5, 184, 125, 0.24);
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(245, 252, 249, 0.92) 100%
  );
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.home-ambient:hover {
  transform: translateY(-2px);
  border-color: rgba(5, 184, 125, 0.52);
  box-shadow: 0 10px 28px rgba(5, 184, 125, 0.16);
}

.home-ambient[aria-expanded="true"] {
  border-color: rgba(5, 184, 125, 0.55);
  box-shadow:
    0 10px 28px rgba(5, 184, 125, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.home-ambient__icon {
  display: none;
  font-size: 1rem;
  line-height: 1;
}

.home-ambient--off .home-ambient__icon--off,
.home-ambient--sea .home-ambient__icon--sea,
.home-ambient--rain .home-ambient__icon--rain,
.home-ambient--forest .home-ambient__icon--forest,
.home-ambient--music .home-ambient__icon--music,
.home-ambient--relax .home-ambient__icon--relax,
.home-ambient--focus .home-ambient__icon--focus {
  display: block;
}

.home-ambient--sea {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.2);
}

.home-ambient--rain {
  border-color: rgba(148, 163, 184, 0.5);
  box-shadow: 0 8px 24px rgba(100, 116, 139, 0.18);
}

.home-ambient--forest {
  border-color: rgba(74, 222, 128, 0.42);
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.16);
}

.home-ambient--music {
  border-color: rgba(192, 132, 252, 0.45);
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.2);
}

.home-ambient--relax {
  border-color: rgba(129, 140, 248, 0.5);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
}

.home-ambient--focus {
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.22);
}

.home-ambient-panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  width: min(22rem, calc(100vw - 1.5rem));
  padding: 0.85rem 0.85rem 0.75rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(
    165deg,
    rgba(18, 24, 32, 0.96) 0%,
    rgba(10, 14, 20, 0.98) 100%
  );
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: home-ambient-panel-in 0.28s ease-out;
}

[data-theme="light"] .home-ambient-panel {
  border-color: rgba(15, 23, 42, 0.08);
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.97) 0%,
    rgba(248, 250, 252, 0.95) 100%
  );
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
}

@keyframes home-ambient-panel-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.home-ambient-panel__title {
  margin: 0 0 0.65rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

[data-theme="light"] .home-ambient-panel__title {
  color: rgba(15, 23, 42, 0.45);
}

.home-ambient-panel__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.home-ambient-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  min-height: 4.1rem;
  padding: 0.55rem 0.4rem;
  border-radius: 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--white);
  font: inherit;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.18s ease;
}

[data-theme="light"] .home-ambient-scene {
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(15, 23, 42, 0.03);
  color: var(--text-color, #0f172a);
}

.home-ambient-scene:hover {
  transform: translateY(-1px);
}

.home-ambient-scene__icon {
  font-size: 1.35rem;
  line-height: 1;
}

.home-ambient-scene__name {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.home-ambient-scene--sea:hover,
.home-ambient-scene--sea[aria-pressed="true"] {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(14, 165, 233, 0.12);
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.18);
}

.home-ambient-scene--rain:hover,
.home-ambient-scene--rain[aria-pressed="true"] {
  border-color: rgba(148, 163, 184, 0.55);
  background: rgba(100, 116, 139, 0.14);
  box-shadow: 0 6px 18px rgba(100, 116, 139, 0.16);
}

.home-ambient-scene--forest:hover,
.home-ambient-scene--forest[aria-pressed="true"] {
  border-color: rgba(74, 222, 128, 0.5);
  background: rgba(34, 197, 94, 0.12);
  box-shadow: 0 6px 18px rgba(34, 197, 94, 0.14);
}

.home-ambient-scene--music:hover,
.home-ambient-scene--music[aria-pressed="true"] {
  border-color: rgba(192, 132, 252, 0.55);
  background: rgba(168, 85, 247, 0.12);
  box-shadow: 0 6px 18px rgba(168, 85, 247, 0.18);
}

.home-ambient-scene--relax:hover,
.home-ambient-scene--relax[aria-pressed="true"] {
  border-color: rgba(129, 140, 248, 0.58);
  background: rgba(99, 102, 241, 0.14);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.18);
}

.home-ambient-scene--focus:hover,
.home-ambient-scene--focus[aria-pressed="true"] {
  border-color: rgba(251, 191, 36, 0.6);
  background: rgba(245, 158, 11, 0.14);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.2);
}

.home-ambient-panel__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.home-ambient-panel__hide,
.home-ambient-panel__off {
  width: 100%;
  padding: 0.48rem 0.65rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

[data-theme="light"] .home-ambient-panel__hide,
[data-theme="light"] .home-ambient-panel__off {
  border-color: rgba(15, 23, 42, 0.1);
  color: rgba(15, 23, 42, 0.55);
}

.home-ambient-panel__hide:hover,
.home-ambient-panel__off:hover {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .home-ambient-panel__hide:hover,
[data-theme="light"] .home-ambient-panel__off:hover {
  color: var(--text-color, #0f172a);
  border-color: rgba(15, 23, 42, 0.16);
  background: rgba(15, 23, 42, 0.04);
}

.page--oge-home .home-ambient--sea {
  border-color: rgba(45, 212, 191, 0.45);
  box-shadow: 0 8px 24px rgba(20, 184, 166, 0.18);
}

.page--oge-home .home-ambient-scene--sea[aria-pressed="true"],
.page--oge-home .home-ambient-scene--sea:hover {
  border-color: rgba(45, 212, 191, 0.55);
  background: rgba(20, 184, 166, 0.12);
  box-shadow: 0 6px 18px rgba(20, 184, 166, 0.16);
}

[data-palette="pink"] .page--home .page-home-bottom {
  border-top-color: var(--header-premium-border);
  box-shadow:
    0 -6px 28px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 var(--accent-soft),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}

[data-palette="pink"] .page--home .page-home-bottom::before {
  background: linear-gradient(
    90deg,
    rgba(192, 132, 252, 0.45) 0%,
    var(--accent-strong) 42%,
    var(--accent) 58%,
    rgba(251, 113, 133, 0.55) 100%
  );
}

[data-palette="pink"] .footer-home-bar__cluster {
  border-color: var(--accent-border);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

[data-palette="pink"] .footer-home-bar__chip--primary,
[data-palette="pink"] .footer-home-bar .home-ambient[aria-expanded="true"] {
  border-color: var(--accent-border-strong);
  box-shadow: 0 4px 16px var(--accent-glow);
}

[data-palette="pink"] .home-ambient,
[data-palette="pink"] .home-ambient-panel {
  border-color: var(--accent-border);
}

[data-palette="pink"] .home-ambient--sea,
[data-palette="pink"] .home-ambient--rain,
[data-palette="pink"] .home-ambient--forest,
[data-palette="pink"] .home-ambient--music,
[data-palette="pink"] .home-ambient--relax,
[data-palette="pink"] .home-ambient--focus {
  border-color: var(--accent-border-strong);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.header--home .home-ambient {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .header--home .home-ambient {
  border-color: rgba(5, 184, 125, 0.18);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.header--home .home-ambient:hover {
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .header--home .home-ambient__label,
  .home-ambient-widget--header .home-ambient__label {
    display: none;
  }

  .header--home .home-ambient,
  .home-ambient-widget--header .home-ambient {
    padding: 0.44rem;
    min-width: 2.35rem;
    justify-content: center;
  }

  .footer-home-bar__cluster {
    gap: 0.18rem;
    padding: 0.18rem;
  }

  .footer-home-bar__chip,
  .footer-home-bar .home-ambient {
    font-size: 0.7rem;
    padding: 0.38rem 0.68rem;
  }

  .footer-home-bar__chip--icon {
    width: 1.75rem;
    min-width: 1.75rem;
    padding: 0.38rem;
  }

  .home-ambient-panel {
    width: min(16.5rem, calc(100vw - 1.25rem));
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-ambient-widget {
    display: none !important;
  }
}
