/* Новогоднее оформление. Работает, только пока на <html> стоит data-festive (ставит festive.js). */
#festive-snow, #festive-garland, .festive-count { display: none; }

/* ---- Общее для спокойного и праздничного ---- */
/* Снег лежит ПОД интерфейсом (z-index -1): виден на пустом фоне и не мешает читать. */
[data-festive] #festive-snow { display: block; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
[data-festive] #festive-garland {
  display: block; position: fixed; top: 0; left: 0; right: 0; height: 24px; z-index: 40;
  pointer-events: none; background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2260%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M0%203Q15%209%2030%203T60%203%22%20fill%3D%22none%22%20stroke%3D%22%232f5d46%22%20stroke-width%3D%221.6%22%2F%3E%3C%2Fsvg%3E") repeat-x;
}
#festive-garland i { position: absolute; inset: 0; animation: festive-blink 3s ease-in-out infinite; }
#festive-garland i:nth-child(1) { background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22180%22%20height%3D%2224%22%3E%3Cg%20transform%3D%22translate(15%208)%22%3E%3Ccircle%20cy%3D%226%22%20r%3D%227%22%20fill%3D%22%23ff5b5b%22%20opacity%3D%22.25%22%2F%3E%3Crect%20x%3D%22-2%22%20y%3D%22-3%22%20width%3D%224%22%20height%3D%224%22%20fill%3D%22%23556%22%2F%3E%3Cellipse%20cy%3D%225.5%22%20rx%3D%223.4%22%20ry%3D%225%22%20fill%3D%22%23ff5b5b%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(105%208)%22%3E%3Ccircle%20cy%3D%226%22%20r%3D%227%22%20fill%3D%22%234aa8ff%22%20opacity%3D%22.25%22%2F%3E%3Crect%20x%3D%22-2%22%20y%3D%22-3%22%20width%3D%224%22%20height%3D%224%22%20fill%3D%22%23556%22%2F%3E%3Cellipse%20cy%3D%225.5%22%20rx%3D%223.4%22%20ry%3D%225%22%20fill%3D%22%234aa8ff%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") repeat-x; }
#festive-garland i:nth-child(2) { background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22180%22%20height%3D%2224%22%3E%3Cg%20transform%3D%22translate(45%208)%22%3E%3Ccircle%20cy%3D%226%22%20r%3D%227%22%20fill%3D%22%23ffd166%22%20opacity%3D%22.25%22%2F%3E%3Crect%20x%3D%22-2%22%20y%3D%22-3%22%20width%3D%224%22%20height%3D%224%22%20fill%3D%22%23556%22%2F%3E%3Cellipse%20cy%3D%225.5%22%20rx%3D%223.4%22%20ry%3D%225%22%20fill%3D%22%23ffd166%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(135%208)%22%3E%3Ccircle%20cy%3D%226%22%20r%3D%227%22%20fill%3D%22%23ff7ac6%22%20opacity%3D%22.25%22%2F%3E%3Crect%20x%3D%22-2%22%20y%3D%22-3%22%20width%3D%224%22%20height%3D%224%22%20fill%3D%22%23556%22%2F%3E%3Cellipse%20cy%3D%225.5%22%20rx%3D%223.4%22%20ry%3D%225%22%20fill%3D%22%23ff7ac6%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") repeat-x; animation-delay: -1s; }
#festive-garland i:nth-child(3) { background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22180%22%20height%3D%2224%22%3E%3Cg%20transform%3D%22translate(75%208)%22%3E%3Ccircle%20cy%3D%226%22%20r%3D%227%22%20fill%3D%22%234ade80%22%20opacity%3D%22.25%22%2F%3E%3Crect%20x%3D%22-2%22%20y%3D%22-3%22%20width%3D%224%22%20height%3D%224%22%20fill%3D%22%23556%22%2F%3E%3Cellipse%20cy%3D%225.5%22%20rx%3D%223.4%22%20ry%3D%225%22%20fill%3D%22%234ade80%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(165%208)%22%3E%3Ccircle%20cy%3D%226%22%20r%3D%227%22%20fill%3D%22%23ff9f43%22%20opacity%3D%22.25%22%2F%3E%3Crect%20x%3D%22-2%22%20y%3D%22-3%22%20width%3D%224%22%20height%3D%224%22%20fill%3D%22%23556%22%2F%3E%3Cellipse%20cy%3D%225.5%22%20rx%3D%223.4%22%20ry%3D%225%22%20fill%3D%22%23ff9f43%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") repeat-x; animation-delay: -2s; }
@keyframes festive-blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.festive-paused #festive-garland i { animation-play-state: paused; }
body:has(.main.theater) #festive-garland { display: none; }

