/* Новогодняя тема DKR — «Морозная полночь».
   Тёмный Pro остаётся основой; сверху — снег, гирлянда и тёплые огни в фоне.
   Включается скриптом newyear.js (html.ny). Всё с pointer-events:none и не мешает интерфейсу. */

html.ny {
    --ny-red: #ff5a5f;
    --ny-gold: #ffc857;
    --ny-ice: #9fd8ff;
    --ny-pine: #46d39a;
}

/* Фоновое свечение: лёд слева-сверху, тёплый красный справа-снизу, хвоя в центре */
html.ny .dkr-aurora-bg__blob--1 {
    background: radial-gradient(circle, rgba(159, 216, 255, 0.22) 0%, transparent 68%);
}
html.ny .dkr-aurora-bg__blob--2 {
    background: radial-gradient(circle, rgba(229, 72, 77, 0.24) 0%, rgba(255, 200, 87, 0.06) 45%, transparent 70%);
}
html.ny .dkr-aurora-bg__blob--3 {
    background: radial-gradient(circle, rgba(70, 211, 154, 0.14) 0%, transparent 70%);
}

/* Летающие «звёзды»-точки старого фона заменены снежинками */
html.ny .dkr-aurora-stars { display: none; }

/* Снег */
.ny-snow {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

/* Гирлянда */
.ny-garland {
    position: fixed;
    top: env(safe-area-inset-top, 0px);
    left: 0;
    right: 0;
    height: 24px;
    z-index: 900;
    pointer-events: none;
    overflow: hidden;
}
.ny-garland svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ny-garland path {
    fill: none;
    stroke: rgba(176, 190, 208, 0.42);
    stroke-width: 1.2;
    stroke-linecap: round;
}
.ny-bulb {
    position: absolute;
    width: 6px;
    height: 9px;
    margin-left: -3px;
    border-radius: 50% 50% 50% 50% / 38% 38% 62% 62%;
    background: var(--c);
    box-shadow: 0 0 9px 1px var(--c), 0 0 2px 0 rgba(255, 255, 255, 0.55) inset;
    animation: nyTwinkle 2.6s ease-in-out infinite alternate;
    animation-delay: var(--d, 0s);
}
.ny-bulb::before {
    content: "";
    position: absolute;
    left: 1px;
    top: -3px;
    width: 4px;
    height: 3px;
    border-radius: 1px 1px 0 0;
    background: rgba(120, 134, 152, 0.9);
}
@keyframes nyTwinkle {
    0%   { opacity: 0.45; }
    100% { opacity: 1; }
}

/* Лёгкий иней на плитках главного меню и карточках: тонкий светлый кант сверху */
html.ny .container.card,
html.ny .card {
    border-top-color: rgba(159, 216, 255, 0.28);
}

/* Снежная шапка: сугроб с лепкой сверху и сосульками снизу.
   --out: лежит на краю (плитка не обрезает); --in: «глазурь» внутри плитки, углы режет её скругление. */
.ny-cap {
    position: absolute !important;   /* у плиток кабинета есть правило «всё внутри relative» — перебиваем */
    top: -7px;
    left: 8px;
    right: 8px;
    height: 24px;
    z-index: 3 !important;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -2 240 32' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffffff'/%3E%3Cstop offset='.5' stop-color='%23e6f2fe'/%3E%3Cstop offset='1' stop-color='%23b2d1f1'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23g)' stroke='%239cc1e6' stroke-opacity='.6' stroke-width='.6' d='M0 11 Q6 5 16 8 Q26 1 40 6 Q54 -1 70 5 Q86 0 102 5 Q118 -1 134 5 Q150 0 166 5 Q182 -1 198 5 Q214 1 226 6 Q236 8 240 9 Q234 15 226 11 Q218 6 210 12 Q205 17 200 13 Q198 14 197 25 Q196.5 27.5 195.5 25 Q194 14 190 12 Q182 6 172 13 Q164 19 156 12 Q148 6 140 13 Q134 18 128 14 Q124 15 123 22 Q122.5 24 121.5 22 Q120 15 116 12 Q108 7 100 13 Q92 19 84 12 Q76 5 66 12 Q60 17 54 13 Q50 14 49 27 Q48 30 47 27 Q46 14 42 12 Q34 6 26 13 Q18 19 10 12 Q5 9 0 11 Z'/%3E%3C/svg%3E") no-repeat center top / 100% 100%;
    filter: drop-shadow(0 2px 2px rgba(2, 8, 20, 0.5)) drop-shadow(0 0 6px rgba(159, 216, 255, 0.22));
}
.ny-cap.ny-cap--in {
    top: 0;
    left: 0;
    right: 0;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -2 240 32' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffffff'/%3E%3Cstop offset='.5' stop-color='%23e6f2fe'/%3E%3Cstop offset='1' stop-color='%23b2d1f1'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23g)' stroke='%239cc1e6' stroke-opacity='.6' stroke-width='.6' d='M0 0 H240 V9 Q234 15 226 11 Q218 6 210 12 Q205 17 200 13 Q198 14 197 25 Q196.5 27.5 195.5 25 Q194 14 190 12 Q182 6 172 13 Q164 19 156 12 Q148 6 140 13 Q134 18 128 14 Q124 15 123 22 Q122.5 24 121.5 22 Q120 15 116 12 Q108 7 100 13 Q92 19 84 12 Q76 5 66 12 Q60 17 54 13 Q50 14 49 27 Q48 30 47 27 Q46 14 42 12 Q34 6 26 13 Q18 19 10 12 Q5 9 0 11 Z'/%3E%3C/svg%3E");
    filter: drop-shadow(0 2px 2px rgba(2, 8, 20, 0.45));
}
.ny-cap--sm { top: -5px; left: 10px; right: 10px; height: 16px; }
.ny-cap.ny-cap--sm.ny-cap--in { top: 0; left: 0; right: 0; height: 11px; }

@media (max-width: 600px) {
    .ny-cap { left: 6px; right: 6px; top: -5px; height: 16px; }
    .ny-cap.ny-cap--in { top: 0; left: 0; right: 0; height: 13px; }
    .ny-cap--sm { height: 14px; top: -4px; }
    .ny-cap.ny-cap--sm.ny-cap--in { top: 0; height: 9px; }
    .ny-garland { height: 16px; }
    .ny-bulb { width: 5px; height: 7px; margin-left: -2.5px; box-shadow: 0 0 6px 1px var(--c); }
    .ny-bulb::before { left: 0.5px; width: 4px; height: 2px; top: -2px; }
}
@media (prefers-reduced-motion: reduce) {
    .ny-bulb { animation: none; opacity: 0.9; }
}
@media print {
    .ny-snow, .ny-garland { display: none !important; }
}
