/* «Пересдача у Игоря» — тема Профиматики: тёмно-зелёный + неон, школьная клетка */

:root {
  --bg0: #041108;
  --bg1: #0a1f12;
  --card: #0d2417;
  --card2: #12301e;
  --line: #1d4a2f;
  --neon: #2bff88;
  --neon-dim: #1acb68;
  --neon2: #baff3f;
  --text: #eafff2;
  --dim: #7fae93;
  --red: #ff4d5e;
  --amber: #ffc24d;
  --shadow-neon: 0 0 12px rgba(43, 255, 136, .45), 0 0 40px rgba(43, 255, 136, .15);
  --spot: rgba(43, 255, 136, .13);
  --font-display: 'Unbounded', 'Rubik', -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg0);
  color: var(--text);
  font-family: 'Rubik', -apple-system, 'Segoe UI', Roboto, sans-serif;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

/* фон: глубина + дышащее неоновое пятно */
body {
  background:
    radial-gradient(90% 60% at 20% 100%, rgba(26, 90, 50, .22) 0%, transparent 60%),
    radial-gradient(120% 90% at 50% 0%, var(--bg1) 0%, var(--bg0) 70%),
    var(--bg0);
}
/* школьная тетрадь в клетку, медленно плывёт */
#bg-grid {
  position: fixed;
  inset: -60px;
  z-index: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, transparent 0 26px, rgba(43, 255, 136, .08) 26px 27px),
    repeating-linear-gradient(90deg, transparent 0 26px, rgba(43, 255, 136, .08) 26px 27px);
  mask-image: radial-gradient(110% 95% at 50% 35%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(110% 95% at 50% 35%, #000 30%, transparent 100%);
  animation: grid-pan 46s linear infinite;
}
@keyframes grid-pan {
  from { transform: translate(0, 0); }
  to   { transform: translate(54px, 54px); }
}
/* плавающие символы информатики */
#fx-symbols { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.fx-sym {
  position: absolute;
  bottom: -8%;
  color: var(--neon);
  font-weight: 700;
  text-shadow: 0 0 14px rgba(43, 255, 136, .5);
  animation: sym-rise linear infinite;
  will-change: transform;
}
@keyframes sym-rise {
  0%   { transform: translateY(0) translateX(0) rotate(-6deg); opacity: 0; }
  8%   { opacity: var(--o, .1); }
  92%  { opacity: var(--o, .1); }
  100% { transform: translateY(-116vh) translateX(26px) rotate(8deg); opacity: 0; }
}
/* виньетка поверх всего фона */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(120% 100% at 50% 40%, transparent 55%, rgba(0, 0, 0, .5) 100%);
}

img { pointer-events: none; }

/* ---------- экраны ---------- */
.screen {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: none;
  flex-direction: column;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px calc(env(safe-area-inset-bottom, 0px) + 12px);
}
.screen.active { display: flex; animation: screen-in .28s ease; }
@keyframes screen-in {
  from { opacity: 0; transform: scale(.985); }
  to   { opacity: 1; transform: scale(1); }
}

/* ---------- кнопки ---------- */
.btn {
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  border: none;
  border-radius: 14px;
  padding: 14px 20px;
  cursor: pointer;
  transition: transform .08s, filter .15s, box-shadow .2s;
}
.btn:active { transform: scale(.95); }
.btn-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #46ffa0, var(--neon) 45%, #17e070);
  color: #03240f;
  letter-spacing: .02em;
  box-shadow: var(--shadow-neon), inset 0 1px 0 rgba(255, 255, 255, .5);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
}
/* пробегающий блик */
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, .45) 50%, transparent 68%);
  transform: translateX(-160%);
  animation: shine 3s ease-in-out infinite;
}
@keyframes shine {
  0%, 60% { transform: translateX(-160%); }
  100% { transform: translateX(160%); }
}
.btn-ghost {
  background: rgba(43, 255, 136, .06);
  color: var(--neon);
  border: 1.5px solid var(--neon-dim);
}
.btn-slot {
  width: 100%;
  background: linear-gradient(180deg, #33204c, #1c1030 60%, #150b26);
  color: #e7c2ff;
  border: 1.5px solid #7a3fd0;
  box-shadow: 0 0 14px rgba(150, 70, 255, .3), inset 0 1px 0 rgba(231, 194, 255, .2);
}
.btn-slot:disabled { opacity: .35; filter: grayscale(.7); }

/* ---------- сцена 0 ---------- */
#screen-boot { align-items: center; justify-content: center; text-align: center; }
.boot-face {
  width: 108px;
  height: 108px;
  margin: 0 auto 22px;
  border-radius: 50%;
  padding: 4px;
  background: conic-gradient(var(--neon), #0d6e3c, var(--neon2), var(--neon));
  box-shadow: var(--shadow-neon);
  animation: float 3.2s ease-in-out infinite;
}
.boot-face img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg0);
  background: #0a1f12;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.boot-logo {
  font-size: 12px;
  letter-spacing: .55em;
  text-indent: .55em;
  color: var(--dim);
  margin-bottom: 16px;
}
.boot-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 8.6vw, 46px);
  line-height: 1.14;
  font-weight: 900;
  color: var(--neon);
  text-shadow: var(--shadow-neon);
  animation: neon-flicker 4.5s linear infinite;
}
@keyframes neon-flicker {
  0%, 6%, 8%, 100% { opacity: 1; }
  7% { opacity: .55; }
  62%, 64.5% { opacity: 1; }
  63.5% { opacity: .7; }
}
.boot-sub {
  margin-top: 16px;
  color: var(--dim);
  font-size: 13.5px;
  letter-spacing: .1em;
}
.boot-quip {
  margin-top: 12px;
  min-height: 20px;
  font-size: 13px;
  font-style: italic;
  color: var(--neon2);
  opacity: .85;
  transition: opacity .35s ease;
}
.boot-quip.swap { opacity: 0; }
.boot-tap {
  margin-top: 40px;
  font-size: 15px;
  color: var(--neon2);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* ---------- стейдж (говорящий Игорь) ---------- */
#screen-stage { padding-left: 0; padding-right: 0; }
#screen-stage.bg-red { --spot: rgba(255, 77, 94, .16); }
#screen-stage.bg-red::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 0%, rgba(61, 10, 18, .82) 0%, rgba(22, 3, 5, .85) 70%);
  animation: alarm 1.4s ease-in-out infinite;
}
@keyframes alarm { 0%, 100% { opacity: .85; } 50% { opacity: .6; } }
#screen-stage.bg-dim .sprite-zone::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 60% at 50% 45%, transparent 30%, rgba(0, 0, 0, .6) 100%);
}

