.bonus-box {
  position: relative;
  width: min(900px, calc(100% - 40px));
  margin: 25px auto;
  padding: clamp(13px, 3vw, 22px);
  color: var(--bar-text, #fff);
  background: var(--bar, #2308c5);
  border: 3px dashed var(--glint, #ff42b4);
  box-shadow: 0 0 0 2px var(--deep, #180b32), 5px 6px 0 var(--ink, #211359);
}
.bonus-box .bonus-heading {
  margin: 0 0 16px;
  max-width: 23ch;
  font: 900 clamp(1.2rem, 4vw, 1.9rem)/1.06 Georgia, serif;
  color: inherit;
}
.bonus-box .bonus-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.bonus-box .bonus-card { min-width: 0; border: 2px solid var(--ink, #211359); background: var(--paper, #fff8dc); color: var(--ink, #211359); box-shadow: 3px 3px 0 var(--accent, #e8ff00); }
.bonus-box button { font: inherit; cursor: pointer; }
.bonus-box button:focus-visible { outline: 3px dashed currentColor; outline-offset: 3px; }
.bonus-box .bonus-wrapper { display: grid; grid-template-columns: 58px minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; gap: 2px 11px; width: 100%; padding: 11px; border: 0; color: var(--ink, #211359); background: var(--paper, #fff8dc); text-align: start; min-height: 88px; }
.bonus-box .bonus-wrapper:hover { background: color-mix(in srgb, var(--paper, #fff8dc), var(--accent, #e8ff00) 13%); }
.bonus-box .bonus-wrapper[aria-expanded="true"] { border-bottom: 2px dashed currentColor; }
.bonus-box .bonus-wrapped-art { grid-row: 1 / 3; width: 58px; height: 58px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(2px 3px 0 #160b3433); }
.bonus-box .bonus-eyebrow { font: 700 .64rem/1.2 Verdana, sans-serif; letter-spacing: .03em; opacity: .8; }
.bonus-box .bonus-name { font: 800 clamp(.78rem, 2.1vw, .92rem)/1.25 Verdana, sans-serif; overflow-wrap: anywhere; }
.bonus-box .bonus-reveal { padding: 13px 12px 10px; text-align: center; }
.bonus-box .bonus-reveal[hidden] { display: none; }
.bonus-box .bonus-arriving { animation: bonus-unwrapped 200ms ease-out both; }
.bonus-box .bonus-memory { position: relative; display: inline-block; max-width: 100%; margin: 0 auto 8px; padding: 6px 6px 13px; background: #fffaf1; border: 2px solid var(--ink, #211359); box-shadow: 3px 3px 0 var(--glint, #ff42b4); }
.bonus-box .bonus-memory-photo { display: block; width: 100%; max-height: 135px; min-height: 65px; object-fit: contain; filter: none; }
.bonus-box .bonus-memory-postcard { transform: rotate(-3deg); border-width: 5px; border-image: repeating-linear-gradient(45deg, var(--bar, #2308c5) 0 9px, #fffaf1 9px 16px, var(--glint, #ff42b4) 16px 24px, #fffaf1 24px 31px) 5; }
.bonus-box .bonus-memory-envelope { padding: 10px 11px 15px; background: #ffe9ad; transform: rotate(2deg); }
.bonus-box .bonus-memory-envelope::after { content: ""; position: absolute; inset: auto 0 0; height: 14px; background: linear-gradient(28deg, #edc673 49%, transparent 51%), linear-gradient(-28deg, #f5d58b 49%, transparent 51%); pointer-events: none; }
.bonus-box .bonus-memory-print { border-top-width: 12px; border-top-color: #434052; box-shadow: 0 -5px 0 #211b2f, 3px 4px 0 var(--accent-two, #53ffb0); }
.bonus-box .bonus-caption { max-width: 32ch; margin: 6px auto 0; color: #211b2f; font: .74rem/1.35 Verdana, sans-serif; white-space: pre-wrap; overflow-wrap: anywhere; }
.bonus-box .bonus-view, .bonus-box .bonus-replay { display: block; min-height: 40px; margin: 6px auto 0; padding: 5px 10px; color: var(--accent-ink, #20116a); background: var(--accent, #e8ff00); border: 2px solid var(--ink, #211359); box-shadow: 2px 2px 0 var(--ink, #211359); font: 800 .75rem/1.3 Verdana, sans-serif; }
.bonus-box .bonus-replay[aria-disabled="true"] { cursor: default; opacity: .6; }
.bonus-box .bonus-rewrap { display: block; min-height: 36px; margin: 7px auto 0; padding: 4px 7px; border: 0; color: var(--ink, #211359); background: transparent; text-decoration: underline; font: .7rem/1.3 Verdana, sans-serif; }
.bonus-box .bonus-empty { font: .8rem/1.4 Verdana, sans-serif; }
.bonus-box .bonus-theatre { position: relative; height: 126px; overflow: hidden; margin: 0 auto; border: 2px solid var(--ink, #211359); background: #211039; }
.bonus-box .bonus-status { min-height: 3.6em; margin: 8px 0 0; font: 700 .74rem/1.3 Verdana, sans-serif; }
.bonus-box .bonus-orbit-star { position: absolute; color: #ffe861; font-size: 22px; left: 18%; top: 18px; }
.bonus-box .bonus-orbit-star.two { left: auto; right: 17%; top: 67px; font-size: 16px; color: #ff95d5; }
.bonus-box .bonus-moon { position: absolute; width: 32px; height: 32px; right: 16%; top: 15px; background: #fff1b6; box-shadow: -6px 0 0 #fff1b6, 0 6px 0 #fff1b6; }
.bonus-box .bonus-moon::after { content: ""; position: absolute; width: 8px; height: 8px; top: 8px; left: 7px; background: #d8c58e; box-shadow: 10px 11px 0 #d8c58e; }
.bonus-box .bonus-rocket { position: absolute; left: calc(50% - 25px); bottom: 9px; width: 50px; height: 75px; }
.bonus-box .bonus-rocket img { position: relative; z-index: 1; width: 50px; height: 58px; object-fit: contain; image-rendering: pixelated; }
.bonus-box .bonus-flame { display: block; position: absolute; width: 12px; height: 22px; left: 19px; top: 48px; background: #ff9b25; box-shadow: 4px 7px 0 #ffe463, -4px 7px 0 #ffe463; }
.bonus-box .bonus-playing .bonus-rocket { animation: bonus-orbit 1450ms cubic-bezier(.3,.05,.5,1) both; }
.bonus-box .bonus-finished .bonus-rocket { transform: rotate(12deg); }
.bonus-box .bonus-finished .bonus-flame { display: none; }
.bonus-box .bonus-machine { position: absolute; width: 76px; height: 101px; left: calc(50% - 71px); bottom: 0; background: #fa5a9d; border: 5px solid #fdf3b5; box-shadow: 5px 0 0 #922c66; }
.bonus-box .bonus-machine-globe { display: block; position: absolute; left: 6px; right: 6px; top: 5px; height: 42px; background: #b9f8ff; border: 3px solid #231039; }
.bonus-box .bonus-machine-globe i { position: absolute; width: 11px; height: 11px; left: 5px; top: 9px; background: #fbd34b; box-shadow: 12px -4px 0 #ff69a6, 24px 8px 0 #af77ed; }
.bonus-box .bonus-machine-knob { position: absolute; width: 14px; height: 14px; background: #ffe36e; border: 3px solid #211039; top: 54px; left: 24px; }
.bonus-box .bonus-machine-slot { position: absolute; width: 25px; height: 12px; background: #211039; bottom: 3px; left: 18px; }
.bonus-box .bonus-capsule-ball { position: absolute; left: calc(50% - 40px); bottom: 4px; width: 20px; height: 20px; border: 2px solid #211039; border-radius: 50%; background: linear-gradient(#ffdc51 50%, #fff9d9 50%); opacity: 0; }
.bonus-box .bonus-capsule-prize { position: absolute; right: 8px; top: 19px; display: grid; justify-items: center; opacity: 0; width: 78px; color: #fff5b5; }
.bonus-box .bonus-capsule-prize img { width: 47px; height: 47px; object-fit: contain; image-rendering: pixelated; }
.bonus-box .bonus-capsule-prize b { font: 700 .55rem/1.1 Verdana, sans-serif; text-align: center; margin-top: 5px; }
.bonus-box .bonus-playing .bonus-machine-knob { animation: bonus-knob 600ms steps(3) both; }
.bonus-box .bonus-playing .bonus-capsule-ball { animation: bonus-drop 800ms 180ms both; }
.bonus-box .bonus-playing .bonus-capsule-prize { animation: bonus-prize 350ms 700ms both; }
.bonus-box .bonus-finished .bonus-capsule-prize { opacity: 1; }
.bonus-box .bonus-stamp-paper { position: absolute; width: 122px; height: 92px; left: calc(50% - 61px); bottom: 6px; padding: 14px 12px; background: #fff5cd; box-shadow: 4px 5px 0 #a48fc1; transform: rotate(-7deg); }
.bonus-box .bonus-stamp-paper > i { display: block; width: 70%; height: 3px; background: #b2a9b4; margin-bottom: 6px; }
.bonus-box .bonus-stamp-mark { display: grid; place-items: center; position: absolute; inset: 23px 5px 12px; color: #c52163; border: 3px solid #c52163; transform: rotate(-10deg); opacity: 0; font: 900 .7rem/1.1 Verdana, sans-serif; }
.bonus-box .bonus-stamp-handle { position: absolute; width: 48px; height: 18px; left: calc(50% - 24px); top: -30px; background: #dc4786; box-shadow: 0 12px 0 #402345, -11px 24px 0 #402345, 11px 24px 0 #402345; }
.bonus-box .bonus-playing .bonus-stamp-handle { animation: bonus-whack 850ms both; }
.bonus-box .bonus-playing .bonus-stamp-mark { animation: bonus-prize 160ms 490ms both; }
.bonus-box .bonus-finished .bonus-stamp-mark { opacity: 1; }
@keyframes bonus-unwrapped { from { opacity: .3; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bonus-orbit { 0% { transform: translate(0,0) rotate(0); } 35% { transform: translate(23px,-130px) rotate(20deg); } 36% { opacity: 0; } 65% { opacity: 0; transform: translate(-56px,-140px) rotate(-25deg); } 66% { opacity: 1; } 100% { transform: translate(0,0) rotate(12deg); } }
@keyframes bonus-knob { to { transform: rotate(180deg); } }
@keyframes bonus-drop { 0% { opacity: 1; transform: translate(0,-27px); } 70% { opacity: 1; transform: translate(50px,0) rotate(240deg); } 100% { opacity: 0; transform: translate(50px,0); } }
@keyframes bonus-prize { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }
@keyframes bonus-whack { 0% { transform: translateY(0); } 60% { transform: translateY(65px); } 74% { transform: translateY(53px); } 100% { transform: translateY(-30px); } }
.motion-off .bonus-box .bonus-arriving, .motion-off .bonus-box .bonus-playing * { animation: none !important; }
@media (max-width: 520px) {
  .bonus-box { width: calc(100% - 36px); padding: 13px 10px; margin-block: 20px; }
  .bonus-box .bonus-cards { gap: 10px; }
  .bonus-box .bonus-wrapper { grid-template-columns: 1fr; justify-items: center; gap: 5px; padding: 10px 7px; min-height: 139px; text-align: center; }
  .bonus-box .bonus-wrapped-art { grid-row: auto; width: 48px; height: 48px; }
  .bonus-box .bonus-eyebrow { font-size: .57rem; }
  .bonus-box .bonus-name { font-size: .72rem; }
  .bonus-box .bonus-reveal { padding: 10px 7px 8px; }
  .bonus-box .bonus-memory-photo { max-height: 100px; }
  .bonus-box .bonus-theatre { height: 118px; }
  .bonus-box .bonus-status { min-height: 5.2em; font-size: .67rem; }
  .bonus-box .bonus-rewrap { font-size: .65rem; }
  .bonus-box .bonus-view, .bonus-box .bonus-replay { font-size: .67rem; padding-inline: 6px; }
  .bonus-box .bonus-capsule-prize { right: 0; width: 60px; top: 21px; }
  .bonus-box .bonus-machine { left: 8px; transform: scale(.8); transform-origin: bottom left; }
  .bonus-box .bonus-capsule-ball { left: 34px; }
  .bonus-box .bonus-capsule-prize img { width: 37px; height: 37px; }
  .bonus-box .bonus-capsule-prize b { font-size: .45rem; }
  .bonus-box .bonus-moon { right: 7%; width: 24px; height: 24px; }
  .bonus-box .bonus-orbit-star { left: 10%; }
  .bonus-box .bonus-stamp-paper { width: 90px; left: calc(50% - 45px); }
}
