/* The body already reserves the fixed site header; the bottom padding clears the LM.radio dock. */
main.crush-app {
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 110px;
}

html:not(#lm-u1):not(#lm-u2):not(#crush) body.lm-arcade .masthead {
  width: min(100% - 48px, 1152px) !important;
}

/* Each piece is a close-up head on its own colour ring (scripts/crush-pions.mjs). */
.chip[class*="type-"] {
  --mascot-size: 100% 100%;
  --mascot-position: center;
  --chip-angle: 0deg;
  border: 0;
  border-radius: 50%;
  background: none;
  box-shadow: 0 2px 5px #000b;
}

.chip[class*="type-"]::before {
  inset: 0;
  border-radius: 50%;
}

.chip[class*="type-"]::after { display: none; }
.chip[class*="type-"]:is(.power-laser-h, .power-laser-v, .power-bomb, .power-disco)::after,
.crush-cell:is(.power-laser-h, .power-laser-v, .power-bomb, .power-disco) .chip[class*="type-"]::after { display: grid; }

.chip.type-0 { --mascot-image: url("/crush/assets/pions/pion-1.webp?v=pions1"); --chip-neon: #8a2be2; --chip-tint: #8a2be2; }
.chip.type-1 { --mascot-image: url("/crush/assets/pions/pion-2.webp?v=pions1"); --chip-neon: #ffd600; --chip-tint: #ffd600; }
.chip.type-2 { --mascot-image: url("/crush/assets/pions/pion-3.webp?v=pions1"); --chip-neon: #00e5ff; --chip-tint: #00e5ff; }
.chip.type-3 { --mascot-image: url("/crush/assets/pions/pion-4.webp?v=pions1"); --chip-neon: #ff2e93; --chip-tint: #ff2e93; }
.chip.type-4 { --mascot-image: url("/crush/assets/pions/pion-5.webp?v=pions1"); --chip-neon: #00e676; --chip-tint: #00e676; }
.chip.type-5 { --mascot-image: url("/crush/assets/pions/pion-6.webp?v=pions1"); --chip-neon: #ff9100; --chip-tint: #ff9100; }

.crush-board { --clear-duration: 200ms; }
.crush-board.is-power-clear { --clear-duration: 240ms; }
[data-fx="low"] .crush-board { --clear-duration: 140ms; }

.crush-cell.is-clearing .chip[class*="type-"] {
  animation: pion-glow var(--clear-duration) cubic-bezier(.16,.67,.34,1) both;
}

@keyframes pion-glow {
  0% { opacity: 1; scale: 1; filter: brightness(1); box-shadow: 0 0 0 0 var(--chip-neon); }
  35% { opacity: 1; scale: 1.12; filter: brightness(1.45); box-shadow: 0 0 14px 4px var(--chip-neon); }
  60% { opacity: 1; scale: 1.18; filter: brightness(1.7); box-shadow: 0 0 22px 8px var(--chip-neon); }
  100% { opacity: 0; scale: .3; filter: brightness(2); box-shadow: 0 0 0 0 transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .crush-cell.is-clearing .chip[class*="type-"] { animation: none; opacity: .38; }
}

.brand-mascot > .chip {
  width: 100%;
  background: none;
  box-shadow: none;
  border: 0;
}

.brand-mascot > .chip::after { display: none; }

[data-fx="normal"] .crush-cell.is-selected .chip::before {
  animation: mascot-react .31s ease-out;
}

@keyframes mascot-react {
  30% { transform: rotate(calc(var(--chip-angle) - 7deg)) scale(1.05,.88); }
  72% { transform: rotate(calc(var(--chip-angle) + 3deg)) scale(.94,1.06); }
}

@media (prefers-reduced-motion: reduce) {
  [data-fx="normal"] .crush-cell.is-selected .chip::before { animation: none; }
}

#guide .intro-mascot {
  display: block;
  width: auto;
  height: min(28vh, 245px);
  max-width: 92%;
  object-fit: contain;
  margin: -.15rem auto .65rem;
  filter: drop-shadow(0 0 21px #a44bfd6e);
  animation: mascot-enter .44s cubic-bezier(.17,.76,.32,1.22) both;
}

.board-wrap .celebration img { object-fit: contain; }

@keyframes mascot-enter {
  from { opacity: 0; transform: translateY(12px) rotate(-4deg) scale(.92); }
  to { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  #guide .intro-mascot { animation: none; }
}
