.scene-emergency {
  background:
    radial-gradient(42rem 32rem at 50% 4%, rgba(230, 195, 182, 0.26), transparent 72%),
    linear-gradient(180deg, #f8f0ea 0%, #f5ece8 100%);
}

.panel {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 36px 24px;
}

.panel__inner {
  width: min(100%, 420px);
  display: grid;
  justify-items: center;
  gap: 20px;
  text-align: center;
}

.panel__title {
  max-width: 12ch;
  margin-bottom: 8px;
  color: #514845;
  font-family: var(--font-display);
  font-size: clamp(27px, 8vw, 36px);
  font-weight: 400;
  line-height: 1.16;
  text-wrap: balance;
}

.bigbtn {
  position: relative;
  width: min(48vw, 188px);
  min-width: 154px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #e4aca1 0%, #d99389 58%, #c77c73 100%);
  box-shadow:
    0 14px 34px rgba(164, 105, 95, 0.2),
    inset 0 2px 5px rgba(255, 255, 255, 0.42),
    inset 0 -7px 14px rgba(128, 72, 65, 0.12);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.bigbtn:disabled {
  pointer-events: none;
}

.bigbtn__ring {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 249, 245, 0.42);
  border-radius: 50%;
}

.bigbtn__big {
  color: #fffaf6;
  font-size: clamp(17px, 5vw, 21px);
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bigbtn:active {
  transform: translateY(3px) scale(0.985);
  box-shadow:
    0 7px 18px rgba(164, 105, 95, 0.16),
    inset 0 2px 6px rgba(255, 255, 255, 0.35),
    inset 0 -4px 9px rgba(128, 72, 65, 0.12);
}

.protocol {
  width: 100%;
  height: 100%;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 24px;
  padding: calc(13vh + var(--safe-t)) 28px 0;
  text-align: center;
}

.protocol__msg {
  max-width: 24ch;
  color: #615653;
  font-family: var(--font-display);
  font-size: clamp(19px, 5.4vw, 24px);
  font-weight: 400;
  line-height: 1.42;
  opacity: 0;
}

.scene-protocol.is-calm .protocol {
  align-content: center;
  gap: 0;
  padding-top: 0;
}

.scene-protocol.is-calm .protocol__msg {
  max-width: 20ch;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(22px, 6vw, 29px);
  font-weight: 400;
  line-height: 1.35;
}

.shatter {
  position: absolute;
  z-index: 4;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.shatter__piece {
  position: absolute;
  inset: 0;
  will-change: transform, opacity;
}

.shatter__piece .scene {
  pointer-events: none;
}

.crack {
  fill: none;
  stroke: rgba(255, 250, 245, 0.96);
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 1px rgba(168, 126, 117, 0.32));
}

.crack--ring {
  stroke: rgba(255, 250, 245, 0.84);
  stroke-width: 1;
}

.crack--thin {
  stroke: rgba(151, 121, 114, 0.3);
  stroke-width: 0.8;
  filter: none;
}

.impact-mark {
  fill: rgba(255, 250, 245, 0.94);
  stroke: rgba(168, 126, 117, 0.42);
  stroke-width: 1;
}

.shard {
  stroke: rgba(255, 250, 245, 0.7);
  stroke-width: 0.8;
}

.flash {
  opacity: 0;
  filter: blur(8px);
}

.is-shaking {
  animation: shake-sm 380ms linear;
}

.is-shaking-hard {
  animation: shake-lg 520ms linear;
}

@keyframes shake-sm {
  0%, 100% { transform: translate3d(0, 0, 0); }
  20% { transform: translate3d(-4px, 2px, 0); }
  40% { transform: translate3d(4px, -2px, 0); }
  60% { transform: translate3d(-3px, -1px, 0); }
  80% { transform: translate3d(2px, 1px, 0); }
}

@keyframes shake-lg {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  12% { transform: translate3d(-9px, 4px, 0) rotate(-0.5deg); }
  26% { transform: translate3d(9px, -5px, 0) rotate(0.5deg); }
  40% { transform: translate3d(-7px, -3px, 0) rotate(-0.35deg); }
  54% { transform: translate3d(8px, 4px, 0) rotate(0.4deg); }
  68% { transform: translate3d(-5px, 2px, 0) rotate(-0.2deg); }
  84% { transform: translate3d(4px, -2px, 0); }
}
