/* Сезонное оформление: аккуратно, не мешает читать и нажимать. Включается в админке (Оформление → Сезон). */
.season-fx { position: fixed; inset: 0; z-index: 40; pointer-events: none; }

/* ---------- Зима и Новый год: снег ---------- */
.season-snow canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 40; pointer-events: none; }

/* ---------- Новый год: гирлянда под шапкой и шары на карточках ---------- */
.garland { position: fixed; left: 0; right: 0; top: calc(var(--header-h) + var(--announce-h) - 2px); height: 22px; z-index: 49; pointer-events: none; transition: transform .35s var(--ease); }
.garland svg { width: 100%; height: 22px; display: block; }
.garland .wire { fill: none; stroke: rgba(120, 120, 120, .55); stroke-width: 1.2; }
.garland .bulb { animation: twinkle 2.4s infinite ease-in-out; }
.garland .bulb:nth-child(3n) { animation-delay: .8s; }
.garland .bulb:nth-child(3n+1) { animation-delay: 1.6s; }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.header.is-hidden ~ .garland { transform: translateY(calc(-1 * (var(--header-h) + var(--announce-h) + 30px))); }
.season-newyear .grid > .card:nth-child(4n+2)::before,
.season-newyear .rail > .card:nth-child(3n+1)::before {
  content: ""; position: absolute; z-index: 3; top: -1px; left: 28%; width: 22px; height: 40px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 40'%3E%3Cpath d='M11 0v16' stroke='%23b8b8b8' stroke-width='1'/%3E%3Crect x='8' y='15' width='6' height='4' rx='1' fill='%23c9a227'/%3E%3Ccircle cx='11' cy='28' r='10' fill='%23d23929'/%3E%3Cpath d='M5 25q6 -4 12 0' stroke='%23fff' stroke-opacity='.5' stroke-width='1.5' fill='none'/%3E%3Ccircle cx='7.5' cy='24.5' r='2' fill='%23fff' fill-opacity='.5'/%3E%3C/svg%3E") no-repeat center/contain;
  transform-origin: 50% 0; animation: sway 4s infinite ease-in-out;
}
.season-newyear .grid > .card:nth-child(8n+6)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 40'%3E%3Cpath d='M11 0v16' stroke='%23b8b8b8' stroke-width='1'/%3E%3Crect x='8' y='15' width='6' height='4' rx='1' fill='%23c9a227'/%3E%3Ccircle cx='11' cy='28' r='10' fill='%23c9a227'/%3E%3Ccircle cx='7.5' cy='24.5' r='2' fill='%23fff' fill-opacity='.5'/%3E%3C/svg%3E"); left: 62%; animation-delay: 1s; }
@keyframes sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }

/* ---------- Хэллоуин: паучок на паутинке и тыквы ---------- */
.spider { position: fixed; right: clamp(16px, 6vw, 90px); top: 0; z-index: 48; width: 30px; pointer-events: auto; cursor: pointer; animation: spider-drop 1.6s var(--ease) both, spider-bob 5s 1.6s infinite ease-in-out; transform-origin: 50% 0; }
.spider::before { content: ""; position: absolute; left: 50%; bottom: 100%; width: 1px; height: var(--thread, 140px); background: rgba(160, 160, 160, .55); }
.spider svg { width: 30px; height: 30px; display: block; }
.spider.is-up { animation: spider-up .8s var(--ease) forwards; }
@keyframes spider-drop { from { transform: translateY(-60px); } to { transform: translateY(var(--drop, 150px)); } }
@keyframes spider-bob { 0%, 100% { transform: translateY(var(--drop, 150px)); } 50% { transform: translateY(calc(var(--drop, 150px) + 14px)); } }
@keyframes spider-up { to { transform: translateY(-80px); } }
.season-halloween .grid > .card:nth-child(5n+3) .card-media::after,
.season-halloween .rail > .card:nth-child(4n+2) .card-media::after {
  content: ""; position: absolute; z-index: 2; right: 10px; bottom: 8px; width: 34px; height: 30px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 30'%3E%3Cpath d='M17 6q1-5 4-6' stroke='%23476b2a' stroke-width='2.5' fill='none' stroke-linecap='round'/%3E%3Cellipse cx='10' cy='18' rx='8' ry='10' fill='%23e8742a'/%3E%3Cellipse cx='24' cy='18' rx='8' ry='10' fill='%23e8742a'/%3E%3Cellipse cx='17' cy='18' rx='8' ry='11' fill='%23f28a35'/%3E%3Cpath d='M12 15l2.5 3h-5zM22 15l2.5 3h-5z' fill='%232b1a0c'/%3E%3Cpath d='M11 22q6 4 12 0l-2 1.5-2-1-2 1-2-1-2 1z' fill='%232b1a0c'/%3E%3C/svg%3E") no-repeat center/contain;
}
.season-halloween .hero { background: radial-gradient(40% 50% at 82% 40%, rgba(232, 116, 42, .14), transparent 70%), radial-gradient(55% 60% at 78% 45%, var(--hero-a), transparent 70%), linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 60%, var(--bg) 100%); }

/* ---------- Весна: открытие мотосезона ---------- */
.checker { position: fixed; left: 0; right: 0; top: calc(var(--header-h) + var(--announce-h)); height: 6px; z-index: 49; pointer-events: none; opacity: .8;
  background: repeating-conic-gradient(var(--text) 0 25%, transparent 0 50%) 0 0 / 12px 12px; mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent); transition: transform .35s var(--ease); }
.header.is-hidden ~ .checker { transform: translateY(-200px); }

@media (prefers-reduced-motion: reduce) {
  .spider, .garland .bulb, .season-newyear .card::before { animation: none !important; }
  .spider { transform: translateY(var(--drop, 150px)); }
}
@media print { .season-fx, .garland, .spider, .checker { display: none !important; } }
