@property --tc-energy-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.treasure-chest {
  --tc-bg-a: #03180f;
  --tc-bg-b: #06452d;
  --tc-wood-a: #8d421f;
  --tc-wood-b: #5a2514;
  --tc-wood-c: #b95b2c;
  --tc-gold-a: #fff5a6;
  --tc-gold-b: #ffcb37;
  --tc-gold-c: #c97800;
  --tc-green-a: #083d2b;
  --tc-green-b: #031f15;
  --tc-line: rgba(28, 10, 6, .78);
  --tc-energy-angle: 0deg;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 0;
  border-radius: clamp(18px, 12%, 46px);
  overflow: hidden;
  cursor: pointer;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 43%, rgba(255, 213, 82, .18), transparent 17%),
    radial-gradient(circle at 50% 56%, #0c5a3d 0%, var(--tc-bg-b) 36%, var(--tc-bg-a) 74%, #020805 100%);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, .45),
    inset 0 0 0 1px rgba(255, 255, 255, .06),
    inset 0 -20px 55px rgba(0, 0, 0, .45);
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.treasure-chest:focus-visible {
  box-shadow:
    0 0 0 4px rgba(255, 220, 106, .28),
    0 28px 70px rgba(0, 0, 0, .45),
    inset 0 0 0 1px rgba(255, 255, 255, .06);
}

.treasure-chest::before {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, transparent, rgba(255, 226, 126, .24), transparent, rgba(70, 255, 173, .14), transparent);
  filter: blur(12px);
  opacity: .72;
  animation: tcSlowSpin 7s linear infinite;
  z-index: 0;
}

.treasure-chest::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(236,255,246,.16) 0 1px, transparent 2px),
    radial-gradient(circle at 78% 30%, rgba(187,247,208,.13) 0 1px, transparent 2px),
    radial-gradient(circle at 68% 76%, rgba(255,214,93,.12) 0 1px, transparent 2px),
    radial-gradient(circle at 28% 72%, rgba(74,222,128,.11) 0 1px, transparent 2px);
  background-size: 110px 110px, 150px 150px, 130px 130px, 170px 170px;
  animation: tcStarDrift 5s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 1;
}

.treasure-chest .magic-circle {
  position: absolute;
  left: 50%;
  bottom: 18%;
  width: 72%;
  height: 15%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255,207,64,.38), rgba(255,207,64,.08) 45%, transparent 72%);
  filter: blur(7px);
  opacity: .9;
  animation: tcCirclePulse 1.8s ease-in-out infinite;
  z-index: 2;
}

.treasure-chest .magic-circle,
.treasure-chest .inside-glow,
.treasure-chest .chest-art,
.treasure-chest .lid,
.treasure-chest .base,
.treasure-chest .band,
.treasure-chest .lock,
.treasure-chest .coin,
.treasure-chest .spark,
.treasure-chest .ring {
  box-sizing: border-box;
  display: block;
  padding: 0;
  margin: 0;
}

.treasure-chest .inside-glow {
  position: absolute;
  left: 21%;
  top: 40%;
  width: 58%;
  height: 18%;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(255,255,222,.96), rgba(255,217,82,.78) 30%, rgba(255,159,24,.15) 68%, transparent 78%);
  filter: blur(12px);
  transform: scale(.38);
  opacity: 0;
  transition: opacity 420ms ease, transform 650ms cubic-bezier(.18,.89,.28,1.45);
  pointer-events: none;
  z-index: 3;
}

.treasure-chest .chest-art {
  position: absolute;
  left: 12%;
  top: 32%;
  width: 76%;
  height: 54%;
  z-index: 5;
  perspective: 900px;
  filter: drop-shadow(0 24px 18px rgba(0,0,0,.34));
  transform-origin: 50% 80%;
}

.treasure-chest:not(.is-open) .chest-art { animation: tcChestFloat 2.35s ease-in-out infinite; }
.treasure-chest:not(.is-open):hover .chest-art { animation: tcChestTease .72s ease-in-out infinite; }
.treasure-chest.is-opening .chest-art { animation: tcOpenPop 720ms cubic-bezier(.2,.84,.2,1.25) both; }