.bubble-zone {
  min-height: 118px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 4px 16px 12px;
  z-index: 3;
  position: relative;
}
.bubble {
  position: relative;
  max-width: 560px;
  background: linear-gradient(180deg, #143424, var(--card2));
  border: 1.5px solid var(--neon-dim);
  border-radius: 18px;
  padding: 13px 17px;
  font-size: 16.5px;
  line-height: 1.38;
  box-shadow: 0 0 22px rgba(43, 255, 136, .14), 0 8px 24px rgba(0, 0, 0, .45);
  min-height: 48px;
  animation: bubble-in .22s cubic-bezier(.2, .9, .3, 1.4), bubble-float 3.4s ease-in-out .3s infinite;
}
@keyframes bubble-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes bubble-in {
  from { opacity: 0; transform: scale(.9) translateY(6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.bubble::after {
  content: '';
  position: absolute;
  bottom: -9px;
  left: 50%;
  width: 16px;
  height: 16px;
  background: var(--card2);
  border-right: 1.5px solid var(--neon-dim);
  border-bottom: 1.5px solid var(--neon-dim);
  transform: translateX(-50%) rotate(45deg);
}
.bubble .cursor { color: var(--neon); animation: pulse .8s steps(2) infinite; }
.bubble.done .cursor { display: none; }

.sprite-zone {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}
/* световое пятно за спиной Игоря */
.sprite-zone::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -12%;
  width: 130vw;
  height: 90%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, var(--spot), transparent 72%);
  pointer-events: none;
}
.sprite-wrap {
  position: relative;
  height: 100%;
  max-height: 52vh;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transform: translateY(0);
}
.sprite-wrap.enter { animation: slide-up .4s cubic-bezier(.2, .9, .3, 1); }
@keyframes slide-up {
  from { transform: translateY(70%); opacity: .4; }
  to   { transform: translateY(0); opacity: 1; }
}
/* Игорь «дышит» в паузах */
.sprite-wrap.idle { animation: breathe 3.8s ease-in-out infinite; }
@keyframes breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-.7%) scale(1.008); }
}
/* короткое моргание/сведение — лёгкий сквош по вертикали */
.sprite-wrap.idle.blink img { animation: blink .14s ease; }
@keyframes blink {
  0%, 100% { transform: translateX(-50%) scaleY(1); }
  50% { transform: translateX(-50%) scaleY(.975); }
}
.sprite-wrap img {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  max-width: none;
  filter: drop-shadow(0 10px 26px rgba(0, 0, 0, .55));
}
#sprite-open { visibility: hidden; }
.sprite-wrap.mouth-open #sprite-open { visibility: visible; }
.sprite-wrap.mouth-open #sprite-base { visibility: hidden; }
/* happy: пары нет — лёгкий кивок вместо смены кадра */
.sprite-wrap.bob-mode #sprite-open { display: none; }
.sprite-wrap.bob-mode.mouth-open #sprite-base {
  visibility: visible;
  transform: translateX(-50%) scaleY(.982) translateY(.6%);
}
/* happy докадрирован по плечи: прячем микрофон и стол; голова в кадре правее центра — сдвигаем */
.sprite-wrap.crop-shoulders img { height: 175%; bottom: auto; top: 0; left: 38%; }

