@import url('https://fonts.googleapis.com/css2?family=Bungee&family=Fredoka:wght@500;600;700&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overscroll-behavior: none; }
body {
  background: radial-gradient(ellipse at center, #1c5c2a 0%, #0a2a14 100%);
  color: #fff;
  font-family: 'Fredoka', sans-serif;
  display: flex; flex-direction: column;
  align-items: center;
  min-height: 100dvh;
  padding: 12px 10px;
  gap: 8px;
  user-select: none; -webkit-user-select: none;
}

/* ============ Scoreboard ============ */
.scorebar {
  display: flex; gap: 16px; align-items: center;
  padding-top: env(safe-area-inset-top, 4px);
}
.chip { display: flex; align-items: center; gap: 8px; }
.chip .pfp {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid #fff;
  display: grid; place-items: center;
  font-family: 'Bungee'; font-size: 16px;
  box-shadow: 0 3px 0 rgba(0,0,0,.3);
}
.chip.cpu .pfp { background: #d6324a; color: #fff; }
.chip.you .pfp { background: #f5c518; color: #1a1814; }
.chip .info { font-family: 'Bungee'; line-height: 1; }
.chip .lbl { font-size: 9px; letter-spacing: .18em; opacity: .75; }
.chip .score { font-size: 22px; margin-top: 2px; text-shadow: 2px 2px 0 rgba(0,0,0,.3); }
.vs { font-family: 'Bungee'; font-size: 16px; color: rgba(255,255,255,.4); }
.chip.serving .pfp { box-shadow: 0 3px 0 rgba(0,0,0,.3), 0 0 0 3px #f5c518; }

/* ============ Opponent hand peek ============ */
.opp-hand {
  display: flex; align-items: center; min-height: 38px;
  padding-top: 2px;
}
.opp-hand .back {
  width: 28px; height: 38px; margin: 0 -7px;
  background: linear-gradient(135deg, #d6324a 50%, #b41635 50%);
  border: 2px solid #fff; border-radius: 4px;
  box-shadow: 0 2px 0 rgba(0,0,0,.3);
  position: relative;
}
.opp-hand .back::after {
  content: 'D'; position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: 'Bungee'; font-size: 14px; color: #fff;
  transform: rotate(-12deg);
}

/* ============ Stage (Three.js scene) ============ */
.stage-wrap {
  position: relative;
  width: 100%; max-width: 440px;
  display: flex; align-items: center; justify-content: center;
}
.stage-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 4px solid #fff;
  border-radius: 16px;
  overflow: hidden;
  background: #0d2818;
  box-shadow: 0 8px 0 rgba(0,0,0,.4), 0 0 40px rgba(0,0,0,.5);
}
#scene { display: block; width: 100%; height: 100%; }

.stage-overlay {
  position: absolute; inset: 0;
  pointer-events: none;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 10px 12px;
}
.banner {
  align-self: center;
  min-height: 28px;
  font-family: 'Bungee'; font-size: 13px; letter-spacing: .25em;
  background: rgba(0,0,0,.7);
  color: #fff;
  padding: 6px 16px;
  border-radius: 14px;
  border: 3px solid rgba(255,255,255,.6);
  box-shadow: 0 4px 0 rgba(0,0,0,.4);
  opacity: 0; transform: translateY(-12px) scale(.9);
  transition: opacity .2s, transform .25s cubic-bezier(.34, 1.5, .65, 1);
}
.banner.show { opacity: 1; transform: translateY(0) scale(1); }
.banner.cpu { background: linear-gradient(180deg, #d6324a, #b41635); border-color: #fff; text-shadow: 1px 1px 0 rgba(0,0,0,.4); }
.banner.you { background: linear-gradient(180deg, #f5c518, #d6a300); color: #1a1814; border-color: #fff; text-shadow: 1px 1px 0 rgba(255,255,255,.4); }

.verdict {
  align-self: center;
  text-align: center;
  font-family: 'Bungee'; font-size: 18px; letter-spacing: .03em;
  text-shadow: 2px 2px 0 #000, 0 0 12px rgba(0,0,0,.5);
  padding: 6px 12px;
  max-width: 90%;
  line-height: 1.2;
}
.verdict.beat { animation: verdict-beat .35s ease-out; }
@keyframes verdict-beat {
  0%   { transform: scale(.92); opacity: .6; }
  60%  { transform: scale(1.06); }
  100% { transform: scale(1); opacity: 1; }
}
.verdict b { color: #f5c518; }
.verdict .pop {
  display: block; font-size: 34px; line-height: 1;
  text-shadow: 3px 3px 0 #000, 0 0 18px rgba(255,255,255,.4);
  margin-bottom: 4px;
  animation: popBounce .35s ease-out;
}
.verdict .sub {
  display: block; font-family: 'Fredoka'; font-weight: 700;
  font-size: 10px; letter-spacing: .25em; opacity: .85;
  margin-top: 4px;
}
.verdict .shot {
  display: block; font-size: 15px; letter-spacing: .04em;
  margin-bottom: 3px;
}
.verdict .eff {
  display: block; font-family: 'Fredoka'; font-weight: 600;
  font-size: 14px; letter-spacing: .01em;
  text-shadow: 1px 1px 0 #000;
}
.verdict .you { color: #f5c518; }
.verdict .cpu { color: #ff5c8a; }
.verdict .good { color: #6ad99e; }
.verdict .bad { color: #ff5c8a; }
.verdict .flat { color: #cdbf9e; opacity: .85; }
@keyframes popBounce {
  0% { transform: scale(.4); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

/* ============ My side strip: deck | rally-info | discard ============ */
.my-side {
  width: 100%; max-width: 440px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 4px 4px 0;
}
.pile {
  position: relative;
  width: 46px; height: 64px;
}
.pile .b {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #1a1a2e 50%, #0d0d1e 50%);
  border: 2px solid #fff; border-radius: 6px;
  box-shadow: 0 3px 0 rgba(0,0,0,.4);
}
.pile .b:nth-child(1) { transform: rotate(-6deg) translateY(2px); }
.pile .b:nth-child(2) { transform: rotate(-3deg) translateY(1px); }
.pile .b:nth-child(3) { transform: rotate(0); }
.pile .m {
  position: absolute; width: 40px; height: 58px;
  border: 2px solid #fff; border-radius: 5px;
  box-shadow: 0 2px 0 rgba(0,0,0,.4);
}
.pile.discard .m:nth-child(1) { background: #d6324a; transform: rotate(-6deg); top: 4px; left: 0; }
.pile.discard .m:nth-child(2) { background: #2b6ce5; transform: rotate(4deg); top: 2px; left: 4px; }
.pile .lbl {
  position: absolute; bottom: -16px; left: 50%; transform: translateX(-50%);
  font-family: 'Bungee'; font-size: 8px; letter-spacing: .12em;
  color: rgba(255,255,255,.7);
  white-space: nowrap;
}

/* Rally info chip: RALLY counter + horizontal log of shots so far */
.rally-info {
  display: flex; align-items: stretch; gap: 6px;
  background: rgba(0,0,0,.42);
  border: 2px solid rgba(255,255,255,.25);
  border-radius: 10px;
  padding: 4px 6px 4px 8px;
  min-height: 50px;
  overflow: hidden;
}
.ri-num {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  padding: 0 6px 0 0;
  border-right: 1px solid rgba(255,255,255,.18);
  min-width: 36px;
}
.ri-num-k {
  font-family: 'Bungee'; font-size: 7px; letter-spacing: .18em;
  color: rgba(255,255,255,.55);
}
.ri-num-v {
  font-family: 'Bungee'; font-size: 18px; line-height: 1;
  color: #fff; margin-top: 2px;
  text-shadow: 1px 1px 0 rgba(0,0,0,.4);
}

.rally-strip {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 4px;
  overflow-x: auto; overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 2px 2px;
}
.rally-strip::-webkit-scrollbar { display: none; }
.rally-strip:empty::before {
  content: '— no shots yet —';
  font-family: 'Bungee'; font-size: 9px; letter-spacing: .15em;
  color: rgba(255,255,255,.35);
}
.rs {
  flex: 0 0 auto;
  font-family: 'Bungee';
  padding: 4px 6px 5px;
  border-radius: 7px;
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(255,255,255,.18);
  color: #fff;
  white-space: nowrap;
  display: inline-flex; flex-direction: column; align-items: center;
  gap: 1px;
  min-width: 44px;
  animation: rs-in .26s ease-out;
}
.rs .rs-side { font-size: 7px; letter-spacing: .12em; color: rgba(255,255,255,.7); }
.rs .rs-play { font-size: 10px; letter-spacing: .04em; color: #fff; }
.rs .rs-roll { font-size: 11px; color: rgba(255,255,255,.9); }
.rs.me { border-color: rgba(245,197,24,.6); background: rgba(245,197,24,.12); }
.rs.cpu { border-color: rgba(255,92,138,.6); background: rgba(255,92,138,.12); }
.rs.me .rs-side  { color: #f5c518; }
.rs.cpu .rs-side { color: #ff5c8a; }
.rs.dink  { box-shadow: inset 0 -3px 0 rgba(92,200,255,.7); }
.rs.drive { box-shadow: inset 0 -3px 0 rgba(255,122,138,.7); }
.rs.lob   { box-shadow: inset 0 -3px 0 rgba(245,197,24,.7); }
@keyframes rs-in {
  from { transform: translateX(8px) scale(.85); opacity: 0; }
  to   { transform: translateX(0) scale(1); opacity: 1; }
}

/* ============ Roll prompt overlay (hold-to-roll) ============ */
.roll-prompt {
  position: absolute;
  left: 50%; bottom: 14%;
  transform: translateX(-50%);
  opacity: 0; pointer-events: none;
  transition: opacity .18s ease;
  z-index: 4;
}
.roll-prompt.show { opacity: 1; pointer-events: auto; }
.roll-btn {
  font-family: 'Bungee';
  background: linear-gradient(180deg, #f5c518 0%, #d99e08 100%);
  color: #1a1814;
  border: 3px solid #fff;
  border-radius: 14px;
  padding: 10px 22px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  box-shadow: 0 6px 0 rgba(0,0,0,.5), 0 0 22px rgba(245,197,24,.55);
  cursor: pointer;
  user-select: none;
  touch-action: none;
  transition: transform .08s ease, box-shadow .08s ease, background .15s ease;
  animation: roll-pulse 1.4s ease-in-out infinite;
}
.roll-btn .rb-top { font-size: 16px; letter-spacing: .1em; }
.roll-btn .rb-bot { font-size: 8px; letter-spacing: .18em; color: rgba(26,24,20,.65); }
.roll-btn.charging,
.roll-btn:active {
  background: linear-gradient(180deg, #ffe566 0%, #f5c518 100%);
  transform: translateY(4px) scale(1.04);
  box-shadow: 0 2px 0 rgba(0,0,0,.5), 0 0 36px rgba(255,229,102,.85);
  animation: roll-shake .07s linear infinite;
}
@keyframes roll-pulse {
  0%, 100% { box-shadow: 0 6px 0 rgba(0,0,0,.5), 0 0 22px rgba(245,197,24,.55); }
  50%      { box-shadow: 0 6px 0 rgba(0,0,0,.5), 0 0 40px rgba(245,197,24,.85); }
}
@keyframes roll-shake {
  0%   { transform: translate(-1px, 4px) scale(1.04); }
  50%  { transform: translate(1px, 5px) scale(1.05); }
  100% { transform: translate(-1px, 4px) scale(1.04); }
}

/* ============ Pressure bar ============ */
.pressure {
  display: flex; align-items: center; gap: 8px;
  width: 100%; max-width: 380px;
}
.pressure .end {
  font-family: 'Bungee'; font-size: 9px; letter-spacing: .1em;
  display: flex; flex-direction: column; align-items: center; line-height: 1;
  white-space: nowrap;
}
.pressure .end .crack { font-size: 6px; opacity: .7; letter-spacing: .15em; margin-top: 2px; }
.pressure .end.l { color: #ff5c8a; }
.pressure .end.r { color: #f5c518; }
.pressure .track {
  flex: 1; height: 14px;
  background: linear-gradient(
    90deg,
    rgba(255,92,138,.45) 0%,
    rgba(255,92,138,.18) 18%,
    rgba(255,255,255,.10) 30%,
    rgba(255,255,255,.10) 70%,
    rgba(245,197,24,.18) 82%,
    rgba(245,197,24,.45) 100%
  );
  border: 2px solid #fff;
  border-radius: 8px;
  position: relative;
  overflow: visible;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.4);
}
.pressure .track::before {
  content: ''; position: absolute;
  left: 50%; top: -2px; bottom: -2px; width: 2px;
  background: rgba(255,255,255,.4);
}
.pressure .marker {
  position: absolute; top: 50%;
  left: 50%; transform: translate(-50%, -50%);
  width: 24px; height: 24px;
  background: #fff;
  border: 2px solid #1a1814;
  border-radius: 50%;
  box-shadow: 0 0 12px #fff, 0 2px 4px rgba(0,0,0,.5);
  transition: left .6s cubic-bezier(.4, 1.4, .5, 1), background .2s;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bungee'; font-size: 11px; color: #1a1814;
  z-index: 2;
}
.pressure .marker::after {
  content: attr(data-adv);
}
.pressure .marker.danger { background: #ff5c8a; color: #fff; box-shadow: 0 0 14px #ff5c8a, 0 2px 4px rgba(0,0,0,.5); }
.pressure .marker.win-zone { background: #f5c518; color: #1a1814; box-shadow: 0 0 14px #f5c518, 0 2px 4px rgba(0,0,0,.5); }

/* ============ Hand ============ */
.play-area {
  display: flex; flex-direction: column; align-items: center;
  width: 100%;
}
.hand-label {
  font-family: 'Bungee'; font-size: 10px; letter-spacing: .25em;
  color: rgba(255,255,255,.7);
  margin-bottom: 6px;
  text-align: center;
}
.hand {
  display: flex; justify-content: center;
  perspective: 1000px;
  min-height: 130px;
  padding: 4px;
}
.hand.dim .card { filter: brightness(.85); }

.card {
  width: 78px; height: 114px; margin: 0 -14px;
  border: 3px solid #fff; border-radius: 10px;
  box-shadow: 0 8px 16px rgba(0,0,0,.55);
  cursor: pointer;
  transform-origin: bottom center;
  transition: transform .18s ease;
  position: relative;
  overflow: hidden;
}
.card:disabled { cursor: not-allowed; }
.card.dink  { background: #2b6ce5; }
.card.drive { background: #d6324a; }
.card.lob   { background: #f5c518; color: #1a1814; }

/* Top-left corner: only thing here. Big bold initial. */
.card .corner {
  position: absolute; top: 5px; left: 7px;
  font-family: 'Bungee'; font-size: 16px; line-height: 1;
  color: #fff;
  letter-spacing: .04em;
}
.card.lob .corner { color: #1a1814; }

/* Big white oval w/ tilted icon — UNO-style. */
.card .center {
  position: absolute;
  top: 42%; left: 50%; transform: translate(-50%, -50%) rotate(-18deg);
  background: #fff;
  width: 58px; height: 38px;
  border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
}
.card .center .big { font-size: 24px; transform: rotate(18deg); }

/* Card name at bottom, big. */
.card .label {
  position: absolute;
  bottom: 8px; left: 0; right: 0;
  font-family: 'Bungee'; font-size: 13px; letter-spacing: .08em;
  color: #fff;
  text-align: center;
  text-shadow: 1px 1px 0 rgba(0,0,0,.35);
}
.card.lob .label { color: #1a1814; text-shadow: 1px 1px 0 rgba(255,255,255,.4); }
.card:hover:not(:disabled) { transform: translateY(-26px) rotate(0) scale(1.1) !important; z-index: 99; }
.card.leaving { animation: card-fly .35s ease-out forwards; pointer-events: none; transform: none !important; }
@keyframes card-fly {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-200px) scale(.6); opacity: 0; }
}

/* Fan rotation handled via inline style by ui.js so it works for 1-7 cards */

/* ============ Action buttons ============ */
.actions {
  display: flex; gap: 10px; align-items: center;
  padding-bottom: env(safe-area-inset-bottom, 8px);
  margin-top: 4px;
}
.btn {
  font: inherit;
  font-family: 'Bungee';
  font-size: 13px; letter-spacing: .18em;
  padding: 10px 22px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: #f5c518; color: #1a1814;
  box-shadow: 0 4px 0 rgba(0,0,0,.4);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0,0,0,.4); }
.btn.primary { background: #f5c518; color: #1a1814; }
.btn.ghost { background: rgba(255,255,255,.15); color: #fff; padding: 10px 14px; }
/* Dark-outlined button for light/white modal backgrounds (ghost is white-on-white there). */
.btn.secondary { background: rgba(26,24,20,.06); color: #1a1814; border-color: #1a1814; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ============ Modals ============ */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.7);
  display: none; align-items: center; justify-content: center;
  padding: 20px; z-index: 99;
}
.modal.open { display: flex; }
.modal-box {
  background: #fff; color: #1a1814; border-radius: 18px;
  padding: 22px 22px 18px; max-width: 360px; width: 100%;
  text-align: center;
  box-shadow: 0 12px 0 rgba(0,0,0,.4);
  border: 4px solid #1a1814;
}
.modal-box h2 { font-family: 'Bungee'; font-size: 22px; letter-spacing: .1em; margin-bottom: 8px; }
.modal-box .final { font-family: 'Bungee'; font-size: 44px; margin: 6px 0; }
.modal-box .reason { font-size: 14px; color: #5a5747; margin-bottom: 14px; }
.modal-box .btn { margin-top: 8px; }
.rules { text-align: left; margin: 4px 0 12px; padding-left: 16px; font-size: 13px; line-height: 1.55; }
.rules li { margin: 2px 0; }
.c-dink { color: #2b6ce5; }
.c-drive { color: #d6324a; }
.c-lob { color: #c89000; }
.c-you { color: #c89000; }
.c-cpu { color: #d6324a; }

/* How-to-play (long-form, scrollable) */
.how-box { max-width: 380px; }
.rules-scroll {
  text-align: left;
  max-height: 60vh;
  overflow-y: auto;
  margin: 4px -6px 12px;
  padding: 4px 8px 8px;
}
.rules-scroll p {
  font-size: 13px; line-height: 1.55; margin: 4px 0 10px;
}
.rules-h {
  font-family: 'Bungee'; font-size: 11px; letter-spacing: .12em;
  color: #1a1814; margin: 14px 0 4px;
  padding-bottom: 2px;
  border-bottom: 2px solid rgba(26,24,20,.12);
}
.rules-h:first-child { margin-top: 0; }
.rules-note {
  font-size: 12px; font-style: italic; color: #5a5747;
  margin-top: -2px !important;
}
.how-foot { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.how-foot .btn { margin-top: 8px; }

/* ============ Onboarding tutorial ============ */
.tut-box { position: relative; max-width: 340px; }
.tut-skip {
  position: absolute; top: 10px; right: 12px;
  background: none; border: none; cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .08em;
  color: #6b6356; text-transform: uppercase; padding: 4px 6px;
}
.tut-skip:active { transform: translateY(1px); }
.tut-visual {
  font-size: 54px; line-height: 1;
  margin: 6px 0 10px; min-height: 56px;
  display: grid; place-items: center;
}
.tut-box h2 { margin-bottom: 10px; }
.tut-body {
  font-size: 14px; line-height: 1.55; color: #3a372e;
  min-height: 84px; margin-bottom: 14px;
}
.tut-dots { display: flex; gap: 7px; justify-content: center; margin-bottom: 14px; }
.tut-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(26,24,20,.18);
  transition: background .15s ease, transform .15s ease;
}
.tut-dot.on { background: #f5c518; transform: scale(1.25); }
.tut-nav { display: flex; gap: 10px; justify-content: center; }
.tut-nav .btn { margin-top: 0; min-width: 96px; }

/* ============ History modal ============ */
.history-box { max-width: 360px; }
.history-box .record-stats { margin: 12px 0; }
.history-box .stat-row { display: flex; justify-content: space-around; gap: 8px; }
.history-box .stat { text-align: center; }
.history-box .stat .num { font-family: 'Bungee'; font-size: 32px; line-height: 1; color: #1a1814; }
.history-box .stat .lbl { font-size: 9px; letter-spacing: .2em; color: #6b6356; margin-top: 4px; font-weight: 700; }
.history-box .stat-row.small { margin-top: 10px; font-size: 12px; color: #6b6356; flex-direction: column; gap: 4px; }
.history-box .stat-mini { text-align: left; }
.history-box .stat-mini b { color: #1a1814; font-weight: 700; }
.history-box .empty { padding: 20px 10px; color: #6b6356; font-size: 14px; font-style: italic; }
.history-box .record-list { max-height: 300px; overflow-y: auto; margin: 12px -8px; padding: 0 8px; }
.history-box .match {
  display: grid; grid-template-columns: 40px 1fr auto;
  align-items: center; gap: 10px;
  padding: 8px 10px; margin: 6px 0; border-radius: 8px;
  background: #f5f1ea; border-left: 4px solid #ccc;
}
.history-box .match.win { border-left-color: #2a8c4a; }
.history-box .match.loss { border-left-color: #d6324a; }
.history-box .match .result {
  font-family: 'Bungee'; font-size: 24px; line-height: 1;
  text-align: center;
}
.history-box .match.win .result { color: #2a8c4a; }
.history-box .match.loss .result { color: #d6324a; }
.history-box .match .meta { text-align: left; }
.history-box .match .score { font-family: 'Bungee'; font-size: 16px; line-height: 1; color: #1a1814; }
.history-box .match .when { font-size: 10px; color: #6b6356; margin-top: 3px; }
.history-box .match .srv { font-size: 9px; color: #6b6356; letter-spacing: .12em; text-transform: uppercase; text-align: right; }

/* Roll display flying to card / chip */
.roll-flyer {
  position: fixed;
  background: #fff; color: #d6324a;
  border-radius: 50%;
  border: 3px solid #1a1814;
  display: grid; place-items: center;
  font-family: 'Bungee'; font-size: 18px;
  width: 44px; height: 44px;
  box-shadow: 0 4px 14px rgba(0,0,0,.4);
  transition: transform .45s cubic-bezier(.34, 1.45, .65, 1), opacity .35s;
  z-index: 100; pointer-events: none;
}
.roll-flyer.win  { color: #2a8c4a; }
.roll-flyer.fail { color: #d6324a; }

/* Score chip ping when scored */
.chip.scored { animation: scorePop .5s ease-out; }
@keyframes scorePop {
  0% { transform: scale(1); }
  40% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Stage flash on big events */
.stage-frame.flash-good { animation: flashGood .35s ease-out; }
.stage-frame.flash-bad  { animation: flashBad .35s ease-out; }
@keyframes flashGood { 50% { box-shadow: 0 8px 0 rgba(0,0,0,.4), 0 0 60px rgba(106,217,158,.8); } }
@keyframes flashBad  { 50% { box-shadow: 0 8px 0 rgba(0,0,0,.4), 0 0 60px rgba(214,50,74,.8); } }
.stage-frame.shake { animation: shake .35s; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-6px) translateY(2px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}