.treasure-chest .lid {
  position: absolute;
  left: 6%;
  top: 2%;
  width: 88%;
  height: 36%;
  border: clamp(3px, .9vmin, 6px) solid var(--tc-line);
  border-radius: 28px 28px 11px 11px;
  transform-origin: 50% 100%;
  background:
    linear-gradient(90deg, transparent 0 12%, rgba(255,241,156,.72) 12% 16%, transparent 16% 84%, rgba(255,241,156,.72) 84% 88%, transparent 88%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 3px, transparent 3px 12px),
    linear-gradient(180deg, #c36a38 0%, var(--tc-wood-a) 48%, var(--tc-wood-b) 100%);
  box-shadow:
    inset 0 10px 16px rgba(255,235,179,.15),
    inset 0 -10px 14px rgba(0,0,0,.28),
    0 8px 0 rgba(53,18,9,.8);
  transition: transform 820ms cubic-bezier(.17,.92,.18,1.18), top 820ms cubic-bezier(.17,.92,.18,1.18), filter 420ms ease;
  z-index: 4;
}

.treasure-chest .lid::before {
  content: "";
  position: absolute;
  inset: 16% 7% 20%;
  border-radius: 18px 18px 8px 8px;
  background:
    linear-gradient(90deg, transparent 0 47%, rgba(70,24,11,.32) 47% 50%, transparent 50%),
    linear-gradient(180deg, rgba(255,255,255,.14), rgba(0,0,0,.1));
  border: 1px solid rgba(57,20,9,.36);
}

.treasure-chest .lid::after {
  content: "";
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: -14%;
  height: 30%;
  border-radius: 999px;
  border: clamp(3px, .9vmin, 6px) solid var(--tc-line);
  background: linear-gradient(180deg, var(--tc-gold-a), var(--tc-gold-b) 44%, var(--tc-gold-c));
  box-shadow: inset 0 4px 5px rgba(255,255,255,.35), 0 5px 9px rgba(0,0,0,.32);
}

.treasure-chest .base {
  position: absolute;
  left: 4%;
  top: 30%;
  width: 92%;
  height: 57%;
  overflow: hidden;
  border: clamp(3px, .9vmin, 6px) solid var(--tc-line);
  border-radius: 10px 10px 28px 28px;
  background:
    linear-gradient(90deg, transparent 0 14%, rgba(255,241,156,.78) 14% 18%, transparent 18% 82%, rgba(255,241,156,.78) 82% 86%, transparent 86%),
    linear-gradient(180deg, var(--tc-wood-c), var(--tc-wood-a) 45%, var(--tc-wood-b) 100%);
  box-shadow: inset 0 14px 17px rgba(255,236,181,.1), inset 0 -18px 22px rgba(0,0,0,.31);
  z-index: 3;
}

.treasure-chest .base::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 32%, rgba(67,22,9,.26) 32% 34%, transparent 34% 66%, rgba(67,22,9,.26) 66% 68%, transparent 68%),
    repeating-linear-gradient(180deg, transparent 0 32%, rgba(70,24,11,.28) 32% 34%, transparent 34% 67%, rgba(255,248,188,.05) 67% 68%);
  opacity: .9;
}

.treasure-chest .base::after {
  content: "";
  position: absolute;
  left: -4%;
  right: -4%;
  top: -3%;
  height: 22%;
  border-radius: 999px;
  border-bottom: clamp(3px, .9vmin, 6px) solid var(--tc-line);
  background: linear-gradient(180deg, var(--tc-gold-a), var(--tc-gold-b) 40%, var(--tc-gold-c));
  box-shadow: inset 0 4px 6px rgba(255,255,255,.38);
}

.treasure-chest .band {
  position: absolute;
  top: -3%;
  width: 6%;
  height: 108%;
  background: linear-gradient(90deg, var(--tc-gold-c), var(--tc-gold-a), var(--tc-gold-b) 68%, var(--tc-gold-c));
  border-left: 2px solid rgba(53,18,9,.5);
  border-right: 2px solid rgba(53,18,9,.5);
  z-index: 2;
}

.treasure-chest .band-left { left: 15%; }
.treasure-chest .band-right { right: 15%; }

