/* machine */
.machine-wrap { position: relative; max-width: 740px; margin: -5px auto 0; z-index: 3; }
.machine { position: relative; background: var(--panel); border: 7px solid var(--plum); box-shadow: 0 0 0 3px var(--ink), 10px 12px 0 3px var(--ink); padding: clamp(14px, 3vw, 26px); display: grid; gap: clamp(12px, 2vw, 18px); }
.star { position: absolute; top: 34%; width: 50px; height: 50px; background: var(--gold); clip-path: polygon(50% 0, 62% 35%, 98% 35%, 69% 57%, 80% 92%, 50% 71%, 20% 92%, 31% 57%, 2% 35%, 38% 35%); animation: pulse 1.1s ease-in-out infinite; }
.star.l { left: -74px; rotate: -10deg; }
.star.r { right: -74px; rotate: 12deg; animation-delay: -.55s; }
@keyframes pulse { 50% { transform: scale(1.22); } }
.is-spinning .star { animation-duration: .25s; }

.reels { display: grid; grid-template-columns: 1.25fr .8fr 1.25fr; gap: clamp(8px, 2vw, 20px); }
.reel-col { display: grid; gap: 8px; justify-items: stretch; min-width: 0; }
.reel-label { justify-self: center; font-family: var(--label); font-size: clamp(11px, 1.7vw, 16px); letter-spacing: .1em; background: var(--ink); padding: 3px 11px; }
.card { position: relative; height: clamp(84px, 15vw, 118px); background: var(--card); box-shadow: 5px 6px 0 var(--ink); overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(var(--rule), var(--rule)) 0 14% / 100% 2px no-repeat,
    linear-gradient(var(--rule), var(--rule)) 0 82% / 100% 2px no-repeat; opacity: .9; }
.reel-col:nth-child(1) .card { rotate: -.7deg; }
.reel-col:nth-child(2) .card { rotate: 1deg; }
.reel-col:nth-child(3) .card { rotate: .4deg; }
.strip { position: absolute; inset: 0 0 auto; will-change: transform; }
.word { display: block; text-align: center; font-family: var(--display); color: var(--ink); white-space: nowrap; text-transform: uppercase; }
.card.moving .strip { filter: blur(1.6px); }
.card.moving { animation: judder .09s linear infinite; }
@keyframes judder { 50% { transform: translate(1px, -1.5px); } }
.card.landed { animation: land .3s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes land { 0% { transform: translateY(5px) scale(1.04); } 100% { transform: none; } }
.card.flash { box-shadow: 5px 6px 0 var(--ink), 0 0 0 4px var(--gold); }
.hold { justify-self: center; font-family: var(--label); font-size: 10px; letter-spacing: .1em; padding: 4px 10px; background: transparent; border: 2px solid var(--plum); color: var(--mute); }
.hold:hover { color: var(--bone); border-color: var(--bone); }
.hold[aria-pressed="true"] { background: var(--gold); color: var(--ink); border-color: var(--gold); }

.pull { display: block; width: 100%; min-height: clamp(74px, 11vw, 92px); background: var(--crimson); color: #fff; border: 5px solid var(--ink); box-shadow: inset 0 0 0 2px rgba(255,255,255,.14), 0 7px 0 var(--ink); font-family: var(--display); font-size: clamp(22px, 5vw, 42px); line-height: 1.08; letter-spacing: .025em; padding: 6px 12px; text-transform: uppercase; transition: transform .07s, box-shadow .07s, background .1s; }
.pull:hover:not([aria-busy="true"]) { background: var(--crimson-hot); }
.pull:active:not([aria-busy="true"]) { transform: translateY(6px); box-shadow: inset 0 0 0 2px rgba(255,255,255,.14), 0 1px 0 var(--ink); }
.pull[aria-busy="true"] { cursor: progress; animation: throb .5s ease-in-out infinite; }
@keyframes throb { 50% { background: #7c1731; } }

.under { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; font-size: 15px; color: var(--mute); }
.under p { margin: 0; min-width: 0; flex: 1 1 240px; }
.under kbd { font-family: var(--label); font-size: 10px; background: var(--ink); padding: 2px 6px; color: var(--bone); }

.stamp { position: absolute; z-index: 5; right: -112px; top: 30px; max-width: 7.4em; font-family: var(--label); font-size: clamp(12px, 2vw, 19px); line-height: 1.02; letter-spacing: .03em; text-align: center; padding: 7px 12px; border: 4px solid currentColor; background: var(--ink); rotate: 7deg; pointer-events: none; }
.stamp.slam { animation: slam .32s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes slam { 0% { transform: scale(3.2); opacity: 0; } 60% { opacity: 1; } 100% { transform: scale(1); } }
.t-common { color: var(--mute); }
.t-uncommon { color: var(--lime); }
.t-rare { color: #49d6ff; }
.t-mythic { color: var(--gold); }
.t-taken { color: #ff6b6b; }
.shake { animation: shake .5s linear; }
@keyframes shake { 15% { transform: translate(-7px, 3px); } 30% { transform: translate(6px, -4px); } 45% { transform: translate(-5px, -2px); } 60% { transform: translate(4px, 3px); } 80% { transform: translate(-2px, 1px); } }