.stage-bottom {
  position: relative;
  z-index: 4;
  padding: 10px 16px 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.stage-bottom .btn { min-width: 240px; }
.stage-note { font-size: 13px; color: var(--dim); }
.stage-note.gain {
  font-size: 17px;
  font-weight: 800;
  color: var(--neon2);
  text-shadow: 0 0 12px rgba(186, 255, 63, .5);
  animation: gain-pop .5s cubic-bezier(.2, .9, .3, 1.5);
}
@keyframes gain-pop {
  from { opacity: 0; transform: translateY(10px) scale(.7); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.explain-card {
  width: 100%;
  max-width: 560px;
  background: rgba(6, 22, 13, .93);
  border: 1px solid var(--line);
  border-left: 3px solid var(--neon-dim);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.45;
  backdrop-filter: blur(4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}
.explain-card .correct-line { color: var(--neon2); font-weight: 700; margin-bottom: 6px; }
.explain-card .explain-line { color: var(--text); }

.boss-plaque {
  font-family: var(--font-display);
  background: linear-gradient(180deg, rgba(46, 30, 3, .95), rgba(30, 20, 2, .95));
  border: 1.5px solid var(--amber);
  color: var(--amber);
  border-radius: 12px;
  padding: 11px 22px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .12em;
  box-shadow: 0 0 18px rgba(255, 194, 77, .4), inset 0 0 14px rgba(255, 194, 77, .12);
  animation: boss-glow 1.2s ease-in-out infinite;
}
@keyframes boss-glow {
  0%, 100% { box-shadow: 0 0 12px rgba(255, 194, 77, .3), inset 0 0 14px rgba(255, 194, 77, .1); }
  50% { box-shadow: 0 0 26px rgba(255, 194, 77, .55), inset 0 0 14px rgba(255, 194, 77, .18); }
}

/* ---------- сцена 2: вопрос ---------- */
.timer-row { padding: 14px 4px 2px; }
.timer-row.shake { animation: shake .35s linear infinite; }
@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-3px, 1px) rotate(-.4deg); }
  50% { transform: translate(2px, -1px); }
  75% { transform: translate(-2px, 2px) rotate(.4deg); }
}
.timer-track {
  position: relative;
  height: 12px;
  background: rgba(13, 36, 23, .9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .5);
}
.timer-fill {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--neon-dim), var(--neon));
  box-shadow: 0 0 10px rgba(43, 255, 136, .4);
  transform-origin: left;
}
.timer-row.warn .timer-fill { background: linear-gradient(90deg, #c9a227, var(--amber)); box-shadow: 0 0 10px rgba(255, 194, 77, .4); }
.timer-row.danger .timer-fill { background: linear-gradient(90deg, #c92727, var(--red)); box-shadow: 0 0 12px rgba(255, 77, 94, .55); }
.timer-head {
  position: absolute;
  top: 50%;
  width: 42px;
  height: 42px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid var(--neon);
  background: #0a1f12;
  object-fit: cover;
  box-shadow: 0 0 10px rgba(43, 255, 136, .5), 0 4px 10px rgba(0, 0, 0, .5);
}
.timer-row.danger .timer-head {
  border-color: var(--red);
  box-shadow: 0 0 14px rgba(255, 77, 94, .8);
  animation: head-pulse .5s ease-in-out infinite;
}
@keyframes head-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.12); }
}
/* красная тревога по краям экрана, когда время горит */
#screen-quiz:has(.timer-row.danger)::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 90px rgba(255, 77, 94, .28);
  animation: alarm 1s ease-in-out infinite;
}

.quiz-top { padding: 2px 2px 0; }
.quiz-top-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--dim);
  text-transform: uppercase;
  margin-bottom: 7px;
}
.quiz-top-head b {
  font-family: var(--font-display);
  color: var(--neon);
  font-size: 15px;
  text-shadow: 0 0 10px rgba(43, 255, 136, .5);
}
.quiz-top-tag { color: var(--amber); font-weight: 700; letter-spacing: .08em; }
.progress-pips {
  display: flex;
  gap: 3px;
  justify-content: center;
}
.pip {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: var(--line);
  transition: background .3s, box-shadow .3s, transform .3s;
}
.pip.past { background: var(--neon-dim); }
.pip.now { background: var(--neon); box-shadow: 0 0 8px rgba(43, 255, 136, .7); transform: scaleY(1.6); }
.pip.boss { background: #6b5410; }
.pip.boss.past { background: var(--amber); }
.pip.boss.now { background: var(--amber); box-shadow: 0 0 8px rgba(255, 194, 77, .8); }

.hud {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0 6px;
  font-size: 15px;
}
.hud-lives {
  letter-spacing: 2px;
  background: rgba(13, 36, 23, .8);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  filter: drop-shadow(0 0 6px rgba(255, 77, 94, .35));
}
.hud-lives.ouch { animation: ouch .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes ouch {
  0% { transform: scale(1); }
  30% { transform: scale(1.25) rotate(-4deg); }
  60% { transform: scale(.95) rotate(3deg); }
  100% { transform: scale(1); }
}
.hud-score {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--neon);
  flex: 1;
  text-align: center;
  font-size: 19px;
  text-shadow: 0 0 14px rgba(43, 255, 136, .5);
}
.hud-score::after { content: ' очк.'; font-family: 'Rubik', sans-serif; font-size: 11px; color: var(--dim); font-weight: 400; }
.hud-score.pop { animation: score-pop .4s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes score-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.22); }
  100% { transform: scale(1); }
}
.hud-streak {
  min-width: 74px;
  text-align: center;
  color: var(--amber);
  font-weight: 700;
  font-size: 13.5px;
  background: rgba(46, 30, 3, .6);
  border: 1px solid rgba(255, 194, 77, .35);
  border-radius: 999px;
  padding: 5px 10px;
}
.hud-streak:empty { visibility: hidden; }

