/* ── Пасхалка «Тополиный пух» ──────────────────────────────────────────
   Полностью отдельный модуль: fluff.js + эти стили + assets/img/ivents/fluff/.
   Слой висит НАД меню (z 60), но ПОД SPA-экранами (z 100).
   Порядок внутри слоя: затемнение (1) < конус всасывания (2) < пушинки (2) < робот (3) < панель (4). */

.fluff-layer{
    position: fixed;
    inset: 0;
    z-index: 60;
    overflow: hidden;
    pointer-events: none;
}

/* Затемнение фона в активном режиме (перекрывает меню → кнопки не нажать,
   и это же поверхность для кликов: клик/тап задаёт точку, к которой едет робот). */
.fluff-dim{
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(0, 0, 0, .52);
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: auto;
    touch-action: none;
}
.fluff-dim.on{ opacity: 1; }

/* Конус всасывания — тонкие изогнутые линии (геометрия/завитки рисуются JS,
   живут и слегка извиваются во времени). Цвет/прозрачность — радиальный градиент
   в самом SVG (плотно у носика, плавно в 0 вдали + мягкий заход у базы). */
.fluff-suck{
    position: absolute;
    left: 0;
    top: 0;
    z-index: 2;
    pointer-events: none;
    will-change: transform;
}
.fluff-suck-svg{
    display: block;
    width: 100%;
    height: 100%;
    transform-origin: 50% 50%;
    overflow: visible;
}
.fluff-suck-lines path{
    fill: none;
    stroke-width: 1.1;            /* тонкие; цвет и прозрачность — через градиент в SVG */
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Контейнер робота: позиция — через left/top, transform свободен для появления/центровки. */
.fluff-robot-wrap{
    position: absolute;
    left: 0;
    top: 0;
    z-index: 3;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    cursor: pointer;
    touch-action: none;
    will-change: transform, left, top;
}
/* Плавное появление: мягкий «выезд» с лёгким overshoot. */
.fluff-robot-wrap.show{ animation: fluffPop .55s cubic-bezier(.34, 1.4, .5, 1) both; }

.fluff-robot{
    display: block;
    width: clamp(84px, 24vw, 150px);
    height: auto;
    transform-origin: 50% 88%;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    filter: drop-shadow(0 7px 11px rgba(0, 0, 0, .28));
}
.fluff-robot-wrap.active .fluff-robot{ transform-origin: 50% 50%; }

.fluff-robot-wrap.idle .fluff-robot{
    animation: fluffIdle 2.4s ease-in-out infinite;
}
@keyframes fluffIdle{
    0%   { transform: scale(0.965) rotate(-4.5deg); }
    50%  { transform: scale(1.055) rotate(4.5deg); }
    100% { transform: scale(0.965) rotate(-4.5deg); }
}
@keyframes fluffPop{
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.45); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Нижняя панель: счётчик пуха + крестик. */
.fluff-bar{
    position: absolute;
    left: 50%;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 14px;
    pointer-events: auto;
}
.fluff-count{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(20, 41, 62, .82);
    color: #fff;
    font-weight: 800;
    font-size: 18px;
    padding: 8px 16px;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
    user-select: none;
}
.fluff-count img{ width: 22px; height: 22px; }
.fluff-exit{
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: rgba(20, 41, 62, .82);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
    -webkit-tap-highlight-color: transparent;
}
.fluff-exit:active{ transform: scale(.93); }

/* Пушинки. */
.fluff-particle{
    position: absolute;
    left: 0;
    top: 0;
    z-index: 2;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}