.treasure-chest .lock {
  position: absolute;
  left: 50%;
  top: 18%;
  width: 18%;
  height: 34%;
  transform: translateX(-50%);
  border: clamp(3px, .75vmin, 5px) solid rgba(41,16,6,.78);
  border-radius: 9px 9px 14px 14px;
  background:
    radial-gradient(circle at 50% 36%, #fffde5 0 8%, transparent 9%),
    linear-gradient(180deg, #fff3a2, #ffd13f 43%, #c97700 100%);
  box-shadow:
    inset 0 5px 7px rgba(255,255,255,.35),
    0 0 18px rgba(255,205,67,.55),
    0 7px 0 rgba(70,22,5,.35);
  z-index: 4;
  animation: tcLockGlow 1.35s ease-in-out infinite alternate;
}

.treasure-chest .lock::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -67%;
  width: 72%;
  height: 76%;
  transform: translateX(-50%);
  border: clamp(3px, .7vmin, 5px) solid rgba(41,16,6,.75);
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  background: transparent;
}

.treasure-chest.is-open .lid {
  top: -9%;
  transform: translateY(-34%) rotateX(66deg) rotateZ(-3deg) scaleX(1.02);
  filter: brightness(1.13) drop-shadow(0 -14px 18px rgba(255,204,60,.28));
}

.treasure-chest.is-open .inside-glow {
  opacity: 1;
  transform: scale(1.24);
  animation: tcTreasureGlow 900ms ease-in-out infinite alternate;
}

.treasure-chest.is-open .lock {
  animation: none;
  box-shadow: inset 0 5px 7px rgba(255,255,255,.35), 0 0 7px rgba(255,205,67,.34), 0 7px 0 rgba(70,22,5,.35);
}

.treasure-chest .click-hint {
  position: absolute;
  left: 50%;
  bottom: 7%;
  transform: translateX(-50%);
  z-index: 18;
  max-width: calc(100% - 16px);
  padding: .65em .9em;
  border-radius: 999px;
  color: rgba(255,249,225,.94);
  background: rgba(9,5,17,.46);
  border: 1px solid rgba(255,223,112,.26);
  font-size: clamp(.72rem, 8%, .98rem);
  letter-spacing: .02em;
  text-shadow: 0 1px 0 rgba(0,0,0,.35);
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
  pointer-events: none;
  backdrop-filter: blur(8px);
  transition: transform 250ms ease, opacity 250ms ease;
  white-space: normal;
  line-height: 1.08;
}

.treasure-chest:not(.is-open):hover .click-hint { transform: translateX(-50%) translateY(-2px) scale(1.03); }

.treasure-chest .coin,
.treasure-chest .spark,
.treasure-chest .ring {
  position: absolute;
  left: 50%;
  top: 48%;
  pointer-events: none;
  z-index: 20;
}

.treasure-chest .coin {
  width: clamp(16px, 5.6%, 30px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  opacity: 0;
  background:
    radial-gradient(circle at 35% 30%, #fff9c7 0 11%, transparent 12%),
    radial-gradient(circle at 50% 50%, #ffe15c 0 48%, #e69b07 49% 69%, #9e5d00 70% 100%);
  border: 2px solid rgba(126,73,0,.75);
  box-shadow: inset -3px -4px 0 rgba(115,62,0,.25), inset 2px 2px 0 rgba(255,255,255,.34), 0 0 14px rgba(255,205,67,.56);
  animation: tcCoinFly var(--dur) cubic-bezier(.15,.8,.25,1) var(--delay) forwards;
}

.treasure-chest .coin::after {
  content: "";
  position: absolute;
  inset: 27%;
  border-radius: 50%;
  border: 1.5px solid rgba(125,72,0,.44);
  box-shadow: inset 0 0 0 1px rgba(255,250,184,.42);
}

.treasure-chest .spark {
  width: var(--size);
  height: var(--size);
  opacity: 0;
  background: #fff7bd;
  clip-path: polygon(50% 0%, 61% 35%, 100% 50%, 61% 65%, 50% 100%, 39% 65%, 0% 50%, 39% 35%);
  filter: drop-shadow(0 0 8px rgba(255,215,88,.9));
  animation: tcSparkFly var(--dur) ease-out var(--delay) forwards;
}

.treasure-chest .ring {
  width: 8%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 2px solid rgba(255,229,129,.86);
  transform: translate(-50%, -50%) scale(.1);
  opacity: .9;
  mix-blend-mode: screen;
  animation: tcRingBoom 720ms ease-out forwards;
  z-index: 4;
}

.treasure-chest--slot {
  min-height: 92px;
  border: 1px solid rgba(86, 255, 177, .2);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 10px 26px rgba(0,0,0,.28);
}

.treasure-chest--slot:not(.is-open) {
  background:
    radial-gradient(circle at 50% 43%, rgba(255, 213, 82, .16), transparent 18%) padding-box,
    radial-gradient(circle at 50% 56%, #0b4d36 0%, var(--tc-green-a) 36%, var(--tc-green-b) 74%, #020805 100%) padding-box,
    conic-gradient(
      from var(--tc-energy-angle),
      rgba(34, 197, 94, .08),
      rgba(134, 239, 172, .62),
      rgba(255, 221, 87, .55),
      rgba(16, 185, 129, .22),
      rgba(34, 197, 94, .08)
    ) border-box;
  animation:
    tcEnergyStroke 6.4s linear infinite,
    tcClosedBreathe 3.8s ease-in-out infinite;
}

.pgs-box.treasure-chest,
.pgs-frame-box.treasure-chest,
.pgs-test-box.treasure-chest {
  padding: 0;
  background:
    radial-gradient(circle at 50% 43%, rgba(255, 213, 82, .18), transparent 17%),
    radial-gradient(circle at 50% 56%, #0c5a3d 0%, var(--tc-bg-b) 36%, var(--tc-bg-a) 74%, #020805 100%);
}

.pgs-box.treasure-chest:disabled,
.pgs-frame-box.treasure-chest:disabled,
.pgs-test-box.treasure-chest:disabled {
  opacity: 1;
  background:
    radial-gradient(circle at 50% 43%, rgba(255, 213, 82, .18), transparent 17%),
    radial-gradient(circle at 50% 56%, #0c5a3d 0%, var(--tc-bg-b) 36%, var(--tc-bg-a) 74%, #020805 100%);
}

.pgs-box.treasure-chest--slot:not(.is-open),
.pgs-frame-box.treasure-chest--slot:not(.is-open),
.pgs-test-box.treasure-chest--slot:not(.is-open),
.treasure-chest--slot:not(.is-open) {
  background:
    radial-gradient(circle at 50% 43%, rgba(255, 213, 82, .16), transparent 18%) padding-box,
    radial-gradient(circle at 50% 56%, #0b4d36 0%, var(--tc-green-a) 36%, var(--tc-green-b) 74%, #020805 100%) padding-box,
    conic-gradient(
      from var(--tc-energy-angle),
      rgba(34, 197, 94, .08),
      rgba(134, 239, 172, .62),
      rgba(255, 221, 87, .55),
      rgba(16, 185, 129, .22),
      rgba(34, 197, 94, .08)
    ) border-box;
  animation:
    tcEnergyStroke 6.4s linear infinite,
    tcClosedBreathe 3.8s ease-in-out infinite;
}

.treasure-chest--slot.is-open:not(.fim):not(.pgs-fim) {
  border-color: rgba(255, 218, 89, .64);
  background:
    radial-gradient(circle at 50% 43%, rgba(255, 246, 185, .26), transparent 18%),
    radial-gradient(circle at 50% 56%, #14623f 0%, #073f2a 36%, #031d14 74%, #020805 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 241, 170, .25),
    inset 0 0 22px rgba(255, 207, 64, .14),
    0 0 0 1px rgba(255, 218, 89, .18),
    0 12px 28px rgba(0, 0, 0, .3),
    0 0 22px rgba(255, 203, 55, .2);
  animation: tcOpenedGold 2.8s ease-in-out infinite;
}

.treasure-chest--slot.is-open:not(.fim):not(.pgs-fim) .click-hint {
  color: #fff7d1;
  border-color: rgba(255, 218, 89, .5);
  background: rgba(45, 31, 4, .7);
  box-shadow: 0 0 18px rgba(255, 203, 55, .28);
}

.treasure-chest--slot.is-open.jackpot,
.treasure-chest--slot.is-open.pgs-jackpot {
  border-color: rgba(254, 240, 138, .72);
  background:
    radial-gradient(circle at 50% 43%, rgba(255, 255, 230, .34), transparent 20%),
    radial-gradient(circle at 50% 58%, #facc15 0%, #eab308 38%, #a16207 76%, #3f2600 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .22),
    inset 0 0 20px rgba(120, 53, 15, .2),
    0 12px 28px rgba(0, 0, 0, .32),
    0 0 18px rgba(250, 204, 21, .24);
  animation: none;
}

.treasure-chest--slot.is-open.jackpot::before,
.treasure-chest--slot.is-open.pgs-jackpot::before {
  inset: 0;
  opacity: .62;
  background: radial-gradient(circle at 50% 42%, rgba(255, 255, 235, .24), transparent 58%);
  filter: blur(10px);
  animation: none;
}

.treasure-chest--slot.is-open.jackpot .click-hint,
.treasure-chest--slot.is-open.pgs-jackpot .click-hint {
  color: #241400;
  background: rgba(254, 243, 199, .94);
  border-color: rgba(120, 53, 15, .42);
  text-shadow: none;
  box-shadow: 0 5px 14px rgba(69, 26, 3, .24);
}

.treasure-chest--slot.is-open.jackpot .lid,
.treasure-chest--slot.is-open.pgs-jackpot .lid {
  background:
    linear-gradient(90deg, transparent 0 12%, rgba(255, 251, 235, .5) 12% 16%, transparent 16% 84%, rgba(255, 251, 235, .5) 84% 88%, transparent 88%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .04) 0 3px, transparent 3px 12px),
    linear-gradient(180deg, #fbbf24 0%, #d97706 50%, #78350f 100%);
}

.treasure-chest--slot.is-open.jackpot .base,
.treasure-chest--slot.is-open.pgs-jackpot .base {
  background:
    linear-gradient(90deg, transparent 0 14%, rgba(255, 251, 235, .52) 14% 18%, transparent 18% 82%, rgba(255, 251, 235, .52) 82% 86%, transparent 86%),
    linear-gradient(180deg, #fbbf24, #d97706 45%, #78350f 100%);
}

.treasure-chest--slot.is-open.fim,
.treasure-chest--slot.is-open.pgs-fim {
  border-color: rgba(254, 202, 202, .62);
  background:
    radial-gradient(circle at 50% 43%, rgba(254, 202, 202, .2), transparent 19%),
    radial-gradient(circle at 50% 58%, #b91c1c 0%, #7f1d1d 40%, #2c0808 78%, #120202 100%);
  box-shadow:
    inset 0 0 0 1px rgba(254, 202, 202, .22),
    inset 0 0 22px rgba(239, 68, 68, .2),
    0 12px 28px rgba(0, 0, 0, .32),
    0 0 20px rgba(239, 68, 68, .25);
  animation: none;
}

.treasure-chest--slot.is-open.fim::before,
.treasure-chest--slot.is-open.pgs-fim::before {
  background: radial-gradient(circle, rgba(254, 202, 202, .16), transparent 58%);
  filter: blur(10px);
  animation: none;
}

.treasure-chest--slot.is-open.fim .inside-glow,
.treasure-chest--slot.is-open.pgs-fim .inside-glow {
  background: radial-gradient(ellipse at center, rgba(255, 235, 235, .75), rgba(248, 113, 113, .44) 34%, rgba(127, 29, 29, .16) 68%, transparent 78%);
  animation: none;
}

.treasure-chest--slot.is-open.fim .lid,
.treasure-chest--slot.is-open.pgs-fim .lid {
  background:
    linear-gradient(90deg, transparent 0 12%, rgba(254, 202, 202, .48) 12% 16%, transparent 16% 84%, rgba(254, 202, 202, .48) 84% 88%, transparent 88%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .04) 0 3px, transparent 3px 12px),
    linear-gradient(180deg, #c2410c 0%, #991b1b 50%, #5f1212 100%);
}

.treasure-chest--slot.is-open.fim .base,
.treasure-chest--slot.is-open.pgs-fim .base {
  background:
    linear-gradient(90deg, transparent 0 14%, rgba(254, 202, 202, .48) 14% 18%, transparent 18% 82%, rgba(254, 202, 202, .48) 82% 86%, transparent 86%),
    linear-gradient(180deg, #c2410c, #991b1b 45%, #5f1212 100%);
}

.treasure-chest--slot.is-open.fim .click-hint,
.treasure-chest--slot.is-open.pgs-fim .click-hint {
  color: #fff;
  background: rgba(69, 10, 10, .86);
  border-color: rgba(254, 202, 202, .4);
  box-shadow: none;
}

.treasure-chest--slot .click-hint {
  bottom: 7%;
  padding: .46em .62em;
  font-size: 12px;
  font-weight: 1000;
  text-align: center;
}

.treasure-chest--slot .chest-art {
  left: 13%;
  top: 28%;
  width: 74%;
  height: 50%;
}

.treasure-chest--preview {
  width: 72px;
  min-height: 72px;
  border-radius: 8px;
  cursor: default;
}

.treasure-chest--preview .click-hint { display: none; }
.treasure-chest--preview .chest-art { left: 12%; top: 29%; width: 76%; height: 55%; }

@keyframes tcSlowSpin { to { transform: rotate(1turn); } }
@keyframes tcStarDrift { from { transform: translateY(-1%); opacity: .65; } to { transform: translateY(1%); opacity: 1; } }
@keyframes tcCirclePulse { 0%,100% { transform: translateX(-50%) scaleX(.95); opacity: .62; } 50% { transform: translateX(-50%) scaleX(1.08); opacity: 1; } }
@keyframes tcChestFloat { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-3.5%) rotate(-.55deg); } }
@keyframes tcChestTease { 0%,100% { transform: translateY(0) rotate(0deg); } 24% { transform: translateY(-2.8%) rotate(-1.4deg); } 52% { transform: translateY(-1.2%) rotate(1.4deg); } 76% { transform: translateY(-2.1%) rotate(-.6deg); } }
@keyframes tcOpenPop { 0% { transform: translateY(0) scale(1); } 32% { transform: translateY(2.2%) scale(.985,1.03) rotate(-.7deg); } 72% { transform: translateY(-4%) scale(1.025,.985) rotate(.5deg); } 100% { transform: translateY(0) scale(1); } }
@keyframes tcLockGlow { from { filter: brightness(1); transform: translateX(-50%) scale(1); } to { filter: brightness(1.22); transform: translateX(-50%) scale(1.04); } }
@keyframes tcTreasureGlow { from { filter: blur(12px); opacity: .82; } to { filter: blur(17px); opacity: 1; } }
@keyframes tcEnergyStroke { to { --tc-energy-angle: 360deg; } }
@keyframes tcClosedBreathe {
  0%, 100% {
    border-color: rgba(86, 255, 177, .18);
    box-shadow:
      inset 0 0 0 1px rgba(255,255,255,.06),
      0 10px 26px rgba(0,0,0,.28),
      0 0 10px rgba(16,185,129,.12);
  }
  50% {
    border-color: rgba(187, 247, 208, .44);
    box-shadow:
      inset 0 0 0 1px rgba(255,255,255,.1),
      0 12px 30px rgba(0,0,0,.3),
      0 0 18px rgba(52,211,153,.24);
  }
}
@keyframes tcOpenedGold {
  0%, 100% {
    box-shadow:
      inset 0 0 0 1px rgba(255, 241, 170, .22),
      inset 0 0 20px rgba(255, 207, 64, .12),
      0 0 0 1px rgba(255, 218, 89, .16),
      0 12px 28px rgba(0, 0, 0, .3),
      0 0 18px rgba(255, 203, 55, .18);
  }
  50% {
    box-shadow:
      inset 0 0 0 1px rgba(255, 250, 203, .34),
      inset 0 0 28px rgba(255, 207, 64, .22),
      0 0 0 1px rgba(255, 218, 89, .36),
      0 14px 32px rgba(0, 0, 0, .32),
      0 0 30px rgba(255, 203, 55, .34);
  }
}
@keyframes tcJackpotGleam {
  0%, 100% {
    box-shadow:
      inset 0 0 0 1px rgba(255, 250, 203, .36),
      inset 0 0 24px rgba(255, 203, 55, .2),
      0 0 0 1px rgba(255, 236, 153, .42),
      0 14px 32px rgba(0, 0, 0, .34),
      0 0 28px rgba(255, 203, 55, .38);
  }
  50% {
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, .56),
      inset 0 0 34px rgba(255, 236, 153, .28),
      0 0 0 2px rgba(255, 236, 153, .64),
      0 16px 36px rgba(0, 0, 0, .36),
      0 0 42px rgba(255, 203, 55, .62);
  }
}
@keyframes tcCoinFly {
  0% { transform: translate(-50%, -50%) translate(0, 0) scale(.16) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  43% { transform: translate(-50%, -50%) translate(var(--mid-x), var(--arc-y)) scale(var(--scale)) rotate(var(--mid-rot)); opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) scale(.58) rotate(var(--rot)); opacity: 0; }
}
@keyframes tcSparkFly {
  0% { transform: translate(-50%, -50%) translate(0, 0) scale(.15) rotate(0deg); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) scale(0) rotate(var(--rot)); opacity: 0; }
}
@keyframes tcRingBoom {
  0% { transform: translate(-50%, -50%) scale(.12); opacity: .88; }
  100% { transform: translate(-50%, -50%) scale(9.8); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .treasure-chest,
  .treasure-chest *,
  .treasure-chest::before,
  .treasure-chest::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
  .treasure-chest .coin,
  .treasure-chest .spark,
  .treasure-chest .ring { display: none; }
}