[data-festive] .logo { position: relative; }
[data-festive] .logo::after {
  content: ''; position: absolute; left: calc(50% - 72px); top: -19px; width: 40px; height: 33px;
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2048%2040%22%3E%3Cpath%20d%3D%22M6%2030C9%2012%2022%202%2036%207c5%202%207%208%208%2015l-6-5c1%205%202%209%202%2013z%22%20fill%3D%22%23d33434%22%2F%3E%3Cpath%20d%3D%22M14%2028c2-9%208-16%2016-18-5%205-8%2011-8%2018z%22%20fill%3D%22%23ee5a52%22%2F%3E%3Crect%20x%3D%222%22%20y%3D%2227%22%20width%3D%2240%22%20height%3D%2210%22%20rx%3D%225%22%20fill%3D%22%23fff%22%2F%3E%3Ccircle%20cx%3D%2243%22%20cy%3D%2223%22%20r%3D%225%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; transform: rotate(-14deg); pointer-events: none;
}
[data-festive] .home-btn::after {
  content: ''; position: absolute; left: -7px; top: -11px; width: 27px; height: 23px;
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2048%2040%22%3E%3Cpath%20d%3D%22M6%2030C9%2012%2022%202%2036%207c5%202%207%208%208%2015l-6-5c1%205%202%209%202%2013z%22%20fill%3D%22%23d33434%22%2F%3E%3Cpath%20d%3D%22M14%2028c2-9%208-16%2016-18-5%205-8%2011-8%2018z%22%20fill%3D%22%23ee5a52%22%2F%3E%3Crect%20x%3D%222%22%20y%3D%2227%22%20width%3D%2240%22%20height%3D%2210%22%20rx%3D%225%22%20fill%3D%22%23fff%22%2F%3E%3Ccircle%20cx%3D%2243%22%20cy%3D%2223%22%20r%3D%225%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; transform: rotate(-16deg); pointer-events: none;
}
/* В рейле сверху освобождаем место под гирлянду */
[data-festive] .space-rail { padding-top: 28px; }

/* ---- Только праздничный ---- */
[data-festive="full"] { --bg: #0e1a2b; --bg2: #15263b; --bg3: #20374f; --muted: #93a5ba; }
[data-festive="full"] body { background: linear-gradient(180deg, #0c1728 0%, #11263a 60%, #12332f 100%); }
[data-festive="full"] .main-header { border-bottom-color: #b8383a; }
[data-festive="full"] .sidebar { border-right: 1px solid #1e4a3c; }
[data-festive="full"] .online-panel { border-left: 1px solid #1e4a3c; }
[data-festive="full"] .auth-box { position: relative; border: 1px solid #2b5a4a; box-shadow: 0 10px 50px rgba(120,180,255,.18); }
[data-festive="full"] .auth-box::before,
[data-festive="full"] .me-bar::before {
  content: ''; position: absolute; left: 4px; right: 4px; top: -5px; height: 14px;
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22120%22%20height%3D%2214%22%3E%3Cpath%20d%3D%22M0%200H120V5C112%205%20112%2011%20103%2011S94%206%2084%206%2076%2013%2066%2013%2056%206%2046%206%2038%2010%2028%2010%2018%205%200%205Z%22%20fill%3D%22%23eef5ff%22%2F%3E%3C%2Fsvg%3E") repeat-x; border-radius: 8px 8px 0 0; pointer-events: none;
}
[data-festive="full"] .me-bar { position: relative; padding-top: 16px; }
[data-festive="full"] .me-bar::before { height: 10px; background-size: 90px 10px; }
[data-festive="full"] .festive-count {
  display: block; text-align: center; font-size: 12px; color: #ffe3a3;
  padding: 7px 8px; margin: 8px 0 4px; border-radius: 8px;
  background: linear-gradient(90deg, #5c1f27, #1d4a3a);
}
[data-festive="full"] .auth-box .festive-count { margin: -8px 0 16px; }

@media (prefers-reduced-motion: reduce) {
  #festive-garland i { animation: none; }
}

/* Кнопка «выключить музыку», пока она играет */
#festive-music-stop {
  position: fixed; right: 16px; bottom: 90px; z-index: 60; padding: 9px 14px; border-radius: 20px; cursor: pointer;
  border: 1px solid #b8383a; background: #15263b; color: #ffe3a3; font-size: 14px;
}
