/* Маскот кабинета (mascot.js): сидит в углу, играет и хулиганит, по клику — справка. Цвета — токены панели, тёмная тема работает сама. */
.masc { position: fixed; right: 14px; bottom: 8px; z-index: 55; --masc-h: 118px; font-family: var(--font); }
.masc[hidden], .masc-pop[hidden], .masc-badge[hidden] { display: none; }
.masc-btn {
  position: relative; display: block; width: calc(var(--masc-h) * var(--masc-r, 0.9625)); height: var(--masc-h);
  margin: 0; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: width .3s var(--ease), height .3s var(--ease), transform .25s var(--ease);
}
.masc-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 18px; }
.masc-hop, .masc-perk, .masc-body { position: absolute; inset: 0; transform-origin: 50% 100%; }
.masc-perk { transition: transform .25s var(--ease); }
.masc-btn:hover .masc-perk, .masc.is-open .masc-perk { transform: translateY(-3px) scale(1.04); }
.masc-body img {
  display: block; width: 100%; height: 100%; user-select: none; -webkit-user-select: none; -webkit-user-drag: none;
  filter: drop-shadow(0 6px 7px rgb(52 40 24 / 0.2));
}
/* 3D-ролик поверх картинки: кадр больше Аки, чтобы крылья и прыжки не обрезались */
.masc-body { transition: opacity .2s; }
.masc-clip { position: absolute; max-width: none; aspect-ratio: 1; opacity: 0; pointer-events: none; transition: opacity .2s; }
.masc.is-clip .masc-clip { opacity: 1; }
.masc.is-clip .masc-body { opacity: 0; }
/* на время ролика Аки подрастает от угла — предметы в лапах видно */
.masc.is-clip .masc-perk { transform: scale(1.3); transform-origin: 70% 100%; }
@media (max-width: 699px) { .masc.is-clip .masc-perk { transform: scale(1.5); } }
/* веки: закрываются при моргании, во сне — наполовину */
.masc-lid {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: linear-gradient(var(--lid-a, #eedcc9), var(--lid-b, #e2cbb4) 85%); box-shadow: inset 0 -2px 0 var(--lid-line, #4d3127);
  transform: scaleY(0); transform-origin: 50% 0; transition: transform 70ms ease-in;
}
.masc.blink .masc-lid { transform: scaleY(1); }
.masc.is-sleep .masc-lid { transform: scaleY(0.66); transition-duration: .8s; }

.masc-badge {
  position: absolute; top: 2%; right: 4%; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; pointer-events: none;
  background: var(--accent); color: var(--on-accent); font: 700 12px/20px var(--font); text-align: center; box-shadow: 0 0 0 2px var(--bg);
  transition: opacity .2s;
}
/* пока Аки прячется или кувыркается, значок не висит в воздухе */
.masc.a-peek .masc-badge, .masc.a-flip .masc-badge, .masc.a-fly .masc-badge { opacity: 0; }
.masc-ball {
  position: absolute; left: 30%; bottom: 2%; width: 17%; aspect-ratio: 1; border-radius: 50%; opacity: 0; pointer-events: none;
  background: radial-gradient(circle at 35% 30%, #e0947c, #a4513f 55%, #6e2c22); box-shadow: 0 3px 4px rgb(52 40 24 / 0.25);
}
/* мяч в шалостях и в игре — по маскоту: снежок у снеговика, яблоко у ёжика */
.masc[data-ball=snow] .masc-ball, .mg[data-ball=snow] .mg-ball {
  background: radial-gradient(circle at 35% 30%, #fff, #eef3f8 55%, #c9d6e3); box-shadow: 0 3px 5px rgb(40 60 90 / 0.25);
}
.masc[data-ball=apple] .masc-ball, .mg[data-ball=apple] .mg-ball {
  background: radial-gradient(circle at 35% 30%, #f6b26b, #d9482f 50%, #8e2a1c); box-shadow: inset 0 3px 0 -1px #6b8f2a, 0 3px 5px rgb(52 40 24 / 0.25);
}
.masc-fx { position: absolute; left: 58%; top: 6%; font: 700 15px/1 var(--font); font-style: normal; color: var(--muted); opacity: 0; pointer-events: none; }
.masc-note { left: 14%; top: 12%; color: var(--accent); font-size: 18px; }

/* спрятан: выглядывает из-под края */
.masc.is-tucked { --masc-h: 70px; right: 10px; bottom: -26px; }
.masc.is-tucked .masc-btn:hover { transform: translateY(-14px); }

@media (prefers-reduced-motion: no-preference) {
  .masc-body { animation: masc-breathe 4.2s ease-in-out infinite; }
  .masc.is-sleep .masc-body { animation-duration: 6.5s; }
  .masc.is-sleep .masc-z { animation: masc-z 3.2s ease-in infinite; }
  .masc.is-sleep .masc-z + .masc-z { animation-delay: 1.6s; font-size: 12px; }
  .masc.a-hop .masc-hop { animation: masc-hop .7s var(--ease); }
  .masc.a-wake .masc-hop { animation: masc-wake .8s var(--ease); }
  .masc.a-look .masc-hop { animation: masc-look 1.8s var(--ease); }
  .masc.a-shake .masc-hop { animation: masc-shake .9s ease-in-out; }
  .masc.a-fly .masc-hop { animation: masc-fly 1.9s var(--ease); }
  .masc.a-spin .masc-hop { animation: masc-spin 1.5s ease-in-out; }
  .masc.a-peek .masc-hop { animation: masc-peek 3.2s var(--ease); }
  .masc.a-flip .masc-hop { animation: masc-flip 1.3s var(--ease); transform-origin: 50% 55%; }
  .masc.a-ball .masc-hop { animation: masc-chase 3.8s var(--ease); }
  .masc.a-ball .masc-ball { animation: masc-ball 3.8s var(--ease); }
  .masc.a-kick .masc-hop { animation: masc-kick 5.2s var(--ease); }
  .masc.a-kick .masc-ball { animation: masc-kick-ball 5.2s linear; }
  .masc.a-kick .masc-note { animation: masc-note 2.4s 1.2s ease-out; }
  .masc.a-dance .masc-hop { animation: masc-dance 1.6s ease-in-out; }
  .masc.a-dance .masc-note { animation: masc-note 1.6s ease-out; }
  .masc.a-sneeze .masc-hop { animation: masc-sneeze 1.1s var(--ease); }
  .masc.a-sneak .masc-hop { animation: masc-sneak 3s ease-in-out; }
  .masc.a-stretch .masc-hop { animation: masc-stretch 1.6s var(--ease); }
  .masc.a-think .masc-hop { animation: masc-think 2.2s var(--ease); }
  .masc-pop { animation: masc-pop-in .22s var(--ease); }
}
@keyframes masc-breathe { 0%, 100% { transform: none; } 50% { transform: scale(1.01, 1.025); } }
@keyframes masc-hop { 0%, 100% { transform: none; } 18% { transform: scale(1.06, .92); } 45% { transform: translateY(-16px) scale(.97, 1.04); } 75% { transform: scale(1.05, .94); } }
@keyframes masc-wake { 0% { transform: scale(1, .92); } 35% { transform: translateY(-12px) scale(.97, 1.06); } 60% { transform: rotate(-4deg); } 80% { transform: rotate(3deg); } 100% { transform: none; } }
/* оглянулся назад и вернулся */
@keyframes masc-look { 0%, 100% { transform: none; } 15% { transform: translateY(-4px); } 25%, 70% { transform: scaleX(-1); } 80% { transform: scaleX(-1) translateY(-4px); } 90% { transform: none; } }
/* отряхивается */
@keyframes masc-shake { 0%, 100% { transform: none; } 15% { transform: rotate(-5deg); } 30% { transform: rotate(5deg); } 45% { transform: rotate(-4deg); } 60% { transform: rotate(4deg); } 75% { transform: rotate(-2deg); } }
/* READY TO FLY: подпрыгнул, повисел, плюхнулся */
@keyframes masc-fly { 0%, 100% { transform: none; } 12% { transform: scale(1.08, .9); } 35% { transform: translateY(-46px) scale(.96, 1.05); } 45% { transform: translateY(-40px) rotate(-3deg); } 55% { transform: translateY(-46px) rotate(3deg); } 65% { transform: translateY(-40px); } 85% { transform: scale(1.1, .88); } }
/* ловит свой хвост */
@keyframes masc-spin { 0%, 100% { transform: none; } 12% { transform: scaleX(-1) translateY(-6px); } 25% { transform: none; } 37% { transform: scaleX(-1) translateY(-6px); } 50% { transform: none; } 62% { transform: scaleX(-1) translateY(-6px); } 75% { transform: none; } 88% { transform: rotate(-5deg); } }
/* спрятался за край и выглянул */
@keyframes masc-peek { 0%, 100% { transform: none; } 15% { transform: scale(1.05, .92); } 30%, 55% { transform: translateY(105%); } 65% { transform: translateY(55%); } 72% { transform: translateY(55%) rotate(-6deg); } 80% { transform: translateY(55%) rotate(5deg); } 90% { transform: translateY(-10px); } }
/* сальто */
@keyframes masc-flip { 0% { transform: none; } 15% { transform: scale(1.06, .9); } 35% { transform: translateY(-50px) rotate(-120deg); } 55% { transform: translateY(-50px) rotate(-260deg); } 75% { transform: rotate(-360deg) scale(1.08, .9); } 100% { transform: rotate(-360deg); } }
/* мяч выкатился из-под лап и вернулся; Аки тянется за ним */
@keyframes masc-ball {
  0% { opacity: 0; transform: translateX(10px) scale(.6); } 8% { opacity: 1; transform: none; }
  25% { transform: translate(-40px, -16px) rotate(-200deg); } 38% { transform: translate(-72px, 0) rotate(-360deg); }
  44% { transform: translate(-80px, -6px) rotate(-400deg); } 52% { transform: translate(-84px, 0) rotate(-420deg); }
  70% { transform: translate(-40px, -22px) rotate(-200deg); } 86% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateX(6px) scale(.7); }
}
@keyframes masc-chase { 0%, 8%, 100% { transform: none; } 30% { transform: translateX(-10px) rotate(-6deg); } 48% { transform: translate(-22px, -12px) scale(.98, 1.03); } 56% { transform: translateX(-22px) scale(1.04, .95); } 72% { transform: translateX(-12px) rotate(-3deg); } 86% { transform: translateY(-10px); } }
/* пнул мяч за экран, отвернулся и насвистывает, будто ни при чём; мяч прикатился обратно */
@keyframes masc-kick { 0%, 22%, 70%, 100% { transform: none; } 8% { transform: rotate(4deg) translateX(4px); } 14% { transform: rotate(-6deg) translateX(-8px); } 30%, 62% { transform: scaleX(-1) rotate(-3deg); } 88% { transform: translateY(-10px); } }
@keyframes masc-kick-ball {
  0% { opacity: 0; transform: translateX(8px); } 6%, 14% { opacity: 1; transform: none; }
  30% { opacity: 1; transform: translate(-260px, -150px) rotate(-720deg); } 31%, 70% { opacity: 0; transform: translate(-260px, -150px); }
  71% { opacity: 1; transform: translateX(-160px); } 86% { opacity: 1; transform: rotate(560deg); } 95% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; }
}
/* пританцовывает */
@keyframes masc-dance { 0%, 100% { transform: none; } 12% { transform: translateY(-8px) rotate(-6deg); } 25% { transform: none; } 37% { transform: translateY(-8px) rotate(6deg); } 50% { transform: none; } 62% { transform: translateY(-10px) scaleX(-1) rotate(-6deg); } 75% { transform: scaleX(-1); } 87% { transform: translateY(-6px) rotate(4deg); } }
/* набрал воздуха — и чихнул */
@keyframes masc-sneeze { 0%, 100% { transform: none; } 30% { transform: translateY(-2px) rotate(4deg) scale(1.04); } 45% { transform: translateY(-3px) rotate(7deg) scale(1.06); } 55% { transform: translateX(-6px) rotate(-8deg) scale(.94, 1.02); } 70% { transform: rotate(-3deg); } }
/* крадётся влево на цыпочках, оглядывается и возвращается */
@keyframes masc-sneak { 0%, 100% { transform: none; } 10% { transform: translate(-8px, -3px); } 20% { transform: translateX(-16px); } 30% { transform: translate(-26px, -3px); } 40% { transform: translateX(-36px); } 50%, 60% { transform: translateX(-36px) scaleX(-1); } 80% { transform: translate(-14px, -3px) scaleX(-1); } 92% { transform: scaleX(-1); } }
/* потягивается */
@keyframes masc-stretch { 0%, 100% { transform: none; } 30% { transform: scale(.96, 1.12); } 55% { transform: scale(1.08, .9); } 75% { transform: scale(1, 1.03); } }
/* задумался: голову набок */
@keyframes masc-think { 0%, 100% { transform: none; } 20%, 80% { transform: translateY(-2px) rotate(-8deg); } 50% { transform: translateY(-2px) rotate(-10deg); } }
@keyframes masc-note { 0% { opacity: 0; transform: none; } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(-10px, -28px) rotate(-12deg); } }
@keyframes masc-z { 0% { opacity: 0; transform: none; } 20% { opacity: .9; } 100% { opacity: 0; transform: translate(16px, -30px); } }
@keyframes masc-pop-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* пузырь */
.masc-pop {
  position: absolute; right: 2px; bottom: calc(var(--masc-h) + 14px); width: min(380px, calc(100vw - 28px)); max-height: min(72vh, 600px);
  display: flex; flex-direction: column; transform-origin: 90% 100%;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  font-size: 14px; line-height: 1.45;
}
.masc-pop::after {
  content: ''; position: absolute; right: 46px; bottom: -7px; width: 12px; height: 12px; transform: rotate(45deg);
  background: var(--surface); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.masc-head, .masc-tabs, .masc-foot { flex: none; }
.masc-head { display: flex; align-items: center; gap: 10px; padding: 12px 10px 8px 14px; }
.masc-face { position: relative; flex: none; width: 42px; height: 42px; border-radius: 50%; overflow: hidden; background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--border); }
.masc-face img { position: absolute; width: var(--face-w, 280%); max-width: none; left: var(--face-x, -78%); top: var(--face-y, -50%); }
.masc-who { flex: 1; min-width: 0; }
.masc-who h2 { margin: 0; font: 700 15px/1.2 var(--font-display); }
.masc-who p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.masc-x { flex: none; align-self: flex-start; width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.masc-x:hover { background: var(--hover); color: var(--text); }
.masc-tabs { display: flex; gap: 2px; padding: 0 10px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.masc-tabs [role=tab] {
  flex: none; margin-bottom: -1px; padding: 8px 10px; border: 0; border-bottom: 2px solid transparent; background: none;
  color: var(--muted); font: 600 13px/1.2 var(--font); cursor: pointer;
}
.masc-tabs [role=tab][aria-selected=true] { color: var(--accent); border-bottom-color: var(--accent); }
.masc-tabs [role=tab]:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 6px; }
.masc-n { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 11px; line-height: 18px; text-align: center; }
.masc-panel { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 14px 4px; }
.masc-panel:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.masc-panel p { margin: 0 0 10px; }
.masc-h { margin: 14px 0 6px; color: var(--muted); font: 700 12px/1.3 var(--font); text-transform: uppercase; letter-spacing: .04em; }
.masc-h:first-child { margin-top: 0; }
.masc-list { margin: 0 0 10px; padding-left: 18px; }
.masc-list li { margin: 4px 0; }
.masc-words { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.masc-words details { padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-xs); }
.masc-words summary { font-weight: 600; cursor: pointer; }
.masc-words details p { margin: 6px 0 2px; color: var(--muted); }
.masc-dl { margin: 0 0 6px; }
.masc-dl dt { margin-top: 6px; font-weight: 600; }
.masc-dl dd { margin: 1px 0 0; color: var(--muted); }
.masc-say { padding: 8px 10px; border-radius: var(--radius-sm); background: var(--accent-soft); }
.masc-todo { margin: 0 0 10px; padding: 0; list-style: none; }
.masc-todo li { margin: 4px 0; }
.masc-todo a { display: block; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); text-decoration: none; }
.masc-todo a:hover { background: var(--hover); border-color: var(--accent-line); }
.masc-ex { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.masc-ex .chip { text-align: left; }
.masc-actions { margin: 6px 0 10px; }
.masc-muted { color: var(--muted); font-size: 13px; }
.masc-link { padding: 0; border: 0; background: none; color: var(--accent); font: 600 13px/1.3 var(--font); cursor: pointer; }
.masc-link:hover { text-decoration: underline; }
.masc-foot { display: flex; justify-content: space-between; gap: 10px; padding: 8px 14px 12px; border-top: 1px solid var(--border); }

/* вкладка «Игра» */
.masc-games { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.masc-game {
  display: block; width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.masc-game:hover:not(:disabled) { background: var(--hover); border-color: var(--accent-line); }
.masc-game:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.masc-game:disabled { opacity: .55; cursor: not-allowed; }
.masc-game b { display: block; color: var(--accent); }
.masc-game span { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }

/* сам зовёт поиграть после долгой работы */
.masc-offer {
  position: absolute; right: 2px; bottom: calc(var(--masc-h) + 14px); width: min(300px, calc(100vw - 28px)); padding: 12px 14px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  font-size: 14px; line-height: 1.45;
}
.masc-offer[hidden] { display: none; }
.masc-offer::after {
  content: ''; position: absolute; right: 46px; bottom: -7px; width: 12px; height: 12px; transform: rotate(45deg);
  background: var(--surface); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.masc-offer p { margin: 0 0 10px; }
.masc-offer div { display: flex; align-items: center; gap: 14px; }
/* «Что это за цифра?»: кнопка в пузыре, подсказка «покажите на цифру», подсветка и объяснение */
.masc-pickbar { flex: none; display: flex; align-items: center; gap: 10px; padding: 0 14px 10px; }
.masc-pick p { margin: 0 0 10px; }
html.masc-picking main, html.masc-picking main * { cursor: help !important; }
html.masc-picking main .masc-pick-hover { outline: 2px dashed var(--accent) !important; outline-offset: -2px; }
html.masc-picking main .masc-pick-on { outline: 2px solid var(--accent) !important; outline-offset: -2px; box-shadow: inset 0 0 0 999px var(--accent-soft); }
.masc-fig-where { margin: 0 0 2px !important; color: var(--muted); font: 700 12px/1.3 var(--font); text-transform: uppercase; letter-spacing: .04em; }
.masc-fig-title { margin: 0 0 4px; font: 700 17px/1.25 var(--font-display); }
.masc-fig-val { margin: 0 0 6px !important; color: var(--accent); font: 700 20px/1.25 var(--font-display); overflow-wrap: anywhere; }
.masc-fig-row { color: var(--muted); }
.masc-fig-row b { color: var(--text); font-weight: 600; }
.masc-fig-more dt { color: var(--muted); font-weight: 500; }
.masc-fig-more dd { margin: 0 0 4px; color: var(--text); font-weight: 600; }
/* ушёл на игровое поле */
.masc.is-away { visibility: hidden; }

/* игры (mascot-game.js): поле на весь экран поверх панели */
.mg {
  --mg-h: clamp(92px, 17vh, 150px); position: fixed; inset: 0; z-index: 95; display: flex; flex-direction: column;
  background: rgb(246 243 238 / 0.8); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(3px);
  color: var(--text); font-family: var(--font); touch-action: none; user-select: none; -webkit-user-select: none;
}
.mg-bar {
  flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 16px;
  background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.mg-title { font: 700 17px/1.2 var(--font-display); }
.mg-score { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.mg-time { margin-left: auto; font: 700 17px/1 var(--font); font-variant-numeric: tabular-nums; }
.mg-time.is-low { color: var(--accent); }
.mg-field { position: relative; flex: 1; min-height: 0; overflow: hidden; cursor: crosshair; }
.mg.is-catch .mg-field { cursor: default; }
.mg-aki {
  position: absolute; left: 0; top: 0; width: calc(var(--mg-h) * var(--mg-r, 1)); height: var(--mg-h); margin: 0; padding: 0;
  border: 0; background: none; cursor: pointer; will-change: transform; -webkit-tap-highlight-color: transparent;
}
.mg-tilt, .mg-act { position: absolute; inset: 0; transform-origin: 50% 100%; }
.mg-tilt { transition: transform .15s; }
.mg-act { transition: transform .12s; }
.mg-act img {
  display: block; width: 100%; height: 100%; pointer-events: none; transition: opacity .2s;
  filter: drop-shadow(0 8px 8px rgb(52 40 24 / 0.22));
}
.mg-clip { position: absolute; max-width: none; aspect-ratio: 1; opacity: 0; pointer-events: none; transition: opacity .2s; }
.mg-aki.is-clip .mg-clip { opacity: 1; }
.mg-aki.is-clip img { opacity: 0; }
.mg-aki.is-jump .mg-act { transform: scale(.93, 1.07); }
.mg-ball {
  position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; pointer-events: none;
  /* как мяч в ролике «поймал» */
  background: radial-gradient(circle at 35% 30%, #f29a92, #d2484a 55%, #8f2629); box-shadow: 0 4px 6px rgb(52 40 24 / 0.25);
}
.mg-ball[hidden], .mg-hint[hidden] { display: none; }
.mg-say {
  position: absolute; left: 0; top: 0; max-width: min(260px, 70vw); margin: 0; padding: 8px 12px; pointer-events: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
  font-size: 14px; line-height: 1.35; opacity: 0; transition: opacity .15s;
}
.mg-say.is-on { opacity: 1; }
.mg-hint { position: absolute; left: 50%; bottom: 72px; margin: 0; transform: translateX(-50%); color: var(--muted); font-size: 13px; white-space: nowrap; pointer-events: none; }
.mg-tap { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border: 2px solid var(--accent); border-radius: 50%; pointer-events: none; opacity: 0; }
/* снежок разлетелся при попадании */
.mg-splat {
  position: absolute; width: 70px; height: 70px; margin: -35px 0 0 -35px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, #fff 30%, rgb(255 255 255 / 0.85) 45%, rgb(255 255 255 / 0) 70%); opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .mg-tap { animation: mg-tap .45s ease-out; }
  .mg-act.g-sulk { animation: mg-sulk 1.8s var(--ease); }
  .mg-act.g-tease { animation: mg-tease 1.6s ease-in-out; }
  .mg-act.g-got { animation: mg-got 1.3s var(--ease); }
  .mg-act.g-missed { animation: mg-missed 1.7s var(--ease); }
  .mg-act.g-far { animation: mg-far 1.5s ease-in-out; }
  .mg-act.g-hit { animation: mg-hit 1.5s var(--ease); }
  .mg-act.g-dodge { animation: mg-tease 1.6s ease-in-out; }
  .mg-splat { animation: mg-splat .7s ease-out; }
}
@keyframes mg-splat { 0% { opacity: 1; transform: scale(.3); } 60% { opacity: .9; transform: scale(1.1); } 100% { opacity: 0; transform: scale(1.4); } }
/* попали снежком: отшатнулся и отряхивается */
@keyframes mg-hit { 0%, 100% { transform: none; } 12% { transform: translateX(-8px) rotate(-10deg) scale(1.04, .94); } 35% { transform: rotate(6deg); } 50% { transform: rotate(-5deg); } 65% { transform: rotate(4deg); } 80% { transform: rotate(-2deg); } }
@keyframes mg-tap { from { opacity: .8; transform: scale(.4); } to { opacity: 0; transform: scale(1.6); } }
/* обиделся: сник и отвернулся */
@keyframes mg-sulk { 0%, 100% { transform: none; } 15% { transform: translateY(6px) scale(1.04, .9); } 30%, 80% { transform: translateY(5px) rotate(-7deg) scale(1, .93); filter: saturate(.6); } }
/* дразнится: прыгает и вертится */
@keyframes mg-tease { 0%, 100% { transform: none; } 12% { transform: translateY(-12px) rotate(-9deg); } 25% { transform: rotate(9deg); } 37% { transform: translateY(-12px) rotate(-9deg); } 50% { transform: rotate(9deg); } 62% { transform: translateY(-8px) rotate(-6deg); } 75% { transform: rotate(5deg); } }
/* поймал: подскочил от радости */
@keyframes mg-got { 0%, 100% { transform: none; } 25% { transform: translateY(-26px) scale(.95, 1.06); } 50% { transform: scale(1.08, .92); } 70% { transform: translateY(-8px); } }
/* промахнулся: завалился и обиделся */
@keyframes mg-missed { 0% { transform: none; } 20% { transform: translateX(10px) rotate(12deg); } 40% { transform: translateY(6px) rotate(24deg) scale(1, .9); } 75% { transform: translateY(4px) rotate(-6deg) scale(1, .94); filter: saturate(.6); } 100% { transform: none; } }
/* смеётся над броском */
@keyframes mg-far { 0%, 100% { transform: none; } 10%, 30%, 50%, 70% { transform: translateY(-4px) rotate(-3deg); } 20%, 40%, 60%, 80% { transform: rotate(3deg); } }

@media (max-width: 699px) {
  .masc { --masc-h: 76px; right: 6px; bottom: 4px; }
  .masc-pop { position: fixed; left: 8px; right: 8px; width: auto; bottom: calc(var(--masc-h) + 16px); max-height: 68vh; }
  .masc-pop::after { right: 34px; }
  .masc-offer { position: fixed; left: 8px; right: 8px; width: auto; bottom: calc(var(--masc-h) + 16px); }
  .masc-offer::after { right: 34px; }
  .mg-bar { padding: 8px 10px; gap: 6px 10px; }
  .mg-score { order: 5; width: 100%; }
}
@media print { .masc, .mg { display: none; } }