.quiz-body { flex: 1; display: flex; align-items: center; min-height: 0; }
.q-card {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  background: linear-gradient(180deg, #102b1b, var(--card));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 16px 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .45);
  animation: deal .3s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes deal {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
/* неоновая полоска сверху карточки */
.q-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  box-shadow: 0 0 12px rgba(43, 255, 136, .6);
}
.q-meta { font-size: 11.5px; letter-spacing: .15em; color: var(--dim); margin-bottom: 10px; text-transform: uppercase; }
.q-meta .boss-tag { color: var(--amber); font-weight: 800; text-shadow: 0 0 10px rgba(255, 194, 77, .6); }
.q-text { font-size: 19px; line-height: 1.35; font-weight: 600; margin-bottom: 16px; }
.q-answers { display: grid; gap: 10px; }
.answer {
  display: flex;
  align-items: center;
  font-family: inherit;
  text-align: left;
  font-size: 16px;
  color: var(--text);
  background: linear-gradient(180deg, #143424, var(--card2));
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
  cursor: pointer;
  transition: transform .08s, border-color .15s, background .15s, box-shadow .15s;
  animation: ans-in .32s ease backwards;
}
@keyframes ans-in {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}
.answer:active { transform: scale(.98); border-color: var(--neon-dim); }
.answer .letter {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-right: 11px;
  border-radius: 50%;
  border: 1.5px solid var(--neon-dim);
  color: var(--neon);
  font-weight: 800;
  font-size: 13px;
}
.answer.picked-correct {
  background: linear-gradient(180deg, #124c29, #0d3a20);
  border-color: var(--neon);
  box-shadow: var(--shadow-neon);
  animation: correct-pop .35s cubic-bezier(.2, .9, .3, 1.5);
}
@keyframes correct-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.035); }
  100% { transform: scale(1); }
}
.answer.picked-correct .letter { background: var(--neon); color: #03240f; border-color: var(--neon); }
.answer.picked-wrong {
  background: linear-gradient(180deg, #4a1119, #3a0d14);
  border-color: var(--red);
  animation: wrong-shake .3s linear;
}
@keyframes wrong-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
.answer.picked-wrong .letter { background: var(--red); color: #2b040a; border-color: var(--red); }
.answer.reveal-correct { border-color: var(--neon-dim); box-shadow: 0 0 10px rgba(43, 255, 136, .25); }
.answer:disabled { cursor: default; }

.quiz-footer { padding: 10px 0 2px; max-width: 560px; width: 100%; margin: 0 auto; }

/* ---------- слот «Монте-Карло» ---------- */
#slot-overlay[hidden] { display: none; }
#slot-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: radial-gradient(80% 60% at 50% 45%, rgba(40, 6, 6, .7), rgba(2, 4, 6, .94));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  backdrop-filter: blur(4px);
  animation: screen-in .25s ease;
}
.slot-row { display: flex; align-items: flex-start; gap: 2px; }
.slot-machine {
  position: relative;
  width: 284px;
  filter: drop-shadow(0 0 40px rgba(0, 0, 0, .75));
}
@keyframes spin-rumble {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-1.5px, 1px); }
  50% { transform: translate(1.5px, -1px); }
  75% { transform: translate(-1px, -1.5px); }
}

/* красный купол */
.slot-dome {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 26px;
  border-radius: 26px 26px 0 0;
  background: linear-gradient(180deg, #ff5347, #b31f18);
  box-shadow: inset 0 3px 4px rgba(255, 255, 255, .4);
  z-index: 2;
}
/* арка-маркиза */
.slot-arch {
  position: relative;
  height: 132px;
  border-radius: 150px 150px 8px 8px / 106px 106px 8px 8px;
  overflow: hidden;
  border: 4px solid #cba23a;
  background: linear-gradient(180deg, #e83b2e 0%, #a01c15 40%, #0c0808 40%, #191113 100%);
  box-shadow: inset 0 3px 10px rgba(255, 255, 255, .22), inset 0 -5px 12px rgba(0, 0, 0, .6);
}
.slot-arch-glow {
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 64%;
  height: 30px;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .55), transparent);
  border-radius: 50%;
}
.slot-arch-title {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 900;
  line-height: .95;
  color: #f2ca4c;
  text-shadow: 0 1px 0 #6e4a0c, 0 0 12px rgba(230, 180, 34, .5), 0 2px 3px rgba(0, 0, 0, .6);
}
.slot-arch-monte { font-size: 19px; letter-spacing: .04em; }
.slot-arch-slot { font-size: 30px; letter-spacing: .08em; }
.slot-arch-gem {
  position: absolute;
  top: 6px;
  font-family: Georgia, serif;
  font-size: 9px;
  color: #cba23a;
}
.slot-arch-gem.left { left: 8px; }
.slot-arch-gem.right { right: 8px; }

/* корпус */
.slot-body {
  background: linear-gradient(180deg, #2a1f14, #120c08);
  border: 4px solid #cba23a;
  border-top: none;
  border-radius: 0 0 14px 14px;
  padding: 12px 10px 14px;
  box-shadow: inset 0 0 22px rgba(0, 0, 0, .7);
}
/* бегущие лампочки */
.bulbs {
  height: 8px;
  margin: 0 2px 10px;
  background-image:
    radial-gradient(circle 2.6px at 7px 4px, #ffe07a 55%, transparent 62%),
    radial-gradient(circle 2.6px at 15px 4px, #e8402f 55%, transparent 62%);
  background-size: 16px 8px;
  background-repeat: repeat-x;
  filter: drop-shadow(0 0 4px rgba(255, 200, 90, .9));
  animation: bulbs-chase .42s steps(2) infinite;
}
@keyframes bulbs-chase { to { background-position-x: 16px; } }

.slot-reel-row { display: flex; align-items: center; gap: 5px; }
.slot-side {
  flex: none;
  width: 30px;
  font-family: Georgia, serif;
  font-size: 7px;
  font-weight: 800;
  color: #f2ca4c;
  text-align: center;
  line-height: 1.25;
  text-shadow: 0 0 6px rgba(230, 180, 34, .5);
}
.slot-side-arrow { color: #e8402f; font-size: 12px; }
.slot-side.left .slot-side-arrow { margin-top: 2px; }
.slot-side.right .slot-side-arrow { margin-bottom: 2px; }

/* хром-рамка барабанов */
.slot-reels-frame {
  flex: 1;
  background: linear-gradient(180deg, #e2e5ea, #8b9098 55%, #c3c7ce);
  border-radius: 9px;
  padding: 5px;
  box-shadow: 0 2px 7px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .8);
}
.slot-reels {
  display: flex;
  gap: 5px;
  justify-content: center;
  background: #080605;
  border-radius: 5px;
  padding: 4px;
}
.reel {
  width: 44px;
  height: 74px;
  overflow: hidden;
  position: relative;
  background: #0a0806;
  border-radius: 2px;
  box-shadow: inset 0 7px 9px rgba(0, 0, 0, .85), inset 0 -7px 9px rgba(0, 0, 0, .85);
}
.reel-glass {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), transparent 30%, transparent 70%, rgba(255, 255, 255, .06));
}
.reel-strip { display: flex; flex-direction: column; }
.reel-cell { width: 44px; height: 74px; flex: none; background-size: cover; background-position: center; }
.reel-cell.sym-happy { background-image: url('../assets/sprites/happy.png'); background-size: 300% auto; background-position: 62% 5%; }
.reel-cell.sym-neutral { background-image: url('../assets/timer_faces/face_neutral.png'); }
.reel-cell.sym-strict { background-image: url('../assets/timer_faces/face_strict.png'); }
.reel-cell.sym-angry { background-image: url('../assets/timer_faces/face_angry.png'); }

/* хром-лоток */
.slot-tray {
  height: 14px;
  margin: 10px 6px 0;
  border-radius: 4px;
  background: linear-gradient(180deg, #d3d6dc, #7c828b);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 2px 4px rgba(0, 0, 0, .5);
}
/* нижняя маркиза */
.slot-bottom-marquee {
  margin-top: 10px;
  background: linear-gradient(180deg, #191113, #0b0707);
  border: 2px solid #cba23a;
  border-radius: 6px;
  padding: 8px 6px;
  text-align: center;
  font-family: Georgia, serif;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: .03em;
  color: #f2ca4c;
  text-shadow: 0 0 10px rgba(230, 180, 34, .5), 0 1px 0 #6e4a0c;
}

/* рычаг */
.slot-lever-col {
  width: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 150px;
  cursor: grab;
  touch-action: none;
}
.slot-lever-rod {
  position: relative;
  width: 11px;
  height: 150px;
  background: linear-gradient(90deg, #6b7076, #eef2f6 45%, #9aa0a6);
  border-radius: 6px;
  box-shadow: inset 0 0 3px rgba(0, 0, 0, .5), 0 2px 6px rgba(0, 0, 0, .5);
}
.slot-lever-knob {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translate(-50%, 0);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff9a9a, #d21f2f 58%, #7c0d18);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .55), inset 0 3px 4px rgba(255, 255, 255, .5);
  will-change: transform;
}
.slot-lever-hint {
  margin-top: 12px;
  color: #ffd75e;
  font-size: 18px;
  animation: lever-hint 1s ease-in-out infinite;
}
@keyframes lever-hint {
  0%, 100% { transform: translateY(0); opacity: .5; }
  50% { transform: translateY(5px); opacity: 1; }
}

.slot-caption {
  font-family: var(--font-display);
  color: #ffd75e;
  font-weight: 800;
  font-size: 15px;
  min-height: 22px;
  letter-spacing: .06em;
  text-shadow: 0 0 16px rgba(255, 190, 70, .6);
  text-align: center;
}

/* ---------- финалы ---------- */
#screen-ending { overflow-y: auto; }
.ending-inner {
  margin: auto;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 10px 0;
  position: relative;
}
.doc {
  width: 100%;
  color: #1c1a16;
  border-radius: 4px;
  padding: 24px 22px;
  font-family: 'Courier New', monospace;
  position: relative;
  transform: rotate(-.8deg);
  animation: doc-in .55s cubic-bezier(.2, .9, .3, 1);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .4);
}
@keyframes doc-in {
  from { transform: translateY(-60vh) rotate(-5deg); }
  to   { transform: translateY(0) rotate(-.8deg); }
}
/* бумажная фактура: горизонтальные волокна */
.doc.povestka {
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(120, 100, 60, .05) 3px 4px),
    linear-gradient(160deg, #f4eeda 0%, #ece4cc 100%);
}
.doc.zachetka {
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(60, 110, 70, .05) 3px 4px),
    linear-gradient(160deg, #ecf3df 0%, #e2ecd2 100%);
}
/* внутренняя официальная рамка */
.doc::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(60, 50, 30, .35);
  outline: 3px double rgba(60, 50, 30, .25);
  outline-offset: 3px;
  pointer-events: none;
  border-radius: 2px;
}
/* водяной знак */
.doc::after {
  content: '★';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -54%);
  font-size: 190px;
  line-height: 1;
  opacity: .05;
  pointer-events: none;
}
/* фото призываемого */
.doc-photo {
  position: absolute;
  top: 96px;
  right: 20px;
  width: 72px;
  height: 90px;
  object-fit: cover;
  background: #fff;
  padding: 3px;
  border: 1px solid rgba(60, 50, 30, .55);
  box-shadow: 0 2px 7px rgba(0, 0, 0, .3);
  transform: rotate(2.5deg);
  filter: sepia(.32) saturate(.92) contrast(1.05);
  z-index: 1;
  opacity: 0;
}
.doc-photo.show { animation: photo-slap .3s cubic-bezier(.3, 1.5, .5, 1) forwards; }
@keyframes photo-slap {
  0% { opacity: 0; transform: rotate(8deg) scale(1.6); }
  100% { opacity: 1; transform: rotate(2.5deg) scale(1); }
}
.doc-photo-label {
  position: absolute;
  top: 189px;
  right: 20px;
  width: 78px;
  text-align: center;
  font-size: 8.5px;
  color: #777;
  letter-spacing: .05em;
  z-index: 1;
  opacity: 0;
  transition: opacity .25s ease .15s;
}
/* подпись проявляется вместе с фото */
.doc-photo.show + .doc-photo-label { opacity: 1; }
.povestka .doc-line { margin-right: 88px; }
/* каретка печатной машинки */
.doc-line.typing::after, .doc-title.typing::after {
  content: '▌';
  color: #8a1f1f;
  animation: pulse .7s steps(2) infinite;
}
.doc-org { font-size: 10.5px; text-align: center; letter-spacing: .08em; color: #555; position: relative; }
.doc-title {
  font-size: 26px;
  font-weight: 900;
  text-align: center;
  letter-spacing: .25em;
  text-indent: .25em;
  margin: 10px 0 14px;
  position: relative;
}
.doc.povestka .doc-title { color: #8a1f1f; }
.doc.zachetka .doc-title { color: #1f5c2d; }
.doc-line { font-size: 14px; margin: 8px 0; border-bottom: 1px dotted #998; padding-bottom: 3px; position: relative; }
.doc-line b { font-weight: 700; }
.doc-sign { margin-top: 15px; font-size: 13px; display: flex; justify-content: space-between; color: #444; position: relative; }
.stamp {
  position: absolute;
  right: 14px;
  bottom: 10px;
  border: 3px solid currentColor;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .15em;
  transform: rotate(-14deg);
  opacity: 0;
  mask-image: repeating-linear-gradient(35deg, #000 0 2px, rgba(0, 0, 0, .78) 2px 4px);
  -webkit-mask-image: repeating-linear-gradient(35deg, #000 0 2px, rgba(0, 0, 0, .78) 2px 4px);
}
/* в зачётке штамп бьёт сразу, в повестке — после допечатки (по классу .show) */
.zachetka .stamp { animation: stamp-hit .35s cubic-bezier(.3, 1.6, .5, 1) .55s forwards; }
.stamp.show { animation: stamp-hit .35s cubic-bezier(.3, 1.6, .5, 1) forwards; }
@keyframes stamp-hit {
  0% { opacity: 0; transform: rotate(-14deg) scale(2.2); }
  100% { opacity: .9; transform: rotate(-14deg) scale(1); }
}
.stamp.red { color: #b32020; }
.stamp.green { color: #1f7a35; }
.doc-fine {
  position: relative;
  margin-top: 14px;
  padding-top: 8px;
  border-top: 1px dashed rgba(60, 50, 30, .4);
  font-size: 9.5px;
  line-height: 1.4;
  font-style: italic;
  color: #6a5c44;
  max-width: 74%;
  opacity: 0;
  transition: opacity .3s ease;
}
.doc-fine.show { opacity: 1; }
.ending-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.ending-actions.pending { opacity: 0; pointer-events: none; }
.ending-actions.show { animation: screen-in .3s ease; }

/* ---------- рекорды ---------- */
#screen-records { overflow-y: auto; }
.records-inner { margin: auto; width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 16px; }
.records-title {
  font-family: var(--font-display);
  text-align: center;
  color: var(--neon);
  letter-spacing: .18em;
  text-indent: .18em;
  font-size: 17px;
  text-shadow: var(--shadow-neon);
}
.records-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.records-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(180deg, #102b1b, var(--card));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 15px;
  animation: row-in .3s ease backwards;
}
.records-list li:nth-child(1) { animation-delay: .03s; }
.records-list li:nth-child(2) { animation-delay: .06s; }
.records-list li:nth-child(3) { animation-delay: .09s; }
.records-list li:nth-child(4) { animation-delay: .12s; }
.records-list li:nth-child(5) { animation-delay: .15s; }
@keyframes row-in {
  from { opacity: 0; transform: translateX(-14px); }
  to   { opacity: 1; transform: translateX(0); }
}
.records-list li.me { border-color: var(--neon); box-shadow: var(--shadow-neon); }
.records-list .place { color: var(--dim); width: 30px; font-weight: 700; }
.records-list .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.records-list .pts { font-family: var(--font-display); color: var(--neon); font-weight: 800; font-size: 14px; }
.records-list .empty { color: var(--dim); justify-content: center; }
.records-actions { display: flex; gap: 10px; justify-content: center; }

/* ---------- эффекты ---------- */
#confetti-canvas { position: fixed; inset: 0; z-index: 50; pointer-events: none; display: none; }
#flash {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  background: var(--red);
  opacity: 0;
}
#flash.hit { animation: hit .45s ease-out; }
@keyframes hit { 0% { opacity: .45; } 100% { opacity: 0; } }

/* летящие очки */
.fly-score {
  position: fixed;
  z-index: 45;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  color: var(--neon2);
  text-shadow: 0 0 14px rgba(186, 255, 63, .8);
  pointer-events: none;
  will-change: transform, opacity;
  transition: transform .7s cubic-bezier(.35, .1, .2, 1), opacity .7s ease;
}

/* вспышка при достижении множителя серии */
#streak-flare {
  position: fixed;
  inset: 0;
  z-index: 41;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(90% 70% at 50% 45%, rgba(43, 255, 136, .32), transparent 70%);
}
#streak-flare.go { animation: flare-go .6s ease-out; }
#streak-flare.big { background: radial-gradient(100% 80% at 50% 45%, rgba(255, 194, 77, .45), transparent 72%); }
@keyframes flare-go { 0% { opacity: 1; } 100% { opacity: 0; } }

/* баннер серии */
.streak-banner {
  position: absolute;
  top: 30%;
  left: 50%;
  z-index: 20;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 26px;
  letter-spacing: .04em;
  color: var(--amber);
  text-shadow: 0 0 20px rgba(255, 194, 77, .7), 0 3px 8px rgba(0, 0, 0, .5);
  pointer-events: none;
  white-space: nowrap;
  animation: banner-pop 1.1s cubic-bezier(.2, .9, .3, 1.3) forwards;
}
@keyframes banner-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.5); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
  40% { transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; transform: translate(-50%, -80%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -110%) scale(.9); }
}

/* растущий огонёк серии */
.hud-streak.hot {
  font-size: 15px;
  color: var(--red);
  border-color: rgba(255, 77, 94, .5);
  animation: flame 0.7s ease-in-out infinite;
}
@keyframes flame {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(255, 120, 40, .5)); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 9px rgba(255, 120, 40, .8)); }
}

/* ---------- фоновое видео повестки (полупрозрачно, под документом) ---------- */
#povestka-video[hidden] { display: none; }
#povestka-video {
  position: fixed;
  inset: 0;
  z-index: 1; /* поверх фона, но позади экранов (z-index 2) */
  pointer-events: none;
  overflow: hidden;
  opacity: .32;
  -webkit-mask-image: radial-gradient(120% 100% at 50% 45%, #000 55%, transparent 100%);
  mask-image: radial-gradient(120% 100% at 50% 45%, #000 55%, transparent 100%);
}
#povestka-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* ---------- кнопка звука ---------- */
#sound-toggle {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  right: 12px;
  z-index: 65;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(0, 0, 0, .38);
  color: var(--text);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
#sound-toggle:active { transform: scale(.92); }

/* ---------- вспышка камеры ---------- */
#white-flash {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  background: #fff;
  opacity: 0;
}

/* ---------- удостоверение, которое протягивает рука ---------- */
/* слот-обёртка отвечает за размещение на документе, .id-card — за «шлепок»/покачивание */
.id-card-slot {
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  z-index: 5;
  pointer-events: none;
  transition: transform .6s cubic-bezier(.4, 0, .6, 1), opacity .55s ease;
}
/* рука снизу уносит удостоверение вниз за край */
.id-card-slot.taken {
  transform: translateX(-50%) translateY(72vh) rotate(11deg);
  opacity: 0;
}
.id-card {
  width: 190px;
  padding: 7px 8px 8px;
  border-radius: 8px;
  background: linear-gradient(150deg, #f4f0e4 0%, #e6dfcc 100%);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .5);
  display: grid;
  grid-template-columns: 50px 1fr;
  grid-template-areas: "city city" "photo fields";
  column-gap: 7px;
  row-gap: 3px;
  align-items: start;
  transform: rotate(-3deg);
  transform-origin: center;
  opacity: 0;
  position: relative;
  color: #1c2b45;
  overflow: hidden;
}
.id-card.show { opacity: 1; animation: id-slap .34s cubic-bezier(.3, 1.5, .5, 1); }
.id-card.wiggle { animation: wiggle 2.8s ease-in-out infinite; }
@keyframes id-slap {
  0% { opacity: 0; transform: rotate(9deg) scale(1.5); }
  100% { opacity: 1; transform: rotate(-3deg) scale(1); }
}
@keyframes wiggle {
  0%, 100% { transform: rotate(-3deg); }
  25% { transform: rotate(-6deg) scale(1.02); }
  50% { transform: rotate(-1deg); }
  75% { transform: rotate(-4deg) scale(1.01); }
}
.id-flag {
  position: absolute;
  top: 7px;
  left: 8px;
  width: 22px;
  height: 14px;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .25);
  background: linear-gradient(#ffce3d 0 33.3%, #1f5fd0 33.3% 66.6%, #d62b2b 66.6% 100%);
  z-index: 2;
}
.id-star { position: absolute; top: 4px; left: 0; right: 0; text-align: center; font-size: 5px; color: #fff; line-height: 1; letter-spacing: 1px; }
.id-city {
  grid-area: city;
  text-align: center;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 800;
  font-size: 11.5px;
  letter-spacing: .02em;
  color: #16233a;
  padding: 1px 0 4px;
  border-bottom: 1px solid rgba(0, 0, 0, .16);
}
.id-photo {
  grid-area: photo;
  width: 48px;
  height: 58px;
  border: 1.5px solid #cfc7ad;
  border-radius: 2px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}
.id-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; display: block; pointer-events: none; }
.id-fields { grid-area: fields; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.id-field { display: flex; flex-direction: column; line-height: 1.05; }
.id-label { font-size: 5.5px; color: #7c7768; letter-spacing: .02em; }
.id-ru { font-size: 10px; font-weight: 800; color: #16233a; font-family: Georgia, serif; }
.id-en { font-size: 7px; color: #5a5d68; letter-spacing: .05em; }
.id-dob .id-ru { font-size: 9px; }
.id-stamp {
  position: absolute;
  right: 6px;
  bottom: 7px;
  border: 2px solid currentColor;
  border-radius: 4px;
  padding: 1px 6px;
  font-family: Georgia, serif;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: .06em;
  transform: rotate(-9deg);
  opacity: .85;
  mask-image: repeating-linear-gradient(40deg, #000 0 2px, rgba(0, 0, 0, .68) 2px 3px);
  -webkit-mask-image: repeating-linear-gradient(40deg, #000 0 2px, rgba(0, 0, 0, .68) 2px 3px);
}
.id-stamp.ok { color: #2f8b3e; }
.id-stamp.fail { color: #c22b2b; }

/* фото миньона «новый образ» на зачётке (как в дизайне) */
.doc.zachetka .doc-photo.zach-photo {
  top: 60px;
  right: 16px;
  width: 76px;
  height: 88px;
  object-fit: cover;
  object-position: center 10%;
  filter: none;
  transform: rotate(2deg);
}
.doc.zachetka .zach-photo-label {
  top: 150px;
  right: 14px;
  width: 80px;
}

/* ---------- пасхалка: рука миньона (от края экрана) ---------- */
.minion-hand {
  position: fixed;
  left: 50%;
  width: 96px;
  height: var(--h, 60vh);
  z-index: 55;
  pointer-events: none;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .5));
}
.minion-hand.from-top { top: 0; }
.minion-hand.from-bottom { bottom: 0; transform: scaleY(-1); } /* та же рука, но снизу */
/* рукав-рука: растёт от края к цели */
.mh-arm {
  position: absolute;
  top: 0;
  left: 50%;
  width: 30px;
  height: 100%;
  transform: translateX(-50%) scaleY(0);
  transform-origin: top center;
  background: linear-gradient(90deg, #d99f28 0%, #f6c945 42%, #e6ad2c 100%);
  border-radius: 0 0 15px 15px;
  box-shadow: inset 4px 0 5px rgba(255, 255, 255, .35), inset -5px 0 7px rgba(0, 0, 0, .18);
  transition: transform .5s cubic-bezier(.3, 1.2, .4, 1);
}
/* кисть с карточкой: едет к концу рукава синхронно */
.mh-hand {
  position: absolute;
  top: calc(var(--h, 60vh) - 62px);
  left: 50%;
  width: 90px;
  height: 104px;
  margin-left: -45px;
  transform: translateY(calc(-1 * var(--h, 60vh)));
  transition: transform .5s cubic-bezier(.3, 1.2, .4, 1);
}
.mh-hand svg { width: 100%; height: 100%; display: block; }
.minion-hand.reach .mh-arm { transform: translateX(-50%) scaleY(1); }
.minion-hand.reach .mh-hand { transform: translateY(0); }
.minion-hand.retract .mh-arm { transform: translateX(-50%) scaleY(0); transition: transform .55s ease-in; }
.minion-hand.retract .mh-hand { transform: translateY(calc(-1 * var(--h, 60vh))); transition: transform .55s ease-in; }

/* ---------- лазеры из глаз Игоря ---------- */
.igor-eyes {
  position: absolute;
  top: 0;
  left: 50%;
  width: 62px;
  height: 62px;
  transform: translate(-50%, -115%);
  z-index: 12;
  pointer-events: none;
  transition: transform .28s cubic-bezier(.2, 1.4, .4, 1);
}
.igor-eyes img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--red);
  box-shadow: 0 0 16px rgba(255, 77, 94, .9), 0 6px 14px rgba(0, 0, 0, .55);
  filter: saturate(1.2) contrast(1.1);
}
.igor-eyes::before, .igor-eyes::after {
  content: '';
  position: absolute;
  top: 43%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff2b3c;
  box-shadow: 0 0 10px 3px rgba(255, 60, 70, .95);
  animation: eye-burn .28s ease-in-out infinite alternate;
}
.igor-eyes::before { left: 31%; }
.igor-eyes::after { right: 31%; }
.igor-eyes.show { transform: translate(calc(-50% + var(--aim, 0px)), 4px); }
.igor-eyes.hide { transform: translate(-50%, -115%); transition: transform .35s ease-in; }
@keyframes eye-burn { from { opacity: .55; } to { opacity: 1; } }

.laser-beam {
  position: fixed;
  height: 4px;
  transform-origin: left center;
  z-index: 11;
  pointer-events: none;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(255, 90, 100, .15), #ff3b4a 40%, #ff9aa2 88%, #fff);
  box-shadow: 0 0 10px 2px rgba(255, 60, 70, .9), 0 0 22px 5px rgba(255, 60, 70, .45);
  opacity: .95;
  animation: laser-flicker .05s steps(2) infinite;
}
.laser-beam.fade { opacity: 0; transition: opacity .3s ease; }
@keyframes laser-flicker { from { filter: brightness(1); } to { filter: brightness(1.5); } }
.laser-hit {
  position: fixed;
  width: 12px;
  height: 12px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, #fff, #ffd36b 40%, rgba(255, 90, 40, .6) 70%, transparent);
  box-shadow: 0 0 20px 8px rgba(255, 150, 40, .7);
  z-index: 11;
  pointer-events: none;
  animation: hit-pop .45s ease-out forwards;
}
@keyframes hit-pop {
  0% { transform: translate(-50%, -50%) scale(.3); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(3.2); opacity: 0; }
}

/* сожжённый лазером ответ */
.answer.burned {
  cursor: default;
  color: #6b5a52;
  background: linear-gradient(180deg, #241713, #17100d);
  border-color: #3a241c;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, .7), 0 0 10px rgba(120, 40, 20, .3);
  animation: burn-in .45s ease-out;
  position: relative;
  overflow: hidden;
}
.answer.burned .letter { background: #3a241c; border-color: #5a3a2c; color: #8a6a5c; }
.answer.burned::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 28% 50%, rgba(0, 0, 0, .55), transparent 42%),
    radial-gradient(circle at 72% 50%, rgba(70, 25, 12, .5), transparent 46%);
}
@keyframes burn-in {
  0% { filter: brightness(2.4) saturate(2); }
  30% { filter: brightness(1.7); }
  100% { filter: brightness(1); }
}

/* уважение к prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  #bg-grid, #fx-symbols, .btn-primary::after, .bubble, .boss-plaque,
  .sprite-wrap.idle, .bulbs, .slot-lever-hint, .timer-row.danger .timer-head, #streak-flare,
  .id-card.wiggle, .igor-eyes::before, .igor-eyes::after, .laser-beam { animation: none !important; }
}
