/* маскот (перенесён с p-cs.ru) */
.msc { position: fixed; z-index: 28; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; outline: none; }
.msc-media { display: block; width: 100%; height: auto; pointer-events: none; filter: drop-shadow(0 8px 10px rgba(17,24,32,.28)); }
.msc:focus-visible .msc-media { filter: drop-shadow(0 0 0 3px var(--red)); }
.msc-slot { position: absolute; z-index: 3; overflow: hidden; pointer-events: none; }
.msc-slot .msc { position: absolute; left: 0; bottom: 0; pointer-events: auto; transform: translateY(100%); transition: transform .6s cubic-bezier(.3,1.4,.5,1); }
.msc-slot .msc.in { transform: translateY(14%); animation: msc-sniff 1.1s ease-in-out .7s 2; }
.msc-slot .msc.in.msc-hold { animation: none; transform: translateY(8%); }
@keyframes msc-sniff { 0%, 100% { translate: 0 0; rotate: 0deg; } 30% { translate: -3px -4px; rotate: -4deg; } 65% { translate: 3px -2px; rotate: 3deg; } }
.msc-slot.from-left .msc { transform: translateX(-100%); bottom: auto; top: 0; transition: transform .6s cubic-bezier(.3,1.3,.5,1); }
.msc-slot.from-right .msc { transform: translateX(100%); bottom: auto; top: 0; transition: transform .6s cubic-bezier(.3,1.3,.5,1); }
.msc-slot.from-left .msc.in, .msc-slot.from-right .msc.in { transform: translateX(0); animation: msc-sniff 1.1s ease-in-out .7s 2; }
/* выглядывает из-за края: край тела у боковых поз закруглён — задвигаем фигуру на 6% за край, чтобы не было зазора */
.msc-slot.from-left .msc.in { transform: translateX(-6%); }
.msc-slot.from-right .msc.in { transform: translateX(6%); }
.msc-hang { transform: translateY(-105%); transition: transform .7s cubic-bezier(.3,1.4,.5,1); z-index: 44; transform-origin: 50% 0; }
.msc-hang.in { transform: translateY(0); animation: msc-swing 1.8s ease-in-out .7s infinite; }
.msc-hang.msc-hold { animation: none; }
@keyframes msc-swing { 0%, 100% { rotate: -5deg; } 50% { rotate: 5deg; } }
.msc-sit, .msc-stand { opacity: 0; transform: translateY(16px) scale(.9); transition: opacity .35s, transform .45s cubic-bezier(.3,1.5,.5,1); z-index: 4; }
.msc-sit.in, .msc-stand.in { opacity: 1; transform: none; }
.msc-stand.in .msc-media { animation: msc-look 2.2s ease-in-out .5s infinite; transform-origin: 50% 100%; }
.msc-stand.msc-hold .msc-media { animation: none; }
.msc-climb { opacity: 1; }
.msc-climb .msc-media { animation: msc-wobble .32s ease-in-out infinite; transform-origin: 50% 60%; }
.msc-climb.msc-look .msc-media, .msc-climb.msc-hold .msc-media { animation: msc-look 1.4s ease-in-out infinite; }
@keyframes msc-wobble { 0%, 100% { rotate: -2deg; } 50% { rotate: 2deg; } }
@keyframes msc-look { 0%, 100% { rotate: 0deg; } 40% { rotate: -8deg; } 70% { rotate: 5deg; } }
.msc-run.msc-go { animation: msc-bob .16s linear infinite; }
.msc-walk { opacity: 0; z-index: 3; }
.msc-walk.msc-go { animation: msc-bob .24s linear infinite; }
@keyframes msc-bob { 0%, 100% { margin-top: 0; translate: 0 0; } 50% { translate: 0 -3px; } }
.msc-bubble { position: fixed; z-index: 85; background: #fff; color: var(--text); border-radius: 18px; padding: 16px 18px 14px; box-shadow: 0 20px 50px -18px rgba(17,24,32,.55); display: grid; gap: 10px; font-size: 15px; line-height: 1.45; animation: msc-pop .25s ease; }
.msc-bubble.up { transform: translateY(-100%); }
.msc-bubble p { margin: 0; padding-right: 18px; font-weight: 600; }
.msc-bubble .btn { min-height: 44px; font-size: 15px; box-shadow: none; }
.msc-off { border: 0; background: none; color: var(--muted); font-size: 13px; text-decoration: underline; padding: 0; justify-self: start; cursor: pointer; }
.msc-x { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px; }
@keyframes msc-pop { from { opacity: 0; scale: .92; } }
@media (prefers-reduced-motion: reduce) { .msc, .msc-bubble { display: none !important; } }
.msc-slot.msc-dockslot { position: absolute; z-index: 29; }
.msc-bubble .msc-more { display: block; margin-top: .4rem; color: var(--red2, #ff4a4a); font-weight: 700; }
.msc-bubble { background: #1b171b; color: #f3eeec; border: 1px solid rgba(227, 38, 45, .5); box-shadow: 0 20px 50px -18px rgba(0, 0, 0, .8), 0 0 1.4rem rgba(227, 38, 45, .25); }
.msc-bubble p { margin: 0; }
.msc-media { filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .55)); }
/* окно-обрезка режет только ту сторону, из-за которой она выглядывает: при повороте головы волосы и плечи не срезаются */
.msc-slot { overflow: visible; clip-path: inset(-120px -80px 0 -80px); }
.msc-slot.from-left { clip-path: inset(-120px -80px -120px 0); }
.msc-slot.from-right { clip-path: inset(-120px 0 -120px -80px); }

/* Ирина выглядывает сбоку по-своему: глубже за краем, строго качает головой «ай-яй-яй», тяжело вздыхает и оседает, всплывает «Эх…» */
.msc-slot.from-left .msc--irina.in { transform: translateX(3%); transform-origin: 0 100%; animation: irina-tut 2.4s ease-in-out .6s 1 both; }   /* из-за карточки: рука на краю видна целиком */
.msc-slot.from-right .msc--irina.in { transform: translateX(-3%); transform-origin: 100% 100%; animation: irina-tut 2.4s ease-in-out .6s 1 both; }
.msc-slot.msc-edge.from-left .msc--irina.in { transform: translateX(-12%); }   /* из-за края окна — глубже */
.msc-slot.msc-edge.from-right .msc--irina.in { transform: translateX(12%); }
.msc-slot .msc--irina.in.msc-hold { animation: none; }
@keyframes irina-tut {
  0%, 100% { rotate: 0deg; translate: 0 0; scale: 1; }
  8% { rotate: -4deg; } 16% { rotate: 4deg; } 24% { rotate: -3.5deg; } 32% { rotate: 3deg; } 40% { rotate: 0deg; }
  55% { translate: 0 -3px; scale: 1 1.02; }       /* вдох */
  72% { translate: 0 5px; scale: 1 .97; }         /* тяжёлый выдох — оседает */
  86% { translate: 0 1px; scale: 1 1; }
}
.msc-slot .msc--irina.in::after { content: "Эх…"; position: absolute; top: 3%; padding: 3px 9px; border-radius: 10px 10px 10px 2px; background: rgba(227, 38, 45, .95); color: #fff;
  font: 800 13px Manrope, sans-serif; white-space: nowrap; opacity: 0; transform: translateY(6px) scale(.8); animation: irina-eh 2.6s ease 1.9s 1 both; pointer-events: none; }
.msc-slot.from-left .msc--irina.in::after { left: 62%; }
.msc-slot.from-right .msc--irina.in::after { right: 62%; border-radius: 10px 10px 2px 10px; }
@keyframes irina-eh { 0% { opacity: 0; transform: translateY(6px) scale(.8); } 18%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .msc-slot .msc--irina.in, .msc-slot .msc--irina.in::after { animation: none; } }
