/* Shared garland: ТК Промресурс (#tkp-holiday, both headers) and EGGER-M (#top_bg, home only). */

/* ---------- Band ---------- */
:root {
  --tkp-holiday-height: clamp(66px, 5.55vw, 79px);
  --tkp-holiday-overlap: 14px;
}
.tkp-holiday-band + .site-header { top: var(--tkp-holiday-height); }
.tkp-holiday-band + .site-header::before { top: calc(-1 * var(--tkp-holiday-overlap)); }
/* Home: the hero photo starts higher, under the snowdrift, so its drips hang over the photo
   instead of over a strip of page background. The hero's content stays where it was. */
html:not(.holiday-off) .tkp-holiday-band ~ .hero { margin-top: -26px; padding-top: 26px; }
html:not(.holiday-off) .tkp-holiday-band + .site-header::before { top: calc(-1 * var(--tkp-holiday-overlap) - 26px); }

.holiday-band {
  --ny-tile: clamp(185px, 20vw, 305px);
  --ny-unit: clamp(.55px, .0782vw, 1px);
  --ny-snow: #fbfcfd;
  --ny-music-space: 0px;
  position: relative;
  isolation: isolate;
  height: var(--ny-rise);
  pointer-events: none;
}
.tkp-holiday-band {
  --ny-rise: var(--tkp-holiday-height);
  --ny-music-space: 180px;
  z-index: 51;
  /* The hero starts behind the shallow parts of the snow silhouette. */
  margin-block-end: calc(-1 * var(--tkp-holiday-overlap));
}
#top_bg { --ny-rise: clamp(54px, 5.55vw, 79px); }
#top_bg > .holiday-band { --ny-music-space: 40px; }
#top_bg > .holiday-band {
  z-index: 30;
  /* Under the snowdrift's ragged edge EGGER-M's black top bar continues. */
  background: linear-gradient(transparent calc(100% - 30px), var(--dark, #16181a) 0);
}
/* EGGER-M builds the band in JS: hold its place with snow and fir so the page does not jump. */
html:not(.holiday-ready) #top_bg::before {
  content: "";
  display: block;
  height: var(--ny-rise);
  background:
    url(snow/branches-snow.webp) left -13px / clamp(185px, 20vw, 305px) auto repeat-x,
    url(snow/snowdrift.webp) left calc(var(--ny-rise) * -.33) / auto calc(var(--ny-rise) * 1.72) repeat-x,
    linear-gradient(transparent calc(100% - 30px), var(--dark, #16181a) 0);
}
.holiday-band::before {
  content: "";
  position: absolute;
  /* One snowdrift under the whole band (Codex, 2400×300, seamless): its solid top lies behind the fir,
     the soft wavy edge (63–85 % of the image height) falls at 75–113 % of the band and spills onto the page. */
  inset: 0 0 calc(var(--ny-rise) * -.25);
  background: url(snow/snowdrift.webp) left calc(var(--ny-rise) * -.33) / auto calc(var(--ny-rise) * 1.72) repeat-x;
  pointer-events: none;
}
.holiday-spruce {
  position: absolute;
  inset: -13px 0 auto;
  height: calc(var(--ny-tile) * .357);
  background: url(snow/branches-snow.webp) left top / var(--ny-tile) auto repeat-x;
  clip-path: inset(13px 0 0);
}
.holiday-viewport,
.holiday-lights {
  position: absolute;
  inset: 0 0 auto;
  height: calc(var(--ny-rise) + 19px);
}
.holiday-viewport {
  z-index: 2;
  inset-inline-end: var(--ny-music-space);
  overflow: clip;
  overflow-clip-margin: 2px;
}
.holiday-toys { position: relative; height: 100%; }

/* ---------- Toys ---------- */
.holiday-toy {
  --ny-swing: 8deg;
  position: absolute;
  left: var(--ny-x);
  top: calc(var(--ny-y) * var(--ny-unit));
  width: calc(var(--ny-size) * var(--ny-unit));
  height: calc(var(--ny-size) * var(--ny-unit));
  transform: translateX(-50%);
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 5px;
  pointer-events: auto;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
.holiday-toy[hidden] { display: none; }
/* The thread reaches up into the branches whatever the drop: a low toy must not hang in the air. */
.holiday-toy::before {
  --ny-thread: max(10px, calc(var(--ny-y) * var(--ny-unit) - 6px));
  content: "";
  position: absolute;
  top: calc(2px - var(--ny-thread));
  left: calc(50% - .5px);
  width: 1px;
  height: var(--ny-thread);
  background: #a98760;
  pointer-events: none;
}
.holiday-toy img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: 50% 0;
  pointer-events: none;
}
.holiday-toy.is-ringing { z-index: 1; }
.holiday-toy.is-ringing img { animation: holiday-swing .65s ease-out; }
@keyframes holiday-swing {
  0%,100% { transform: none; }
  24% { transform: rotate(var(--ny-swing)); }
  52% { transform: rotate(calc(var(--ny-swing) * -.53)); }
  79% { transform: rotate(calc(var(--ny-swing) * .23)); }
}
/* Changing into the next set: the toy dips, turns and comes back in its new look. */
.holiday-toy.is-dressing img { animation: holiday-dress .62s ease-in-out; }
@keyframes holiday-dress {
  0%,100% { opacity: 1; transform: none; }
  40%,50% { opacity: 0; transform: rotate(var(--ny-swing)) scale(.55); }
}
/* Idle breeze: a slower, smaller sway than a tap, as if a hand brushed the branch. */
.holiday-toy.is-swaying img { animation: holiday-sway 1.5s ease-in-out; }
@keyframes holiday-sway {
  0%,100% { transform: none; }
  25% { transform: rotate(var(--ny-swing)); }
  55% { transform: rotate(calc(var(--ny-swing) * -.6)); }
  80% { transform: rotate(calc(var(--ny-swing) * .25)); }
}
.holiday-toy:focus { outline: none; }
.holiday-toy:focus-visible { outline: 2px solid #78a490; outline-offset: 2px; }

/* ---------- Lights ---------- */
.holiday-lights { z-index: 1; pointer-events: none; }
.holiday-light {
  position: absolute;
  left: var(--ny-light-x);
  top: var(--ny-light-y);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 36%, #fff9ef 10%, var(--ny-light) 70%);
  box-shadow: 0 0 5px 1px var(--ny-light), 0 0 12px 3px var(--ny-light-haze);
  animation: holiday-twinkle var(--ny-light-period) var(--ny-light-phase) ease-in-out infinite;
}
@keyframes holiday-twinkle {
  0%,100% { opacity: .12; transform: scale(.74); }
  19% { opacity: .28; }
  42%,53% { opacity: 1; transform: scale(1.38); }
  71% { opacity: .55; transform: scale(.98); }
  86% { opacity: .22; }
}
.holiday-lights--retro .holiday-light {
  width: 7px;
  height: 9px;
  border-radius: 48% 48% 55% 55% / 38% 38% 68% 68%;
  background: radial-gradient(ellipse at 37% 30%, #fff9ed 12%, var(--ny-light) 55%, var(--ny-light-haze) 100%);
  box-shadow: 0 0 6px 1px var(--ny-light), 0 0 14px 3px var(--ny-light-haze);
  animation-name: holiday-retro;
}
@keyframes holiday-retro {
  0%,100% { opacity: .19; transform: scale(.87); }
  38%,57% { opacity: 1; transform: scale(1.12); }
  76% { opacity: .55; }
}
.holiday-lights--retro .holiday-light::before {
  content: "";
  position: absolute;
  inset: -2px 1px auto;
  height: 3px;
  border-radius: 1px;
  background: #b5a06f;
}
.holiday-lights--frost .holiday-light {
  width: 4px;
  height: 4px;
  background: #fffaf3;
  box-shadow: 0 0 6px 1px var(--ny-light), 0 0 12px 3px var(--ny-light-haze);
  animation-name: holiday-frost;
}
@keyframes holiday-frost {
  0%,100% { opacity: .14; transform: scale(.8); }
  30% { opacity: .61; }
  49%,61% { opacity: 1; transform: scale(1.26); }
  79% { opacity: .5; }
}
.holiday-lights--frost .holiday-light::before,
.holiday-lights--frost .holiday-light::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--ny-light);
  box-shadow: 0 0 5px 1px var(--ny-light-haze);
}
.holiday-lights--frost .holiday-light::before { top: -5px; left: -7px; }
.holiday-lights--frost .holiday-light::after { top: 5px; left: 6px; }

/* ---------- «Музыка» button: ■ stops the song without opening the menu ---------- */
.holiday-launch {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
}
.tkp-holiday-band > .holiday-launch {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  pointer-events: auto;
}
.holiday-launch :is(.holiday-trigger, .holiday-stop) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  white-space: nowrap;
  cursor: pointer;
}
.holiday-launch .holiday-stop[hidden] { display: none; }
.holiday-stop::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: currentColor;
}
.holiday-trigger-text { max-width: 76px; overflow: hidden; text-overflow: ellipsis; }
.holiday-glyph { font-size: 20px; line-height: .85; }
.holiday-eq { display: none; align-items: flex-end; gap: 2px; width: 13px; height: 14px; }
.holiday-eq i { width: 3px; height: 4px; border-radius: 1px; background: currentColor; animation: holiday-eq .8s ease-in-out infinite alternate; }
.holiday-eq i:nth-child(2) { animation-delay: -.27s; }
.holiday-eq i:nth-child(3) { animation-delay: -.53s; }
@keyframes holiday-eq { to { height: 14px; } }
.holiday-launch.is-playing .holiday-trigger .holiday-glyph { display: none; }
.holiday-launch.is-playing .holiday-eq { display: inline-flex; }
.holiday-launch :focus-visible { outline: 2px solid #f2d497; outline-offset: 2px; }

/* ТК Промресурс: navy, same in light and dark theme (it sits on the snow). */
.tkp-holiday-band .holiday-launch :is(.holiday-trigger, .holiday-stop) {
  min-width: 40px;
  min-height: 40px;
  padding: 4px 11px;
  border: 1px solid #e0ecff8c;
  border-radius: 9px;
  background: #102951;
  color: #fff;
  font: 600 14px/1 var(--font-sans, system-ui, sans-serif);
}
.tkp-holiday-band .holiday-launch .holiday-stop { width: 40px; padding: 0; color: #f6d17f; }
.tkp-holiday-band .holiday-launch :is(.holiday-trigger, .holiday-stop):hover,
.tkp-holiday-band .holiday-trigger[aria-expanded="true"] { border-color: #b4d0ff; background: #1a3d70; }
.tkp-holiday-band .holiday-glyph { color: #bfdbff; }
.tkp-holiday-band .holiday-eq { color: #f6d17f; }

/* EGGER-M: dark green chip in the black top bar. */
#user_box_top > .holiday-launch :is(.holiday-trigger, .holiday-stop) {
  min-width: 34px;
  min-height: 33px;
  padding: 4px 10px;
  border: 1px solid #e4cf926e;
  border-radius: 8px;
  background: #294237;
  color: #fff1cc;
  font: inherit;
  font-weight: 700;
}
#user_box_top > .holiday-launch .holiday-stop { width: 34px; padding: 0; color: #f0b0a8; }
#user_box_top > .holiday-launch :is(.holiday-trigger, .holiday-stop):hover,
#user_box_top .holiday-trigger[aria-expanded="true"] { border-color: #e4cf92; background: #3c5645; }
#user_box_top .holiday-trigger-text { max-width: 150px; }
#user_box_top .holiday-glyph { color: #e0857b; }
#user_box_top .holiday-eq { color: #f0b0a8; }

/* ---------- Music menu: a small panel under the button, no backdrop ---------- */
.holiday-pop {
  display: none;
  position: fixed;
  z-index: 3200;
  inset: auto;
  box-sizing: border-box;
  margin: 0;
}
.holiday-pop:popover-open,
.holiday-pop.is-open { display: block; }
/* Each site dresses the menu in its own colours through these variables. */
.holiday-player {
  --hp-bg: #fff;
  --hp-text: #0B1220;
  --hp-muted: #5B6478;
  --hp-line: rgba(11,18,32,.10);
  --hp-border: rgba(11,18,32,.14);
  --hp-head-bg: linear-gradient(135deg, #0E2A5E, #1846C9);
  --hp-head-text: #fff;
  --hp-glyph-bg: rgba(255,255,255,.14);
  --hp-glyph: #fff;
  --hp-accent: #1E5BFF;
  --hp-on-accent: #fff;
  --hp-hover: rgba(30,91,255,.08);
  --hp-icon-bg: #EEF1F6;
  --hp-icon: #1E5BFF;
  --hp-switch-off: #D9DEE8;
  --hp-radius: 16px;
  --hp-inner-radius: 10px;
  --hp-font: var(--font-sans, system-ui, sans-serif);
  --hp-title-font: 700 18px/1.15 var(--font-display, var(--font-sans, system-ui, sans-serif));
  --hp-shadow: 0 2px 6px rgba(11,18,32,.05), 0 24px 64px rgba(11,18,32,.16);
  width: min(340px, calc(100vw - 16px));
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius);
  background: var(--hp-bg);
  color: var(--hp-text);
  box-shadow: var(--hp-shadow);
  font-family: var(--hp-font);
  text-align: left;
}
/* ТК Промресурс, тёмная тема сайта */
[data-theme="dark"] .holiday-player--tkp {
  --hp-bg: #11151F;
  --hp-text: #EEF2F8;
  --hp-muted: #8A93A6;
  --hp-line: rgba(255,255,255,.08);
  --hp-border: rgba(255,255,255,.16);
  --hp-head-bg: linear-gradient(135deg, #0A1630, #1B3C8C);
  --hp-accent: #3D7BFF;
  --hp-hover: rgba(61,123,255,.14);
  --hp-icon-bg: rgba(61,123,255,.18);
  --hp-icon: #8FB2FF;
  --hp-switch-off: #2A3142;
  --hp-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 24px 48px rgba(0,0,0,.65);
}
/* EGGER-M: white paper, black bar, EGGER red, small radii, system font */
.holiday-player--egger {
  --hp-text: #16181a;
  --hp-muted: #5c6166;
  --hp-line: #e2e2dd;
  --hp-border: #cfcfc8;
  --hp-head-bg: #16181a;
  --hp-glyph-bg: #DA1737;
  --hp-accent: #DA1737;
  --hp-hover: #f5f5f3;
  --hp-icon-bg: #f5f5f3;
  --hp-icon: #DA1737;
  --hp-switch-off: #e2e2dd;
  --hp-radius: 8px;
  --hp-inner-radius: 4px;
  --hp-font: var(--font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif);
  --hp-title-font: 700 17px/1.15 var(--hp-font);
  --hp-shadow: 0 2px 4px rgba(22,24,26,.07), 0 18px 44px rgba(22,24,26,.16);
}
.holiday-player--egger .holiday-player-head { border-top: 3px solid #DA1737; }
.holiday-player-head {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 12px 10px 14px;
  background: var(--hp-head-bg);
  color: var(--hp-head-text);
}
.holiday-player-head::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto auto;
  width: 170px;
  height: 58px;
  background: url(continuous-branches.png) right 30% / 190px auto no-repeat;
  mask-image: linear-gradient(to right, transparent, #000 45%);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 45%);
  opacity: .7;
  pointer-events: none;
}
.holiday-player-head .holiday-glyph {
  display: grid;
  flex: 0 0 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--hp-glyph-bg);
  color: var(--hp-glyph);
  font-size: 17px;
}
.holiday-player h2 {
  margin: 0;
  color: inherit;
  font: var(--hp-title-font);
  letter-spacing: 0;
  text-transform: none;
}
.holiday-player button { font-family: inherit; cursor: pointer; }
.holiday-player-body { padding: 8px 12px 12px; }
.holiday-close {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  margin-left: auto;
  padding: 0;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 50%;
  background: rgba(0,0,0,.22);
  color: #fff;
  font-size: 22px;
  line-height: 1;
}
.holiday-close:hover { background: rgba(255,255,255,.16); }
.holiday-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 6px 8px 6px 10px;
  border: 0;
  border-bottom: 1px solid var(--hp-line);
  border-radius: var(--hp-inner-radius) var(--hp-inner-radius) 0 0;
  background: transparent;
  color: var(--hp-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
}
.holiday-track:hover,
.holiday-track[aria-pressed="true"] { background: var(--hp-hover); }
.holiday-track-icon {
  display: grid;
  flex: 0 0 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--hp-icon-bg);
  color: var(--hp-icon);
  font: 11px/1 Arial, sans-serif;
}
.holiday-track[aria-pressed="true"] .holiday-track-icon { background: var(--hp-accent); color: var(--hp-on-accent); }
.holiday-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 8px 0 0;
  min-height: 36px;
  padding: 3px 8px 3px 10px;
  border: 0;
  background: transparent;
  color: var(--hp-muted);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}
.holiday-switch-mark {
  position: relative;
  flex: none;
  width: 35px;
  height: 20px;
  border-radius: 12px;
  background: var(--hp-switch-off);
}
.holiday-switch-mark::after {
  content: "";
  position: absolute;
  inset: 3px auto auto 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
  transition: transform .15s ease;
}
.holiday-switch[aria-checked="true"] .holiday-switch-mark { background: var(--hp-accent); }
.holiday-switch[aria-checked="true"] .holiday-switch-mark::after { transform: translateX(15px); }
.holiday-set-picker {
  margin: 8px 0 0;
  padding: 10px 0 0;
  border-top: 1px dashed var(--hp-line);
}
.holiday-set-label {
  display: block;
  margin: 0 0 8px 10px;
  color: var(--hp-muted);
  font-size: 13px;
  font-weight: 600;
}
.holiday-set-row { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 6px; }
.holiday-set-choice {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--hp-line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.holiday-set-choice img { width: 28px; height: 34px; object-fit: contain; pointer-events: none; }
.holiday-set-choice:hover { background: var(--hp-hover); }
.holiday-set-choice[aria-pressed="true"] { border: 2px solid var(--hp-accent); background: var(--hp-hover); }
.holiday-light-picker {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 5px;
  min-width: 0;
  margin: 8px 0 0;
  padding: 9px 0 0;
  border: 0;
  border-top: 1px dashed var(--hp-line);
}
.holiday-light-picker legend {
  width: auto;
  margin: 0;
  padding: 0 7px 0 0;
  border: 0;
  color: var(--hp-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}
.holiday-light-choice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 34px;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--hp-line);
  border-radius: var(--hp-inner-radius);
  background: transparent;
  color: var(--hp-text);
  font-size: 12px;
  font-weight: 600;
}
.holiday-light-choice::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ny-swatch);
}
.holiday-light-choice:hover,
.holiday-light-choice[aria-pressed="true"] { border-color: var(--hp-accent); background: var(--hp-hover); }

/* ---------- × and the fir that brings the garland back ---------- */
.holiday-dismiss {
  display: grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
  font: 400 19px/1 Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
.holiday-dismiss::before { content: "×"; margin-top: -1px; }
.holiday-launch .holiday-dismiss {
  border: 1px solid #e0ecff8c;
  background: #102951cc;
  color: #fff;
}
.holiday-launch .holiday-dismiss:hover { background: #1a3d70; }
.holiday-launch.is-playing .holiday-dismiss { display: none; }
#top_bg > .holiday-band > .holiday-dismiss {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border: 1px solid #ffffff59;
  background: #16181ab8;
  color: #fff;
}
#top_bg > .holiday-band > .holiday-dismiss:hover { background: #16181a; }
.holiday-dismiss:focus-visible { outline: 2px solid #f2d497; outline-offset: 2px; }
.holiday-band.is-leaving { opacity: 0; transition: opacity .25s ease; }

html.holiday-off { --tkp-holiday-height: 0px; --tkp-holiday-overlap: 0px; }
html.holiday-off .holiday-band { display: none; }
html.holiday-off #top_bg::before { content: none; }

.holiday-restore {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.holiday-restore svg { width: 22px; height: 22px; flex: none; }
/* ТК Промресурс header: the button also carries the site's icon-btn / rd-icon-btn class. */
.holiday-restore--header { padding: 0; }
.holiday-restore--menu {
  width: 100%;
  justify-content: flex-start;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px dashed var(--border-2, var(--rd-border-strong));
  border-radius: 12px;
  background: transparent;
  color: var(--text, var(--rd-text));
  font: 600 15px/1.2 var(--font-sans, system-ui, sans-serif);
  text-align: left;
}
.holiday-restore--menu:hover { background: var(--primary-soft, var(--rd-primary-soft)); }
.holiday-restore--header:focus-visible,
.holiday-restore--menu:focus-visible { outline: 2px solid var(--primary, var(--rd-primary)); outline-offset: 2px; }
/* EGGER-M top bar */
.holiday-restore--topbar {
  min-height: 33px;
  padding: 4px 10px 4px 8px;
  border: 1px dashed #e4cf926e;
  border-radius: 8px;
  background: transparent;
  color: #fff1cc;
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
}
.holiday-restore--topbar svg { width: 20px; height: 20px; }
.holiday-restore--topbar:hover { border-style: solid; background: #294237; }
.holiday-restore--topbar:focus-visible { outline: 2px solid #f2d497; outline-offset: 2px; }

.holiday-pop :focus-visible { outline: 2px solid var(--hp-accent); outline-offset: 2px; }
.holiday-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- ТК Промресурс, тёмная тема: moonlit snow instead of a white strip ---------- */


/* ---------- Phone and tablet ---------- */
@media (max-width: 991px) {
  :root { --tkp-holiday-height: 74px; }
  #top_bg { --ny-rise: 74px; }
  .holiday-band {
    --ny-tile: min(245px, 75vw);
    /* Nine toys always fit the width left beside the music button. */
    --ny-unit: min(.86px, calc((100vw - var(--ny-music-space)) / 390));
  }
  html:not(.holiday-ready) #top_bg::before { background-size: min(245px, 75vw) auto, auto calc(var(--ny-rise) * 1.72), auto; background-position: left -6px, left calc(var(--ny-rise) * -.33), 0 0; }
  .holiday-spruce { top: -6px; clip-path: inset(6px 0 0); }
  /* Sideways strokes belong to the harp; up and down still scroll the page. */
  .holiday-toy { touch-action: pan-y; }
  .holiday-launch.is-playing .holiday-trigger-text { display: none; }
}
@media (max-width: 640px) {
  .tkp-holiday-band { --ny-music-space: 96px; }
  .tkp-holiday-band > .holiday-launch { right: 8px; }
  .tkp-holiday-band .holiday-launch .holiday-trigger { width: 40px; padding: 0; }
  .tkp-holiday-band .holiday-trigger-text { display: none; }
}
@media (max-width: 480px) {
  #user_box_top > .holiday-launch :is(.holiday-trigger, .holiday-stop) { padding-inline: 4px; }
  #user_box_top .holiday-trigger-text,
  .holiday-restore--topbar span { display: none; }
  .holiday-restore--topbar { padding: 4px 6px; }
  /* While a song plays ■ joins the top bar: drop the small login icons so the city stays on one line. */
  .holiday-band + .topbar .topbar__geo { white-space: nowrap; }
  .holiday-band + .topbar #user_box_top:has(.holiday-launch.is-playing) :is(.ico, .sep) { display: none; }
}
/* A 320–374px header has no room for one more button: the fir stays in the menu. */
@media (max-width: 374px) {
  .holiday-restore--header { display: none; }
}
@media (max-width: 360px) {
  .holiday-band + .topbar .topbar__in { gap: 9px; font-size: 12px; }
  .holiday-band + .topbar .topbar__geo { white-space: nowrap; }
  .holiday-band + .topbar #user_box_top { gap: 6px; }
  .holiday-band + .topbar #user_box_top :is(.ico, .sep) { display: none; }
  #user_box_top > .holiday-launch { gap: 3px; }
  #user_box_top > .holiday-launch :is(.holiday-trigger, .holiday-stop) { width: 30px; min-width: 30px; padding: 0; }
}

/* Reduced motion (Yandex Browser on phones often reports it, e.g. in power saving):
   nothing moves, but lights still fade softly and a rung toy brightens. Brightness only. */
@keyframes holiday-glow {
  0%, 100% { opacity: .3; }
  45%, 55% { opacity: 1; }
}
@keyframes holiday-toy-glow {
  0%, 100% { filter: none; }
  30% { filter: brightness(1.25); }
}
@media (prefers-reduced-motion: reduce) {
  .holiday-lights .holiday-light { animation-name: holiday-glow; }
  .holiday-toy.is-ringing img { animation-name: holiday-toy-glow; }
  .holiday-toy.is-dressing img { animation: none; }
  .holiday-eq i { animation: none; }
  .holiday-eq i:nth-child(1) { height: 8px; }
  .holiday-eq i:nth-child(2) { height: 14px; }
  .holiday-eq i:nth-child(3) { height: 10px; }
  .holiday-switch-mark::after, .holiday-band.is-leaving { transition: none; }
}

@media print {
  .holiday-band, .holiday-launch, .holiday-pop { display: none !important; }
}
