:root {
  --bg: #0a0705;
  --panel: #15100c;
  --panel-2: #1d1610;
  --line: rgba(255, 140, 40, .18);
  --text: #f5efe6;
  --muted: #a39887;
  --orange: #ff7a00;
  --orange-2: #ffa233;
  --danger: #ff5a4a;

  --t-common: #9a958b;
  --t-uncommon: #6ee06e;
  --t-rare: #4aa8ff;
  --t-epic: #b46bff;
  --t-legendary: #ff7a00;
  --t-mythic: #ff3b5c;

  --card: 104px;
  --gap: 8px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  background:
    radial-gradient(900px 500px at 50% -120px, rgba(255, 122, 0, .22), transparent 70%),
    radial-gradient(600px 400px at 100% 60%, rgba(120, 40, 160, .10), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}
a { color: var(--orange-2); }
code { background: var(--panel-2); padding: 1px 6px; border-radius: 4px; font-size: .9em; }
.wrap { max-width: 620px; margin: 0 auto; padding: 0 16px; }
.hand { font-family: "Gochi Hand", cursive; font-size: 22px; color: var(--orange-2); margin: 6px 0 0; }
.small { font-size: 12.5px; color: var(--muted); }
.center { text-align: center; }
[hidden] { display: none !important; }

/* embers */
.embers { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.embers i {
  position: absolute; bottom: -10px; width: 4px; height: 4px; border-radius: 50%;
  background: var(--orange-2); box-shadow: 0 0 8px 2px rgba(255, 140, 30, .7);
  animation: rise linear infinite; opacity: 0;
}
@keyframes rise {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: .9; }
  100% { transform: translate(var(--dx, 20px), -105vh); opacity: 0; }
}
main, header, footer { position: relative; z-index: 1; }

/* box logo: 2010s swag */
.boxlogo {
  display: inline-block; background: var(--orange); color: #fff; text-decoration: none;
  font-family: "Archivo Black", Impact, sans-serif; font-style: italic; font-size: 26px; line-height: 1;
  padding: 6px 12px 8px; letter-spacing: -.02em; transform: skewX(-6deg);
}
.boxlogo.sm { font-size: 16px; padding: 4px 8px 5px; }
.top { display: flex; justify-content: space-between; align-items: center; padding-top: 18px; padding-bottom: 6px; gap: 10px; }
.countdown {
  font-size: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px;
  background: rgba(0, 0, 0, .4); white-space: nowrap;
}

/* hero */
.hero { position: relative; text-align: center; padding: 18px 0 26px; overflow: hidden; }
.hero-inner { position: relative; z-index: 1; }
.pumpkin-wrap { position: relative; display: inline-block; }
.pumpkin-wrap::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: 4px; height: 16px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,.75), transparent); z-index: -1; animation: shadow 3.2s ease-in-out infinite; }
.pumpkin { width: 210px; height: auto; filter: drop-shadow(0 0 30px rgba(255, 122, 0, .55)) drop-shadow(0 18px 40px rgba(255, 122, 0, .35)); animation: bob 3.2s ease-in-out infinite; }
@keyframes shadow { 50% { transform: scaleX(.82); opacity: .6; } }
@keyframes bob { 50% { transform: translateY(-10px) rotate(2deg); } }
h1 { margin: 2px 0 8px; line-height: .95; }
.spooky {
  font-family: "Creepster", "Archivo Black", cursive; font-weight: 400; font-size: clamp(54px, 15vw, 88px);
  color: var(--orange); letter-spacing: .02em;
  text-shadow: 0 0 24px rgba(255, 122, 0, .55), 3px 3px 0 #000;
}
.lead { color: #dcd3c6; max-width: 34em; margin: 0 auto; }
.lead b { color: var(--text); }

h2 {
  font-family: "Archivo Black", Impact, sans-serif; font-style: italic; text-transform: lowercase;
  font-size: 28px; margin: 44px 0 6px; letter-spacing: -.01em;
}
.sub { color: var(--muted); margin: 0 0 16px; font-size: 13px; }

/* machine */
.machine {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: 18px; padding: 16px;
  box-shadow: 0 30px 80px -30px rgba(255, 122, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.machine.shake { animation: shake .5s ease-in-out infinite; }
@keyframes shake { 25% { transform: rotate(-.6deg) translateX(-2px); } 75% { transform: rotate(.6deg) translateX(2px); } }

.tabs { display: flex; gap: 6px; background: rgba(0, 0, 0, .35); padding: 4px; border-radius: 12px; margin-bottom: 14px; }
.tab {
  flex: 1; background: none; border: 0; color: var(--muted); font: 700 13px "Space Mono", monospace;
  padding: 10px 8px; border-radius: 9px; cursor: pointer;
}
.tab.on { background: var(--orange); color: #000; }
.small-tabs { max-width: 300px; }

.entry label { display: block; font-size: 13px; margin-bottom: 8px; color: #dcd3c6; }
.row { display: flex; gap: 8px; }
input {
  flex: 1; min-width: 0; background: #0b0806; border: 1px solid var(--line); color: var(--text);
  font: 15px "Space Mono", monospace; padding: 13px 12px; border-radius: 10px; outline: none;
}
input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 122, 0, .2); }

.btn {
  appearance: none; border: 0; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--orange); color: #000; font: 700 15px "Space Mono", monospace;
  padding: 13px 18px; border-radius: 10px; white-space: nowrap;
  box-shadow: 0 4px 0 #9c4600; transition: transform .08s, box-shadow .08s, filter .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #9c4600; }
.btn:disabled { filter: grayscale(.8) brightness(.6); cursor: not-allowed; }
.btn.big { width: 100%; font-size: 18px; padding: 16px; margin-top: 14px; font-family: "Archivo Black", sans-serif; font-style: italic; letter-spacing: .01em; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; font: inherit; cursor: pointer; padding: 4px; }
.error { color: var(--danger); font-size: 13px; margin: 10px 0 0; min-height: 0; }
.error:empty { display: none; }

.status { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--muted); margin-bottom: 12px; gap: 10px; }
.status .left b { color: var(--orange); font-size: 22px; font-family: "Archivo Black", sans-serif; }
#who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* reel */
.reel {
  position: relative; height: 136px; overflow: hidden; border-radius: 12px;
  background: #070504; border: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.strip { position: absolute; top: 12px; left: 0; display: flex; gap: var(--gap); padding-left: var(--gap); will-change: transform; }
.marker {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; margin-left: -1.5px;
  background: var(--orange); box-shadow: 0 0 14px 3px rgba(255, 122, 0, .8);
}
.marker::before, .marker::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  border: 8px solid transparent;
}
.marker::before { top: 0; border-top-color: var(--orange); }
.marker::after { bottom: 0; border-bottom-color: var(--orange); }

.card {
  --c: var(--t-common);
  flex: 0 0 var(--card); height: 110px; border-radius: 10px; padding: 10px 6px 8px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 22%, #120d09), #0f0b08 70%);
  border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
  border-bottom: 4px solid var(--c);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-align: center;
}
.card .ic { width: 52px; height: 52px; object-fit: contain; border-radius: 8px; }
.card .nm { font-size: 10.5px; line-height: 1.25; color: #e6ddd0; }
.card.win { animation: pop .6s ease-out; box-shadow: 0 0 26px 4px color-mix(in srgb, var(--c) 70%, transparent); }
@keyframes pop { 40% { transform: scale(1.1); } }

.t-common { --c: var(--t-common); }
.t-uncommon { --c: var(--t-uncommon); }
.t-rare { --c: var(--t-rare); }
.t-epic { --c: var(--t-epic); }
.t-legendary { --c: var(--t-legendary); }
.t-mythic { --c: var(--t-mythic); }

/* buy */
.buy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.buycard {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 8px 14px; text-align: center;
  transition: transform .15s, border-color .15s;
}
.buycard:hover { transform: translateY(-3px); border-color: var(--orange); }
.buycard .n { font-family: "Archivo Black", sans-serif; font-size: 34px; line-height: 1; color: var(--orange); }
.buycard .u { font-size: 12px; color: var(--muted); }
.buycard .p { font-weight: 700; font-size: 18px; margin-top: 6px; }
.buycard .go { margin-top: 8px; font-size: 12px; background: var(--orange); color: #000; border-radius: 999px; padding: 6px 12px; font-weight: 700; }
.buycard .tag {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: #fff; color: #000; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; text-transform: uppercase;
}
.buycard.best { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange), 0 20px 50px -20px rgba(255, 122, 0, .6); }
.closed { border: 1px dashed var(--line); padding: 14px; border-radius: 12px; color: var(--muted); }

/* odds */
.odds { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13.5px; }
.odds th { text-align: left; color: var(--muted); font-weight: 400; font-size: 12px; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.odds td { padding: 9px 4px; border-bottom: 1px solid rgba(255, 255, 255, .06); vertical-align: middle; }
.odds .num { text-align: right; white-space: nowrap; }
.odds .pz { display: flex; gap: 10px; align-items: center; }
.odds .oic { width: 34px; height: 34px; object-fit: contain; border-radius: 5px; flex: 0 0 auto; }
.odds .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: 0 0 auto; box-shadow: 0 0 8px var(--c); }
.odds .tier { font-size: 10px; color: var(--c); text-transform: uppercase; letter-spacing: .08em; }
.odds .desc { font-size: 11.5px; color: var(--muted); }

/* stash */
.stash { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.stash li {
  display: flex; gap: 12px; align-items: center; background: var(--panel); border: 1px solid var(--line);
  border-left: 4px solid var(--c); border-radius: 12px; padding: 10px 12px;
}
.stash .ic { width: 40px; height: 40px; object-fit: contain; border-radius: 6px; flex: 0 0 auto; }
.stash .meta { flex: 1; min-width: 0; }
.stash .nm { font-weight: 700; font-size: 13.5px; }
.stash .it { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stash .acts { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.stash .acts a, .stash .acts button { font-size: 12px; padding: 7px 10px; box-shadow: none; }
.artist { background: var(--panel); border: 1px solid var(--orange); border-radius: 12px; padding: 14px; margin-top: 10px; }
.artist label { font-size: 13px; display: block; margin-bottom: 8px; }

/* faq */
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.faq p { color: #d2c9bb; font-size: 13.5px; margin: 8px 0 0; }

.foot { display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: 11.5px; padding-top: 50px; padding-bottom: 40px; flex-wrap: wrap; }

/* dialogs */
.dlg {
  width: min(440px, calc(100vw - 24px)); max-height: calc(100vh - 40px); border: 1px solid var(--line); border-radius: 18px;
  background: linear-gradient(180deg, #1f1710, #120d09); color: var(--text); padding: 22px 18px 18px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, .7);
}
.dlg::backdrop { background: rgba(5, 3, 2, .78); backdrop-filter: blur(4px); }
.dlg .x { position: absolute; top: 10px; right: 10px; background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; padding: 6px; }
.dlg h3 { font-family: "Archivo Black", sans-serif; font-style: italic; margin: 0 0 4px; font-size: 22px; }
.reveal { text-align: center; }
.reveal .tier { color: var(--c); font-size: 12px; text-transform: uppercase; letter-spacing: .2em; font-weight: 700; }
.reveal .big-ic { display: block; width: 104px; height: 104px; object-fit: contain; margin: 10px auto 6px; border-radius: 12px; filter: drop-shadow(0 0 22px color-mix(in srgb, var(--c) 80%, transparent)); animation: pop .7s ease-out; }
.reveal h3 { font-size: 26px; }
.reveal .item { color: #dcd3c6; margin: 2px 0 14px; }
.reveal .btn { width: 100%; margin-top: 8px; }
.reveal .code {
  font-family: "Archivo Black", sans-serif; font-size: 28px; letter-spacing: .08em; color: var(--orange);
  border: 2px dashed var(--orange); border-radius: 12px; padding: 10px; margin: 6px 0 4px; user-select: all;
}
.reveal form { margin-top: 12px; text-align: left; }
.reveal form label { font-size: 12.5px; color: var(--muted); display: block; margin-bottom: 6px; }

.beats { list-style: none; padding: 0; margin: 12px 0 0; max-height: 52vh; overflow-y: auto; display: grid; gap: 6px; }
.beats li {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(0, 0, 0, .35);
  border: 1px solid transparent; cursor: pointer;
}
.beats li.sel { border-color: var(--orange); background: rgba(255, 122, 0, .1); }
.beats .play {
  flex: 0 0 38px; height: 38px; border-radius: 50%; border: 0; background: var(--text); color: #000; font-size: 14px; cursor: pointer;
}
.beats .play.on { background: var(--orange); }
.beats .bn { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.beats .bpm { font-size: 11px; color: var(--muted); }

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text); color: #000; padding: 10px 16px; border-radius: 999px; font-size: 13px; font-weight: 700;
  transition: opacity .2s, transform .2s; z-index: 10; max-width: calc(100vw - 32px);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 380px) {
  :root { --card: 92px; }
  .buy { gap: 6px; }
  .buycard .n { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .pumpkin, .embers i, .machine.shake { animation: none; }
}

/* entry: two clear doors */
.door { border-radius: 14px; padding: 14px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); }
.door.paid { border-color: var(--orange); background: linear-gradient(180deg, rgba(255, 122, 0, .12), rgba(0, 0, 0, .2)); }
.door-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.badge {
  display: inline-block; font: 700 11px "Space Mono", monospace; text-transform: uppercase; letter-spacing: .12em;
  padding: 5px 10px; border-radius: 999px; white-space: nowrap;
}
.badge.paid { background: var(--orange); color: #000; }
.badge.free { background: transparent; color: #d9b8ff; border: 1px solid #8a5cc7; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 12px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn.ghost-orange { background: transparent; color: var(--orange); border: 2px solid var(--orange); box-shadow: none; }
.btn.ghost-orange:active { transform: translateY(1px); }
.who { margin: -6px 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status { align-items: center; }
.license-btns { display: grid; gap: 8px; margin-top: 6px; }
.license-btns:empty { display: none; }
.stash .acts { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; max-width: 50%; }

/* sound toggle */
.top-right { display: flex; align-items: center; gap: 8px; }
.sound {
  background: rgba(0, 0, 0, .4); border: 1px solid var(--line); border-radius: 999px; width: 34px; height: 30px;
  font-size: 14px; cursor: pointer; padding: 0; line-height: 1;
}

/* rare-drop effects */
.flash {
  --c: var(--t-epic);
  position: fixed; inset: 0; pointer-events: none; z-index: 5; opacity: 0;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--c) 75%, transparent), transparent 65%);
}
.flash.on { animation: flash 1.1s ease-out; }
@keyframes flash { 0% { opacity: 0; } 12% { opacity: 1; } 100% { opacity: 0; } }
.dlg.quake { animation: quake .55s cubic-bezier(.36, .07, .19, .97); }
@keyframes quake {
  10%, 90% { transform: translate(-2px, 1px); } 20%, 80% { transform: translate(4px, -2px); }
  30%, 50%, 70% { transform: translate(-7px, 3px); } 40%, 60% { transform: translate(7px, -3px); }
}
.burst { position: fixed; left: 50%; top: 45%; width: 0; height: 0; pointer-events: none; z-index: 6; }
.burst i {
  --c: var(--t-legendary);
  position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--c);
  box-shadow: 0 0 12px 3px var(--c); opacity: 0; animation: fly 1.3s cubic-bezier(.15, .7, .3, 1) forwards;
}
@keyframes fly {
  0% { transform: translate(0, 0) scale(1.4); opacity: 1; }
  100% { transform: translate(var(--x), var(--y)) scale(.2); opacity: 0; }
}

/* ---- atmosphere ---- */
body::after { /* film grain */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 4; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.scene { position: absolute; inset: 0; pointer-events: none; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.fog {
  position: absolute; left: -20%; right: -20%; bottom: -30px; height: 120px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 200, 150, .10), transparent);
  filter: blur(8px); animation: fog 18s ease-in-out infinite alternate;
}
.fog.f2 { bottom: -50px; height: 150px; opacity: .8; animation-duration: 26s; animation-direction: alternate-reverse; }
@keyframes fog { from { transform: translateX(-6%); } to { transform: translateX(6%); } }

/* ---- headings & cards ---- */
h2 { display: flex; align-items: center; gap: 12px; }
h2::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, var(--orange), transparent); border-radius: 2px; opacity: .6; }
.machine { position: relative; }
.machine::before { /* candle-light rim */
  content: ""; position: absolute; inset: -1px; border-radius: 19px; pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 140, 40, .55), transparent 30%, transparent 70%, rgba(180, 107, 255, .35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; padding: 1px;
}
.buycard .pk { display: flex; justify-content: center; height: 34px; margin-bottom: 6px; }
.buycard .pk img { width: 34px; height: 34px; margin: 0 -7px; filter: drop-shadow(0 4px 10px rgba(255, 122, 0, .4)); }
.buycard .pk img:nth-child(2) { transform: translateY(-4px) scale(1.08); z-index: 1; }
.buycard { background: linear-gradient(180deg, #1c140d, var(--panel)); }

@media (prefers-reduced-motion: reduce) {
  .fog, .pumpkin-wrap::after { animation: none; }
}
@media (max-width: 420px) {
  .boxlogo { font-size: 21px; padding: 5px 9px 7px; }
  .top-right { gap: 6px; }
  .countdown { font-size: 10.5px; padding: 6px 9px; letter-spacing: -.02em; }
  .sound { width: 30px; height: 28px; font-size: 13px; flex: 0 0 auto; }
}

/* secondary big button: same size as the spin button, calmer color */
.btn.alt { background: #4a3c31; color: var(--text); box-shadow: 0 4px 0 #2a211a; border: 1px solid rgba(255, 140, 40, .25); }
.btn.alt:active { box-shadow: 0 1px 0 #2a211a; }
.switch { margin-top: 6px; }

.recent { display: grid; gap: 10px; }
.recent .btn.big { margin-top: 0; font-size: 15px; white-space: normal; line-height: 1.3; }

/* ---- unboxing ---- */
.stage { position: relative; height: 290px; display: flex; align-items: flex-end; justify-content: center; overflow: visible; }
.stage .box { width: 200px; height: auto; overflow: visible; animation: idle 2.6s ease-in-out infinite; transform-origin: 50% 90%; filter: drop-shadow(0 16px 30px rgba(255, 122, 0, .25)); }
@keyframes idle { 50% { transform: translateY(-5px); } }
.stage .shadow { fill: rgba(0, 0, 0, .55); }
.stage .q { font-family: "Creepster", cursive; font-size: 38px; fill: #ff8a14; }
.stage .lid { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .55s cubic-bezier(.2, 1.4, .4, 1), opacity .5s; }
.stage.shaking .box { animation: rattle .16s linear infinite; }
.stage.shaking.hard .box { animation: rattle-hard .1s linear infinite; }
.stage.shaking .lid { transform: translateY(-3px); }
.stage.shaking.hard .lid { transform: translateY(-7px) rotate(-3deg); }
@keyframes rattle { 25% { transform: rotate(-3deg) translateX(-2px); } 75% { transform: rotate(3deg) translateX(2px); } }
@keyframes rattle-hard { 25% { transform: rotate(-6deg) translate(-4px, -2px); } 75% { transform: rotate(6deg) translate(4px, -1px); } }
.stage.open .box { animation: none; }
.stage.open .lid { transform: translate(70px, -90px) rotate(38deg); opacity: 0; }

.stage .beam {
  --c: var(--t-common);
  position: absolute; left: 50%; bottom: 100px; width: 260px; height: 260px; margin-left: -130px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 10%, color-mix(in srgb, var(--c) 70%, transparent) 12% 16%, transparent 18% 35%, color-mix(in srgb, var(--c) 70%, transparent) 37% 41%, transparent 43% 60%, color-mix(in srgb, var(--c) 70%, transparent) 62% 66%, transparent 68% 85%, color-mix(in srgb, var(--c) 70%, transparent) 87% 91%, transparent 93%);
  -webkit-mask: radial-gradient(closest-side, #000, transparent); mask: radial-gradient(closest-side, #000, transparent);
  opacity: 0; transform: scale(.2); pointer-events: none;
}
.stage.open .beam { opacity: .9; transform: scale(1); transition: opacity .3s, transform .5s cubic-bezier(.2, 1.3, .4, 1); animation: beam-spin 6s linear infinite; }
@keyframes beam-spin { to { rotate: 360deg; } }
.stage.open.t-common .beam, .stage.open.t-uncommon .beam { opacity: .5; }
.stage.t-common .beam { --c: var(--t-common); }
.stage.t-uncommon .beam { --c: var(--t-uncommon); }
.stage.t-rare .beam { --c: var(--t-rare); }
.stage.t-epic .beam { --c: var(--t-epic); }
.stage.t-legendary .beam { --c: var(--t-legendary); }
.stage.t-mythic .beam { --c: var(--t-mythic); }

.stage .popped { position: absolute; left: 50%; bottom: 122px; z-index: 2; transform: translateX(-50%); pointer-events: none; }
.stage .popped .card { transform: translateY(70px) scale(.2); opacity: 0; }
.stage.open .popped .card { transform: translateY(0) scale(1.05); opacity: 1; transition: transform .6s cubic-bezier(.2, 1.5, .4, 1) .08s, opacity .2s .08s; box-shadow: 0 0 36px 6px color-mix(in srgb, var(--c) 70%, transparent); }
.machine.quake { animation: quake .55s cubic-bezier(.36, .07, .19, .97); }
@media (prefers-reduced-motion: reduce) {
  .stage .box, .stage.open .beam { animation: none; }
}

/* ---- crypto ---- */
.buycard .go { text-decoration: none; }
.buycard .crypto {
  margin-top: 8px; font: 700 11px "Space Mono", monospace; color: #c8f7c5; background: rgba(110, 224, 110, .1);
  border: 1px solid rgba(110, 224, 110, .45); border-radius: 999px; padding: 5px 10px; cursor: pointer; white-space: nowrap;
}
.buycard .crypto:hover { background: rgba(110, 224, 110, .2); }
.buycard .crypto:disabled { opacity: .5; cursor: wait; }
.crypto-note { margin-top: 12px; border: 1px dashed rgba(110, 224, 110, .35); border-radius: 10px; padding: 10px 12px; }
.crypto-note b { color: #c8f7c5; }
.order-panel {
  display: grid; gap: 10px; grid-template-columns: auto 1fr; align-items: center;
  border: 1px solid rgba(110, 224, 110, .45); background: rgba(110, 224, 110, .07); border-radius: 12px; padding: 14px; margin-bottom: 14px;
}
.order-panel > :not(.spinner) { grid-column: 1 / -1; }
.order-panel .spinner + div { grid-column: 2; }
.order-panel .btn { justify-self: start; }
.order-key {
  font: 700 17px "Space Mono", monospace; letter-spacing: .04em; color: var(--orange); word-break: break-all;
  border: 2px dashed var(--orange); border-radius: 10px; padding: 10px; text-align: center; user-select: all;
}
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .15); border-top-color: #6ee06e; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.buy { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.buycard { min-width: 0; padding-left: 6px; padding-right: 6px; }
.buycard .crypto { width: 100%; white-space: normal; line-height: 1.25; padding: 5px 4px; }
