:root {
  --gold: #f8d134;
  --gold-2: #ffe991;
  --gold-dark: #b8860b;
  --pink: #ff6fa3;
  --ice: #8fd6ff;
  --ink: #0b0a14;
  --panel: rgba(18, 14, 34, 0.94);
  --panel-2: rgba(255, 255, 255, 0.06);
  --text: #fff6d6;
  --muted: #c9c2d9;
  --head: 'Dela Gothic One', 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, sans-serif;
  --piggy-size: 64px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; font-family: var(--body); color: var(--text); -webkit-tap-highlight-color: transparent; }

#game { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
#focus-sink { position: fixed; width: 1px; height: 1px; opacity: 0; left: -10px; top: -10px; border: 0; padding: 0; }

.hidden { display: none !important; }

.drag-shield { position: fixed; inset: 0; z-index: 29; background: transparent; touch-action: none; }

/* ============ Piggy widget ============ */
.piggy {
  position: fixed; z-index: 30; width: var(--piggy-size);
  left: 12px; top: 128px;
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab;
  display: flex; flex-direction: column; align-items: center;
}
.piggy.is-dragging { cursor: grabbing; }
.piggy.is-dragging .piggy__body { transform: scale(1.08); animation: none; }
.piggy__body { position: relative; width: 100%; animation: bob 3.2s ease-in-out infinite; transition: transform .18s ease; }
.piggy__img {
  width: 100%; height: auto; display: block;
  filter: drop-shadow(0 10px 8px rgba(0,0,0,.55)) drop-shadow(0 0 2px rgba(255,255,255,.35));
  transition: filter .3s;
}
.stage-diamond .piggy__img { filter: drop-shadow(0 10px 8px rgba(0,0,0,.55)) drop-shadow(0 0 8px rgba(143,214,255,.6)); }
.piggy.is-resting .piggy__img { filter: drop-shadow(0 10px 8px rgba(0,0,0,.55)) saturate(.5) brightness(.75); }
.piggy__bar {
  width: 84%; height: 8px; margin-top: -1px; border-radius: 999px; overflow: hidden;
  background: #14101f; border: 1px solid rgba(255,255,255,.55); box-shadow: 0 2px 6px rgba(0,0,0,.6), inset 0 1px 2px rgba(0,0,0,.8);
}
.piggy__fill {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(180deg, #fff3a6 0%, #ffd400 45%, #e0a800 100%); box-shadow: 0 0 10px rgba(255,212,0,1), inset 0 -1px 0 rgba(0,0,0,.25);
  transition: width .45s cubic-bezier(.2,.9,.3,1.2), background .4s;
}
.stage-gold .piggy__fill { background: linear-gradient(180deg, #ffe991, #ffb300 50%, #c98600); }
.stage-diamond .piggy__fill { background: linear-gradient(180deg, #ffffff, var(--ice) 50%, #3a9ae0); box-shadow: 0 0 10px rgba(143,214,255,1); }
.piggy__count {
  margin-top: 3px; font: 800 10px/1 var(--body); color: var(--gold-2); letter-spacing: .03em;
  text-shadow: 0 1px 0 #000, 0 0 4px rgba(0,0,0,.9); white-space: nowrap;
}
.piggy.is-resting .piggy__count { color: var(--muted); }
.piggy__badge {
  position: relative; margin-bottom: 2px; transform: scale(0); align-self: flex-start; transform-origin: left bottom;
  background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #3d3100; font: 9.5px/1 var(--head);
  padding: 4px 7px; border-radius: 999px; white-space: nowrap; box-shadow: 0 2px 10px rgba(248,209,52,.6);
  transition: transform .3s cubic-bezier(.2,.9,.3,1.4); cursor: pointer;
}
.piggy.is-full .piggy__badge { transform: scale(1); }
.piggy.is-full .piggy__body { animation: wobble 1.1s ease-in-out infinite; }
.piggy.is-full .piggy__img { filter: drop-shadow(0 10px 8px rgba(0,0,0,.55)) drop-shadow(0 0 14px rgba(143,214,255,.95)); }
.piggy__plus {
  position: absolute; left: 50%; top: -4px; transform: translate(-50%, 0); opacity: 0; pointer-events: none;
  font: 15px/1 var(--head); color: var(--gold-2); text-shadow: 0 1px 2px #000;
}
.piggy__plus.go { animation: floatUp .7s ease-out forwards; }
.piggy.bump .piggy__body { transform: scale(1.18); }
.piggy__zzz { position: absolute; right: -4px; top: -6px; font: 700 14px/1 var(--body); color: #fff; opacity: 0; text-shadow: 0 1px 2px #000; }
.piggy__zzz span { display: inline-block; font-size: 10px; }
.piggy.is-resting .piggy__zzz, .hub-zzz.on { opacity: 1; animation: zz 2.4s linear infinite; }

@keyframes bob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-4px) } }
@keyframes wobble { 0%,100% { transform: rotate(0) } 25% { transform: rotate(-7deg) scale(1.05) } 75% { transform: rotate(7deg) scale(1.05) } }
@keyframes floatUp { 0% { opacity: 1; transform: translate(-50%, 0) } 100% { opacity: 0; transform: translate(-50%, -34px) } }
@keyframes zz { 0% { transform: translateY(0); opacity: .4 } 50% { opacity: 1 } 100% { transform: translateY(-8px); opacity: 0 } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0 } 70% { transform: scale(1.08); opacity: 1 } 100% { transform: scale(1) } }

/* ============ Piggy speech bubble ============ */
.piggy__bubble {
  position: absolute; left: calc(100% + 4px); top: 10px; z-index: 2; width: max-content; max-width: 200px;
  background: var(--panel); border: 1px solid rgba(255,255,255,.2); color: var(--text);
  font: 600 12.5px/1.35 var(--body); padding: 8px 11px; border-radius: 14px 14px 14px 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,.55); opacity: 0; transform: translateX(-8px) scale(.85); transform-origin: left top;
  transition: opacity .25s, transform .25s cubic-bezier(.2,.9,.3,1.3); pointer-events: none;
}
.piggy__bubble::before { content: ''; position: absolute; left: -7px; top: 10px; border: 7px solid transparent; border-left: 0; border-right-color: rgba(255,255,255,.2); }
.piggy__bubble::after { content: ''; position: absolute; left: -5px; top: 11px; border: 6px solid transparent; border-left: 0; border-right-color: var(--panel); }
.piggy__bubble.show { opacity: 1; transform: none; }
.piggy__bubble b { color: var(--gold-2); }
.piggy.bubble-left .piggy__bubble { left: auto; right: calc(100% + 4px); border-radius: 14px 14px 4px 14px; transform-origin: right top; transform: translateX(8px) scale(.85); }
.piggy.bubble-left .piggy__bubble.show { transform: none; }
.piggy.bubble-left .piggy__bubble::before { left: auto; right: -7px; border-right: 0; border-left: 7px solid rgba(255,255,255,.2); }
.piggy.bubble-left .piggy__bubble::after { left: auto; right: -5px; border-right: 0; border-left: 6px solid var(--panel); }

/* coins popping out of the piggy on tap (visual only) */
.piggy__coins { position: absolute; inset: 0; pointer-events: none; }
.wcoin { position: absolute; left: 50%; top: 45%; width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff5b0, var(--gold) 45%, #a77800); box-shadow: 0 0 5px rgba(255,220,80,.9);
  animation: wfly 1.1s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes wfly { 0% { transform: translate(-50%,-50%) scale(.5); opacity: 1 } 75% { opacity: 1 } 100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1) rotate(200deg); opacity: 0 } }
.piggy.jiggle .piggy__body { animation: jiggle .45s ease-out; }
@keyframes jiggle { 0% { transform: rotate(0) } 20% { transform: rotate(-9deg) scale(1.08) } 50% { transform: rotate(8deg) scale(1.06) } 80% { transform: rotate(-4deg) } 100% { transform: rotate(0) } }

/* ============ Intro ============ */
.intro { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(0,0,0,.6); backdrop-filter: blur(3px); }
.intro__card { width: min(340px, 90vw); background: var(--panel); border: 1px solid rgba(255,255,255,.14); border-radius: 22px; padding: 22px 20px 20px; text-align: center; animation: pop .4s ease-out; }
.intro__pigs { position: relative; height: 96px; margin-top: -84px; }
.intro__pig { position: absolute; bottom: 0; width: 120px; height: auto; filter: drop-shadow(0 8px 10px rgba(0,0,0,.6)); }
.intro__pig--main { left: 50%; transform: translateX(-50%); z-index: 3; }
.intro__pig--left { left: 50%; transform: translateX(-118%) scale(.78); bottom: 14px; z-index: 1; filter: drop-shadow(0 8px 10px rgba(0,0,0,.6)) brightness(.9); }
.intro__pig--right { left: 50%; transform: translateX(18%) scale(.78); bottom: 14px; z-index: 1; filter: drop-shadow(0 8px 10px rgba(0,0,0,.6)) brightness(.9); }
.intro h2 { font: 22px/1.1 var(--head); margin: 10px 0 8px; color: var(--gold-2); }
.intro p { margin: 0 0 8px; font-size: 14px; color: var(--muted); line-height: 1.45; }
.intro__hint { font-size: 12px; opacity: .8; }

/* ============ Buttons ============ */
.btn { border: 0; border-radius: 999px; padding: 12px 22px; font: 15px/1 var(--head); cursor: pointer; letter-spacing: .02em; }
.btn--gold { background: linear-gradient(180deg, var(--gold-2), var(--gold) 60%, #d9a900); color: #3a2e00; box-shadow: 0 4px 0 #8a6a00, 0 8px 20px rgba(248,209,52,.35); }
.btn--gold:active { transform: translateY(2px); box-shadow: 0 2px 0 #8a6a00; }

/* ============ Modal ============ */
.modal { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; }
.modal__bg { position: absolute; inset: 0; background: rgba(5, 3, 14, .72); backdrop-filter: blur(4px); }
.modal__card {
  position: relative; width: min(380px, 94vw); max-height: 92vh; overflow: auto; border-radius: 24px;
  background: linear-gradient(180deg, rgba(14,10,30,.78), rgba(14,10,30,.96) 45%), url('assets/vault_bg.webp') center/cover; border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 30px 80px rgba(0,0,0,.7); animation: pop .35s ease-out;
}

.modal__close { position: absolute; right: 10px; top: 10px; z-index: 3; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(0,0,0,.4); color: #fff; font-size: 20px; cursor: pointer; }
.panel { position: relative; z-index: 2; padding: 22px 18px 20px; display: none; text-align: center; }
.panel.is-active { display: block; }
.panel__logo { width: 70%; max-width: 240px; display: block; margin: 0 auto 6px; filter: drop-shadow(0 2px 6px #000); }
.panel__title { font: 24px/1.1 var(--head); margin: 6px 0 4px; color: #fff; }
.panel__title em { font-style: normal; color: var(--gold); }
.panel__sub { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.panel__sub strong { color: var(--gold-2); }

/* smash minigame */
.smash-stage { position: relative; height: 230px; display: grid; place-items: center; }
.smash-pig { position: relative; width: 230px; height: 230px; display: grid; place-items: center; cursor: pointer; user-select: none; transition: transform .08s; filter: drop-shadow(0 12px 10px rgba(0,0,0,.6)) drop-shadow(0 0 18px rgba(143,214,255,.6)); }
.smash-pig img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.smash-pig .cracks { position: absolute; inset: 8%; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; opacity: 0; pointer-events: none; filter: drop-shadow(0 0 2px #000); transition: opacity .15s; }
.smash-pig.cracked .cracks { opacity: .95; }
.smash-pig.cracked img { animation: jitter .35s linear infinite; }
.smash-pig.hit { animation: hit .22s ease-out; }
.smash-pig.burst { animation: burst .5s ease-in forwards; }
@keyframes hit { 0% { transform: scale(1) rotate(0) } 30% { transform: scale(.92) rotate(-6deg) } 60% { transform: scale(1.06) rotate(5deg) } 100% { transform: scale(1) } }
@keyframes jitter { 0%,100% { transform: translate(0,0) } 25% { transform: translate(1.5px,-1px) } 50% { transform: translate(-1.5px,1px) } 75% { transform: translate(1px,1.5px) } }
@keyframes burst { 0% { transform: scale(1); opacity: 1 } 35% { transform: scale(1.18); opacity: 1 } 100% { transform: scale(.3); opacity: 0 } }
.particles { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.coin { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff5b0, var(--gold) 45%, #a77800); box-shadow: 0 0 6px rgba(255,220,80,.8); animation: fly .9s cubic-bezier(.2,.7,.3,1) forwards; }
.coin.gem { background: radial-gradient(circle at 35% 30%, #fff, var(--ice) 40%, #2b6fb0); border-radius: 30%; transform: rotate(45deg); }
.piece { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; object-fit: contain; animation: flyPiece 1.1s cubic-bezier(.2,.7,.4,1) forwards; filter: drop-shadow(0 4px 4px rgba(0,0,0,.5)); }
@keyframes flyPiece { 0% { transform: translate(-50%,-50%) scale(.6) rotate(0); opacity: 1 } 70% { opacity: 1 } 100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) + 60px)) scale(1) rotate(var(--rot)); opacity: 0 } }
@keyframes fly { 0% { transform: translate(-50%,-50%) scale(.4); opacity: 1 } 100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1) rotate(300deg); opacity: 0 } }
.smash-bar { height: 10px; margin: 6px 24px 0; background: rgba(0,0,0,.5); border-radius: 999px; overflow: hidden; border: 1px solid rgba(255,255,255,.18); }
.smash-bar__fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-2), var(--gold)); box-shadow: 0 0 8px var(--gold); transition: width .15s; }

/* reward */
.reward-main { margin: 8px 0 6px; }
.reward-coins { font: 56px/1 var(--head); color: var(--gold); text-shadow: 0 3px 0 #7a5a00, 0 0 30px rgba(248,209,52,.6); animation: pop .5s ease-out; }
.reward-coins small { display: block; font: 600 13px/1 var(--body); color: var(--muted); margin-top: 8px; letter-spacing: .12em; text-transform: uppercase; }
.reward-extra { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 14px 0 8px; animation: pop .5s .25s ease-out both; }
.reward-extra .card { width: 92px; height: 122px; }
.reward-extra__text { text-align: left; font-size: 14px; max-width: 180px; }
.reward-extra__text b { color: var(--gold-2); display: block; font: 15px/1.2 var(--head); margin-bottom: 4px; }
.reward-note { font-size: 12px; color: var(--muted); margin: 6px 0 14px; }

/* today's ladder */
.bar--ladder { margin: 0 0 12px; }
.bar--ladder .bar__fill { background: linear-gradient(90deg, var(--pink), var(--gold) 50%, var(--ice)); box-shadow: 0 0 10px rgba(248,209,52,.5); }
.ladder { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rung { background: var(--panel-2); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 10px 6px 8px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rung img { width: 58px; height: 58px; object-fit: contain; filter: drop-shadow(0 4px 4px rgba(0,0,0,.5)); }
.rung b { font: 11px/1.1 var(--head); color: #fff; margin-top: 4px; }
.rung span { font-size: 10.5px; color: var(--muted); }
.rung em { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--gold-2); margin-top: 4px; }
.rung--locked img { filter: grayscale(1) brightness(.45); }
.rung--locked b, .rung--locked em { color: var(--muted); }
.rung--done { border-color: rgba(248,209,52,.5); }
.rung--done em { color: #7ee787; }
.rung--current, .rung--ready { border-color: var(--gold); box-shadow: 0 0 14px rgba(248,209,52,.35); }
.rung--ready img { animation: wobble 1.1s ease-in-out infinite; }
.reward-extra { flex-wrap: wrap; }
.reward-extra__sep { flex-basis: 100%; height: 4px; }

/* hub */
.hub-head { display: flex; gap: 14px; align-items: center; text-align: left; margin-bottom: 10px; }
.hub-pig { position: relative; width: 84px; height: 84px; flex: none; display: grid; place-items: center; }
.hub-pig img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 6px rgba(0,0,0,.6)); }
.hub-zzz { opacity: 0; }
.hub-head h2 { font: 19px/1.15 var(--head); margin: 0 0 4px; color: #fff; }
.hub-head p { margin: 0; font-size: 13px; color: var(--muted); }
.hub-head strong { color: var(--gold-2); font-variant-numeric: tabular-nums; }
.hub-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.stat { background: var(--panel-2); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 8px 6px; }
.stat__val { display: block; font: 20px/1 var(--head); color: var(--gold); }
.stat__lbl { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: .08em; }
.tabs { display: flex; gap: 4px; background: rgba(0,0,0,.35); padding: 4px; border-radius: 999px; margin-bottom: 12px; }
.tab { flex: 1; border: 0; background: transparent; color: var(--muted); font: 600 12.5px/1 var(--body); padding: 9px 2px; border-radius: 999px; cursor: pointer; }
.tab.is-active { background: var(--gold); color: #3a2e00; }
.tabpanel { display: none; text-align: left; }
.tabpanel.is-active { display: block; }
.tabpanel__intro { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.tabpanel__intro strong { color: var(--gold-2); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.card { position: relative; border-radius: 14px; overflow: hidden; border: 2px solid rgba(255,255,255,.15); background: #1b1430; aspect-ratio: 3/4; display: flex; flex-direction: column; }
.card__img { flex: 1; width: 100%; min-height: 0; object-fit: contain; padding: 8px; background: radial-gradient(circle at 50% 40%, rgba(248,209,52,.22), transparent 70%); }
.card__name { font: 10px/1.1 var(--head); text-align: center; padding: 6px 4px; background: rgba(0,0,0,.5); color: var(--gold-2); }
.card.locked .card__img { filter: grayscale(1) brightness(.35); }
.card.locked .card__name { color: var(--muted); }
.card.locked::after { content: '?'; position: absolute; inset: 0 0 24px; display: grid; place-items: center; font: 34px var(--head); color: rgba(255,255,255,.5); }
.card.owned { border-color: var(--gold); box-shadow: 0 0 14px rgba(248,209,52,.35); }
.card__dup { position: absolute; top: 5px; right: 5px; background: var(--gold); color: #3a2e00; font: 800 10px/1 var(--body); padding: 3px 6px; border-radius: 999px; }
.card.new { animation: pop .5s ease-out; }
.pot { background: var(--panel-2); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 12px; margin-bottom: 10px; }
.pot__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.pot__head h3 { margin: 0; font: 15px/1 var(--head); color: #fff; }
.pot__tag { font: 700 10px/1 var(--body); text-transform: uppercase; letter-spacing: .1em; padding: 4px 8px; border-radius: 999px; background: rgba(143,214,255,.2); color: var(--ice); }
.pot__tag--op { background: rgba(255,111,163,.2); color: var(--pink); }
.pot__desc { font-size: 12.5px; color: var(--muted); margin: 0 0 8px; line-height: 1.45; }
.pot__desc strong { color: var(--gold-2); }
.bar { height: 12px; background: rgba(0,0,0,.5); border-radius: 999px; overflow: hidden; border: 1px solid rgba(255,255,255,.12); }
.bar__fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--ice), #4fa8ff); border-radius: 999px; transition: width .6s ease; box-shadow: 0 0 10px rgba(143,214,255,.6); }
.pot__meta { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.pot__meta strong { color: var(--gold-2); }
.feed { list-style: none; margin: 8px 0 0; padding: 0; max-height: 84px; overflow: hidden; font-size: 11.5px; color: var(--muted); }
.feed li { padding: 3px 0; border-top: 1px dashed rgba(255,255,255,.08); }
.feed b { color: #fff; }
.tickets { display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--muted); }
.tickets__num { font: 26px/1 var(--head); color: var(--pink); }
.howto { margin: 0; padding-left: 18px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.howto li { margin-bottom: 6px; }
.howto strong { color: var(--gold-2); }

/* ============ Dev panel ============ */
.dev-toggle { position: fixed; left: 10px; bottom: 10px; z-index: 44; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(0,0,0,.55); color: #fff; font-size: 18px; cursor: pointer; opacity: .55; }
.dev-toggle:hover { opacity: 1; }
.dev { position: fixed; left: 10px; bottom: 54px; z-index: 44; width: 260px; background: rgba(10,8,20,.95); border: 1px solid rgba(255,255,255,.16); border-radius: 14px; padding: 12px; font-size: 12px; color: var(--muted); }
.dev h4 { margin: 0 0 8px; font: 13px/1 var(--head); color: var(--gold-2); }
.dev__row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.dev button, .dev select { background: #221a3a; color: #fff; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; padding: 6px 9px; font-size: 12px; cursor: pointer; }
.dev label { display: flex; gap: 5px; align-items: center; }
.dev__note { margin: 4px 0 0; font-size: 10.5px; line-height: 1.4; opacity: .75; }

@media (max-width: 420px) {
  .modal__card { width: 100vw; max-height: 100vh; border-radius: 22px 22px 0 0; align-self: end; }
  .modal { place-items: end center; }
  .dev-toggle { left: auto; right: 12px; bottom: auto; top: 52px; width: 56px; height: 56px; font-size: 30px; }
  .dev { left: auto; right: 12px; bottom: auto; top: 116px; }
  .modal__card { background-position: center 70%; }
}

/* ============ Silver stage, hammer badge ============ */
.stage-silver .piggy__fill { background: linear-gradient(180deg, #ffffff, #d6dee8 50%, #9aa7b8); box-shadow: 0 0 10px rgba(230,238,250,1); }
.stage-silver .piggy__img { filter: drop-shadow(0 10px 8px rgba(0,0,0,.55)) drop-shadow(0 0 6px rgba(230,238,250,.55)); }
.piggy__hammer { position: absolute; right: -8px; top: -6px; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); border: 1.5px solid var(--ice); box-shadow: 0 0 10px rgba(143,214,255,.8); display: grid; place-items: center; animation: hammerPulse 1.6s ease-in-out infinite; }
.piggy__hammer svg { width: 17px; height: 17px; transform: rotate(-30deg); }
.piggy__hammer b { position: absolute; right: -5px; bottom: -5px; background: var(--ice); color: #06283d; font: 800 9px/1 var(--body); padding: 2px 4px; border-radius: 999px; }
@keyframes hammerPulse { 0%,100% { transform: scale(1) } 50% { transform: scale(1.14) } }
.piggy.is-hammer .piggy__badge { transform: scale(1); background: linear-gradient(180deg, #dff4ff, var(--ice)); color: #06283d; box-shadow: 0 2px 10px rgba(143,214,255,.7); }
.piggy.is-hammer .piggy__body { animation: wobble 1.1s ease-in-out infinite; }
.piggy.is-hammer .piggy__img { filter: drop-shadow(0 10px 8px rgba(0,0,0,.55)) drop-shadow(0 0 14px rgba(143,214,255,.95)); }

/* ============ Jackpot plates ============ */
.jp { position: relative; aspect-ratio: 577/327; background: center/contain no-repeat; display: grid; place-items: end center; }
.jp span { font: 15px/1 var(--head); color: #fff; text-shadow: 0 2px 0 #3a2500, 0 0 8px rgba(0,0,0,.8); padding-bottom: 15%; letter-spacing: .02em; }
.jp--mini  { background-image: url('assets/jp_mini.png'); }
.jp--minor { background-image: url('assets/jp_minor.png'); }
.jp--major { background-image: url('assets/jp_major.png'); }
.jp--maxi  { background-image: url('assets/jp_maxi.png'); }
.jp--community { background-image: url('assets/jp_community.png'); }
.jp--community::before { content: 'COMMUNITY'; position: absolute; left: 0; right: 0; top: 21%; text-align: center; font: 13px/1 var(--head); color: #1a1208; letter-spacing: -.02em;
  -webkit-text-stroke: .5px #f6d35a; text-shadow: 0 1px 0 #f6d35a, 0 2px 0 #b8860b, 0 3px 4px rgba(0,0,0,.6); }
.jp-grid .jp--community::before { top: 19%; font-size: 17px; }
.jp-row .jp--community::before { font-size: 8px; top: 23%; }
.jp--reward.jp--community::before { font-size: 16px; }
.jp.is-cycle { filter: brightness(1.35); transform: scale(1.06); }
.jp.is-win { filter: brightness(1.3) drop-shadow(0 0 12px #fff); transform: scale(1.14); animation: jpWin .5s ease-in-out infinite alternate; z-index: 2; }
@keyframes jpWin { from { transform: scale(1.1) } to { transform: scale(1.18) } }
.jp { transition: transform .12s, filter .12s; }

/* Diamond jackpot panel */
.jp-grid { display: grid; grid-template-columns: 1fr 1.3fr 1fr; grid-template-areas: "maxi grand major" "minor stage mini"; gap: 2px 6px; align-items: center; margin: 4px 0 2px; }
.jp-grid .jp--maxi { grid-area: maxi; } .jp-grid .jp--community { grid-area: grand; } .jp-grid .jp--major { grid-area: major; }
.jp-grid .jp--minor { grid-area: minor; } .jp-grid .jp--mini { grid-area: mini; }
.jp-grid .jp--community span { font-size: 18px; }
.jp-stage { grid-area: stage; position: relative; height: 190px; display: grid; place-items: center; }
.jp-stage .smash-pig { width: 170px; height: 170px; }
.hammer { position: absolute; width: 96px; height: 96px; right: 8%; top: 0; transform-origin: 85% 90%; transform: rotate(35deg); opacity: 0; filter: drop-shadow(0 6px 6px rgba(0,0,0,.6)); pointer-events: none; }
.hammer.swing { animation: swing 1.3s ease-in-out forwards; }
@keyframes swing { 0% { opacity: 0; transform: rotate(40deg) translate(20px,-20px) } 15% { opacity: 1; transform: rotate(45deg) translate(0,0) } 30% { transform: rotate(-35deg) translate(-30px,40px) } 42% { transform: rotate(30deg) translate(0,0) } 58% { transform: rotate(-35deg) translate(-30px,40px) } 70% { transform: rotate(30deg) translate(0,0) } 86% { transform: rotate(-40deg) translate(-34px,46px) } 100% { opacity: 0; transform: rotate(-40deg) translate(-34px,46px) } }
.jp-hint { min-height: 20px; margin: 6px 0 0; font: 15px/1.2 var(--head); color: var(--gold-2); text-align: center; }

/* hub diamond block */
.diamond-block { margin-top: 12px; background: linear-gradient(180deg, rgba(143,214,255,.12), rgba(143,214,255,.04)); border: 1px solid rgba(143,214,255,.35); border-radius: 16px; padding: 12px; }
.diamond-block.is-ready { box-shadow: 0 0 18px rgba(143,214,255,.35); border-color: var(--ice); }
.diamond-block__head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.diamond-block__head img { width: 56px; height: 56px; object-fit: contain; flex: none; filter: drop-shadow(0 4px 4px rgba(0,0,0,.5)); }
.diamond-block__head b { display: block; font: 13px/1.1 var(--head); color: #fff; margin-bottom: 4px; }
.diamond-block__head span { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.diamond-block__head strong { color: var(--ice); }
.jp-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-bottom: 10px; }
.jp-row .jp span { font-size: 9.5px; padding-bottom: 14%; }
.btn--ice { background: linear-gradient(180deg, #e8f7ff, var(--ice) 60%, #4fa8ff); color: #06283d; box-shadow: 0 4px 0 #2b6fb0, 0 8px 20px rgba(143,214,255,.35); display: inline-flex; align-items: center; gap: 8px; justify-content: center; }
.btn--ice:disabled { filter: grayscale(.7) brightness(.7); box-shadow: none; cursor: default; }
.btn--wide { width: 100%; }
.btn__ico { width: 20px; height: 20px; transform: rotate(-30deg); }
.reward-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.reward-item { display: flex; gap: 12px; align-items: center; justify-content: center; width: 100%; }
.reward-item--hammer .hammer-badge { width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #1b3a55, #0b1a2a); border: 2px solid var(--ice); box-shadow: 0 0 18px rgba(143,214,255,.7); display: grid; place-items: center; flex: none; }
.reward-item--hammer svg { width: 44px; height: 44px; transform: rotate(-30deg); }
.jp--reward { width: 150px; }
.jp--reward span { font-size: 18px; }
.rung i { font-style: normal; font-size: 10px; color: var(--muted); line-height: 1.3; margin-top: 2px; }
.rung i b { font: 800 10.5px/1.3 var(--body); color: var(--gold-2); }
.rung--locked i { opacity: .7; }

/* ============ Hero (feature page) ============ */
.hero { text-align: center; margin: -4px 0 10px; }
.hero__title { font: 19px/1.1 var(--head); margin: 0 0 2px; padding: 4px 34px 0; color: #fff; }
.hero__title em { font-style: normal; color: var(--gold); }
.hero__sub { margin: 0 0 4px; font-size: 12.5px; color: var(--muted); }
.hero__sub strong { color: var(--ice); }
.jp-grid--hero { margin: 2px 0 8px; }
.jp-stage--hero { height: 150px; }
.hero-pig { width: 140px; height: 140px; display: grid; place-items: center; filter: drop-shadow(0 10px 10px rgba(0,0,0,.6)) drop-shadow(0 0 16px rgba(143,214,255,.55)); animation: bob 3.2s ease-in-out infinite; }
.hero-pig img { width: 100%; height: 100%; object-fit: contain; }
.hero-pig.is-ready { animation: wobble 1.1s ease-in-out infinite; }
.hub-stats { grid-template-columns: repeat(2, 1fr); }
.pow { position: absolute; width: 150px; height: 150px; left: 50%; top: 50%; transform: translate(-50%,-50%) scale(0); opacity: 0; pointer-events: none; filter: drop-shadow(0 0 14px #fff); }
.pow.go { animation: pow .45s ease-out; }
@keyframes pow { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.2) rotate(-20deg) } 35% { opacity: 1; transform: translate(-50%,-50%) scale(1.15) rotate(8deg) } 100% { opacity: 0; transform: translate(-50%,-50%) scale(1.4) rotate(20deg) } }
.piggy__hammer svg { transform: none; }
.btn__ico { transform: none; }
.reward-item--hammer svg { transform: none; }

/* hero stats + pulsing smash button */
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 2px 0 10px; }
.hstat { background: var(--panel-2); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 9px 4px; text-align: center; }
.hstat__val { display: block; font: 16px/1 var(--head); color: var(--gold); white-space: nowrap; }
.hstat__lbl { display: block; font-size: 10px; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: .08em; }
#hub-hit:not(:disabled) { animation: btnPulse 1.4s ease-in-out infinite; }
@keyframes btnPulse { 0%,100% { transform: scale(1) } 50% { transform: scale(1.06) } }

/* merged "Your piggies" section + info button */
.info-btn { position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); background: rgba(0,0,0,.4); color: #fff; font: 700 14px/1 Georgia, serif; font-style: italic; cursor: pointer; z-index: 3; }
.hero { position: relative; }
.yours { text-align: left; margin-top: 14px; }
.yours__title { font: 16px/1.1 var(--head); color: #fff; margin: 0 0 6px; }
.yours__sub { font: 12px/1.1 var(--head); color: var(--gold-2); margin: 14px 0 8px; display: flex; align-items: baseline; gap: 8px; }
.yours__sub span { font: 600 11px/1 var(--body); color: var(--muted); }
.cards--row { grid-template-columns: repeat(6, 1fr); gap: 6px; }
.cards--row .card { border-radius: 10px; border-width: 1.5px; }
.cards--row .card__name { font-size: 7px; padding: 4px 2px; }
.cards--row .card.locked::after { font-size: 20px; inset: 0 0 16px; }
.cards--row .card__dup { top: 3px; right: 3px; font-size: 8px; padding: 2px 4px; }
.cards--row .card__img { padding: 4px; }
.panel--howto { text-align: left; }
.panel--howto .panel__title { text-align: center; }
.panel--howto .btn { display: block; margin: 14px auto 0; }

/* ============ Piggy Smash full-screen game ============ */
.sg { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; color: var(--text); overflow: hidden; animation: sgIn .35s ease-out; }
@keyframes sgIn { from { opacity: 0; transform: scale(1.04) } to { opacity: 1; transform: none } }
.sg__bg { position: absolute; inset: 0; background: #1a0f2b url('assets/vault_interior.webp') center 35%/cover no-repeat; }
.sg__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,6,20,.55), rgba(10,6,20,.15) 40%, rgba(10,6,20,.75)); }
.sg > *:not(.sg__bg) { position: relative; z-index: 1; }
.sg__top { display: flex; align-items: center; justify-content: space-between; padding: max(10px, env(safe-area-inset-top)) 12px 0; }
.sg__close { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.45); color: #fff; font-size: 22px; cursor: pointer; }
.sg__logo { height: 30px; max-width: 52vw; object-fit: contain; filter: drop-shadow(0 2px 6px #000); }
.sg__smashes { display: flex; align-items: center; gap: 5px; background: rgba(0,0,0,.5); border: 1px solid var(--ice); border-radius: 999px; padding: 5px 10px 5px 7px; font: 800 14px/1 var(--body); color: #fff; }
.sg__smashes svg { width: 18px; height: 18px; }
.sg__plates { display: grid; grid-template-columns: 1fr 1.1fr 1.35fr 1.1fr 1fr; gap: 3px; align-items: end; padding: 8px 6px 0; }
.sg__plates .jp span { font-size: 10px; padding-bottom: 22%; }
.sg__plates .jp--community span { font-size: 11px; }
.sg__plates .jp--community::before { font-size: 9.5px; top: 20%; }
.sg__plates .jp:nth-child(1), .sg__plates .jp:nth-child(5) { transform: translateY(10px); }
.sg__plates .jp:nth-child(2), .sg__plates .jp:nth-child(4) { transform: translateY(4px); }
.sg__plates .jp.is-win { transform: scale(1.12); }
.pips { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); display: flex; gap: 3px; }
.pips b { width: 9px; height: 9px; border-radius: 50%; background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.45); transition: background .2s, box-shadow .2s; }
.pips b.on { background: var(--gold); box-shadow: 0 0 6px var(--gold); }
.sg__hint { margin: 26px 16px 0; text-align: center; font: 600 13px/1.3 var(--body); color: var(--muted); min-height: 18px; }
.sg__hint b { color: var(--gold-2); }
.sg__stage { position: relative; flex: 1; display: grid; place-items: center; min-height: 0; margin-top: -10px; }
.sg__pillow { position: absolute; width: min(78vw, 330px); left: 50%; top: 50%; transform: translate(-50%, 42%); filter: drop-shadow(0 12px 10px rgba(0,0,0,.6)); }
.sg__pig { width: min(62vw, 250px); height: min(62vw, 250px); transform: translateY(-4%); }
.sg__pig.cracked img { animation: none; }
.sg__pig.hit { animation: hit .22s ease-out; }
.sg__pig.burst { animation: burst .55s ease-in forwards; }
.sg__tokens { position: absolute; inset: 0; pointer-events: none; }
.token { position: absolute; left: 50%; top: 45%; width: 46px; height: 46px; border-radius: 50%; border: 2px solid #fff; display: grid; place-items: center; font: 9px/1 var(--head); color: #fff; text-shadow: 0 1px 2px #000; box-shadow: 0 4px 12px rgba(0,0,0,.6); transform: translate(-50%,-50%) scale(.2); animation: tokenPop 1.05s cubic-bezier(.2,.8,.3,1) forwards; }
.token--mini { background: radial-gradient(circle at 35% 30%, #ff9bf0, #c400c4 60%, #6a006a); }
.token--minor { background: radial-gradient(circle at 35% 30%, #c9a8ff, #6a1fd6 60%, #35106b); }
.token--major { background: radial-gradient(circle at 35% 30%, #d9ff9b, #6dbf1a 60%, #2f6a05); }
.token--maxi { background: radial-gradient(circle at 35% 30%, #ffb09b, #e0331a 60%, #7a140a); }
.token--community { background: radial-gradient(circle at 35% 30%, #fff5b0, #f2c01a 60%, #8a6a00); color: #3a2c00; text-shadow: none; }
@keyframes tokenPop { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.2) } 20% { opacity: 1; transform: translate(-50%,-80%) scale(1.25) } 45% { transform: translate(-50%,-90%) scale(1.1) } 100% { opacity: 0; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(.4) } }
.sg__found { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; min-height: 30px; padding: 0 16px; }
.sg__found .chip { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.6); animation: pop .3s ease-out; }
.sg__start { padding: 10px 16px calc(18px + env(safe-area-inset-bottom)); text-align: center; }
.sg__start p { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.sg__start .btn { animation: btnPulse 1.4s ease-in-out infinite; }
.sg__start .btn:disabled { animation: none; filter: grayscale(.7) brightness(.7); box-shadow: none; }
.sg.is-playing .sg__start { visibility: hidden; }

/* tap burst: notes + numbers */
.wnote { position: absolute; left: 50%; top: 45%; width: 22px; height: 13px; border-radius: 2px; background: linear-gradient(135deg, #7ad68a, #2e8b45); border: 1px solid #d8ffdf; color: #e9ffe9; font: 800 9px/13px var(--body); text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,.6); animation: wflyRot 1.25s cubic-bezier(.2,.7,.3,1) forwards; }
.wnum { position: absolute; left: 50%; top: 45%; white-space: nowrap; font: 12px/1 var(--head); color: var(--gold-2); text-shadow: 0 1px 0 #000, 0 0 6px rgba(0,0,0,.9); animation: wflyRot 1.3s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes wflyRot { 0% { transform: translate(-50%,-50%) scale(.4) rotate(0); opacity: 1 } 75% { opacity: 1 } 100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) - 10px)) scale(1.1) rotate(var(--rot)); opacity: 0 } }
.piggy__coins { overflow: visible; }

/* per-tile progress */
.rung__bar { width: 100%; height: 6px; margin-top: 6px; border-radius: 999px; background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.2); overflow: hidden; }
.rung__fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--gold-2), var(--gold)); box-shadow: 0 0 6px rgba(248,209,52,.8); transition: width .5s ease; }
.rung--done .rung__fill { background: linear-gradient(90deg, #a8f5b8, #7ee787); box-shadow: 0 0 6px rgba(126,231,135,.8); }
.rung--locked .rung__bar { opacity: .5; }

.card--flip .card__img { transform: scaleX(-1); }

.dev__events { margin: 4px 0 0; font: 10px/1.35 ui-monospace, monospace; color: var(--ice); white-space: pre-wrap; max-height: 90px; overflow: hidden; background: rgba(0,0,0,.35); border-radius: 8px; padding: 6px; }
.dev__note b { color: var(--gold-2); }

/* coin drop every 5 spins + shake */
.piggy__drop { position: absolute; left: 50%; top: -22px; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; opacity: 0; pointer-events: none; z-index: 2; border: 1.5px solid #fff2a8;
  background: radial-gradient(circle at 35% 30%, #fff5b0, var(--gold) 45%, #a77800); box-shadow: 0 0 6px rgba(255,220,80,.9); }
.piggy__drop.go { animation: coinDrop .8s cubic-bezier(.4,0,.8,.4) forwards; }
@keyframes coinDrop { 0% { opacity: 0; transform: translateY(-22px) scaleX(1) } 12% { opacity: 1 } 70% { opacity: 1; transform: translateY(16px) scaleX(.8) } 100% { opacity: 0; transform: translateY(26px) scaleX(.2) } }
.piggy.shake .piggy__body { animation: pigShake .55s ease-out; }
@keyframes pigShake { 0% { transform: translate(0,0) rotate(0) } 15% { transform: translate(-3px,1px) rotate(-6deg) scale(1.06) } 30% { transform: translate(3px,-1px) rotate(6deg) scale(1.06) } 45% { transform: translate(-2px,1px) rotate(-4deg) } 60% { transform: translate(2px,0) rotate(3deg) } 80% { transform: translate(-1px,0) rotate(-1deg) } 100% { transform: translate(0,0) rotate(0) } }

/* modal: dynamic viewport + sticky close so the X is never under the browser chrome */
.modal__card { max-height: 92dvh; }
.modal__close { position: sticky; top: 8px; float: right; margin: 8px 8px -42px 0; }
@media (max-width: 420px) { .modal__card { max-height: 100dvh; padding-top: env(safe-area-inset-top); } }

/* ============ Modal sizing: feature page + How it works share one height ============ */
.modal--tall .modal__card { height: 92dvh; }
@media (max-width: 420px) { .modal--tall .modal__card { height: 100dvh; } }
.panel--howto { text-align: left; padding: 22px 18px 24px; }
.panel--howto .panel__title, .panel--howto .panel__sub { text-align: center; }
.panel--howto .panel__sub { margin-bottom: 14px; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { display: flex; gap: 12px; align-items: center; padding: 10px 10px; margin-bottom: 8px; background: var(--panel-2); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; counter-increment: step; position: relative; }
.steps li::before { content: counter(step); position: absolute; left: -4px; top: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--gold); color: #3a2e00; font: 800 11px/20px var(--body); text-align: center; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.steps img { width: 48px; height: 48px; object-fit: contain; flex: none; filter: drop-shadow(0 4px 4px rgba(0,0,0,.5)); }
.steps__clock { width: 48px; height: 48px; flex: none; display: grid; place-items: center; font-size: 26px; font-style: normal; }
.steps b { display: block; font: 13px/1.2 var(--head); color: var(--gold-2); margin-bottom: 3px; }
.steps div { font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.panel--howto .btn { display: block; margin: 16px auto 0; }

/* smash game: cash counter + burst items */
.sg__cash { position: absolute; left: 50%; top: 56px; transform: translateX(-50%); background: rgba(0,0,0,.55); border: 1px solid var(--gold); border-radius: 999px; padding: 4px 12px; font: 14px/1 var(--head); color: var(--gold-2); white-space: nowrap; }
.sg__cash.bump { animation: pop .3s ease-out; }
.cash { position: absolute; left: 50%; top: 45%; white-space: nowrap; padding: 4px 8px; border-radius: 999px; font: 13px/1 var(--head); color: #fff; text-shadow: 0 1px 2px #000; background: linear-gradient(135deg, #2e8b45, #1b5e2a); border: 1.5px solid #d8ffdf; box-shadow: 0 3px 10px rgba(0,0,0,.6); transform: translate(-50%,-50%) scale(.3); animation: cashFly 1.15s cubic-bezier(.2,.75,.3,1) forwards; }
.cash--big { background: linear-gradient(135deg, #f8d134, #b8860b); color: #3a2c00; text-shadow: none; font-size: 15px; }
@keyframes cashFly { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.3) } 12% { opacity: 1; transform: translate(calc(-50% + var(--dx) * .35), calc(-50% + var(--dy) * .35)) scale(1.2) } 70% { opacity: 1; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1) } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx) * 1.1), calc(-50% + var(--dy) * 1.1 + 20px)) scale(.9) } }

/* drag drips */
.drip { position: fixed; width: 10px; height: 10px; border-radius: 50%; pointer-events: none; z-index: 29; background: radial-gradient(circle at 35% 30%, #fff5b0, var(--gold) 45%, #a77800); box-shadow: 0 0 4px rgba(255,220,80,.8); animation: dripFall .9s ease-in forwards; }
.drip.gem { background: radial-gradient(circle at 35% 30%, #fff, var(--ice) 40%, #2b6fb0); border-radius: 30%; }
@keyframes dripFall { 0% { opacity: 1; transform: translate(0,0) scale(1) } 100% { opacity: 0; transform: translate(var(--dx), 70px) scale(.4) rotate(180deg) } }

/* ============ Welcome modal: jackpot-forward ============ */
.intro__card { position: relative; overflow: visible; width: min(350px, 92vw); padding: 22px 18px 20px;
  background: var(--panel); border-color: rgba(248,209,52,.45);
  box-shadow: 0 0 0 1px rgba(248,209,52,.15), 0 30px 80px rgba(0,0,0,.7); border-radius: 24px; }



.intro__pigs, .intro h2, .intro p, .intro__jackpot, .intro__plates, .intro__btn { position: relative; z-index: 1; }
.intro__pigs { height: 104px; margin-top: -86px; isolation: isolate; }
.intro__pig--main { width: 128px; }
.intro__pig--left, .intro__pig--right { z-index: 2; } .intro__pig--main { z-index: 3; }

.intro h2 { font-size: 24px; margin: 8px 0 6px; color: #fff; text-shadow: 0 2px 0 #7a5a00, 0 0 18px rgba(248,209,52,.5); }
.intro p { font-size: 13.5px; margin: 0 0 6px; }
.intro p strong { color: var(--gold-2); }
.intro__jackpot { width: 236px; margin: 2px auto 8px; filter: drop-shadow(0 0 14px rgba(248,209,52,.6)); animation: jpBreathe 1.6s ease-in-out infinite; }
@keyframes jpBreathe { 0%,100% { transform: scale(1) } 50% { transform: scale(1.06) } }
.intro__jackpot span { font-size: 26px; padding-bottom: 14%; }
.intro__jackpot.jp--community::before { font-size: 19px; top: 19%; }
.intro__plates { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0 2px 16px; align-items: end; }
.intro__plates .jp span { font-size: 9.5px; padding-bottom: 15%; }
.intro__btn { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; padding: 13px 26px; animation: btnPulse 1.4s ease-in-out infinite; }

/* intro coin flight + piggy spotlight */
.flycoin { position: fixed; z-index: 80; width: 26px; height: 26px; border-radius: 50%; pointer-events: none; border: 2px solid #fff2a8;
  background: radial-gradient(circle at 35% 30%, #fff5b0, var(--gold) 45%, #a77800); box-shadow: 0 0 14px rgba(255,220,80,1), 0 4px 10px rgba(0,0,0,.6); }
.piggy.spotlight::before { content: ''; position: absolute; left: 50%; top: 42%; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; pointer-events: none; z-index: -1;
  border: 3px solid var(--gold); box-shadow: 0 0 24px rgba(248,209,52,.9), inset 0 0 24px rgba(248,209,52,.5); animation: spot 1.3s ease-out 2; }
@keyframes spot { 0% { transform: scale(.4); opacity: 1 } 100% { transform: scale(1.3); opacity: 0 } }
.piggy.spotlight .piggy__img { filter: drop-shadow(0 10px 8px rgba(0,0,0,.55)) drop-shadow(0 0 16px rgba(248,209,52,1)); }

/* dev gear: top-right everywhere, state forcers */
.dev-toggle { left: auto; right: 12px; bottom: auto; top: 52px; width: 56px; height: 56px; font-size: 30px; opacity: 1; background: rgba(0,0,0,.7); border: 2px solid rgba(255,255,255,.55); box-shadow: 0 4px 14px rgba(0,0,0,.6); }
.dev { left: auto; right: 12px; bottom: auto; top: 116px; width: 280px; max-height: calc(100dvh - 110px); overflow: auto; }
.dev__lbl { width: 100%; font: 800 10px/1 var(--body); color: var(--gold-2); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 2px; }
.dev__row--states button { background: #2d2250; border-color: rgba(248,209,52,.35); }

/* desktop: start the piggy below the operator's top-left widget strip (Mr Bet Hunt etc.) */
@media (min-width: 768px) { .piggy { top: 56px; left: 240px; } }

/* Community plate: its art is 721x380 (not 577x327) — give it its own ratio and centre the amount on the plate face */
.jp--community { aspect-ratio: 721/380; }
.jp--community span { position: absolute; left: 0; right: 0; top: 50%; padding: 0 !important; text-align: center; transform: translateY(-12%); }

/* hero ticker: one stat at a time */
.hero-ticker { position: relative; display: flex; align-items: center; justify-content: center; gap: 9px; margin: 4px 0 10px; padding: 14px 12px 12px; background: linear-gradient(180deg, rgba(248,209,52,.14), rgba(248,209,52,.05)); border: 1px solid rgba(248,209,52,.55); border-radius: 14px; min-height: 50px; overflow: hidden; box-shadow: 0 0 18px rgba(248,209,52,.18), inset 0 0 0 1px rgba(255,255,255,.06); }
.hero-ticker-wrap { margin: 4px 0 10px; text-align: left; }
.hero-ticker-wrap .hero-ticker { margin: 0; }
.hero-ticker__tag { display: inline-block; margin: 0 0 4px 6px; font: 800 9px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: #3a2e00; background: var(--gold); padding: 4px 8px; border-radius: 999px; }
.hero-ticker__tag::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #e0331a; margin-right: 5px; vertical-align: middle; animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25 } }
.hero-ticker__val { font: 22px/1 var(--head); color: var(--gold); white-space: nowrap; }
.hero-ticker__lbl { font: 700 12px/1 var(--body); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; padding-top: 2px; }
.hero-ticker.swap .hero-ticker__val, .hero-ticker.swap .hero-ticker__lbl { animation: tick .5s ease-out; }
@keyframes tick { 0% { opacity: 0; transform: translateY(10px) } 100% { opacity: 1; transform: none } }

.panel__sub--below { margin: 6px 0 8px; font: 15px/1.2 var(--head); color: var(--gold-2); }
.sg__smashes span { font: 700 11px/1 var(--body); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* piggy tiles: aligned, bigger Smashes figure */
.rung { justify-content: flex-start; padding: 10px 6px 10px; }
.rung span { white-space: nowrap; font-size: 10px; }
.rung i { margin-top: 6px; }
.rung i b { display: block; font: 22px/1 var(--head); color: var(--gold); text-shadow: 0 2px 0 #7a5a00; margin: 2px 0 1px; }
.rung--locked i b { color: var(--muted); text-shadow: none; }
.rung .rung__bar { margin-top: auto; }
.rung em { margin-top: 6px; white-space: nowrap; font-size: 10px; }
.card--flip .card__img { transform: none; }

.reward-pig { width: 92px; height: 92px; object-fit: contain; filter: drop-shadow(0 6px 6px rgba(0,0,0,.6)); }

/* crack reward: diamond imagery + ghost CTA */
.reward-diamond { width: 150px; height: 150px; object-fit: contain; display: block; margin: 4px auto 2px; filter: drop-shadow(0 10px 10px rgba(0,0,0,.6)) drop-shadow(0 0 16px rgba(143,214,255,.6)); animation: bob 3.2s ease-in-out infinite; }
.btn--ghost { background: transparent; color: var(--muted); border: 1px solid rgba(255,255,255,.25); box-shadow: none; font-size: 13px; padding: 10px 18px; }
.reward-actions { flex-direction: column; align-items: center; gap: 10px; }
.reward-actions .btn--wide { width: 100%; }

/* smash game: big hint, counter, bigger cash */
.sg__hint--big { font: 20px/1.15 var(--head); color: #fff; text-shadow: 0 2px 0 #000, 0 0 12px rgba(0,0,0,.8); margin-top: 22px; }
.sg__hint--big b { color: var(--gold-2); }
.sg__counter { margin: 4px 0 0; text-align: center; font: 800 13px/1 var(--body); color: var(--gold-2); letter-spacing: .08em; text-transform: uppercase; text-shadow: 0 1px 2px #000; min-height: 14px; }
.cash { font-size: 20px; padding: 6px 12px; border-width: 2px; }
.cash--big { font-size: 24px; }

/* celebration end screen */

.sg__rain { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.sg__rain i { position: absolute; top: -30px; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff5b0, var(--gold) 45%, #a77800); box-shadow: 0 0 8px rgba(255,220,80,.9); animation: rain linear infinite; }
.sg__rain i.gem { background: radial-gradient(circle at 35% 30%, #fff, var(--ice) 40%, #2b6fb0); border-radius: 30%; }
@keyframes rain { 0% { transform: translateY(-40px) rotate(0) } 100% { transform: translateY(110vh) rotate(720deg) } }










/* unlock spotlight reuse */
.piggy.unlock .piggy__body { animation: pigShake .55s ease-out; }

/* full: 4-second attention burst (jump + shake), then the gentle wobble */
.piggy.is-full .piggy__body { animation: wobble 1.1s ease-in-out infinite; }
.piggy.is-full.attention .piggy__body { animation: attention .8s cubic-bezier(.3,.7,.3,1) 5; }
@keyframes attention {
  0% { transform: translateY(0) rotate(0) scale(1) }
  18% { transform: translateY(-16px) rotate(-10deg) scale(1.1) }
  30% { transform: translateY(-18px) rotate(10deg) scale(1.1) }
  42% { transform: translateY(-14px) rotate(-8deg) scale(1.08) }
  55% { transform: translateY(0) rotate(0) scale(.94, 1.06) }
  65% { transform: translateY(0) rotate(0) scale(1.08, .92) }
  75% { transform: translateY(-4px) rotate(4deg) scale(1) }
  85% { transform: translateY(0) rotate(-3deg) }
  100% { transform: translateY(0) rotate(0) scale(1) }
}
.piggy.is-full .piggy__fill { animation: fillFlash .6s ease-in-out 4; }
@keyframes fillFlash { 50% { filter: brightness(1.8) } }

/* smash game header: big centred countdown */
.sg__top { position: relative; }
.sg__spacer { width: 36px; }
.sg__counter-row { display: flex; justify-content: center; margin-top: 18px; }
.sg__smashes { position: static; transform: none; padding: 9px 22px; border-width: 2px; gap: 8px; }
.sg__smashes b { font: 30px/1 var(--head); color: var(--gold-2); text-shadow: 0 2px 0 #7a5a00; }
.sg__smashes span { font-size: 12px; color: #fff; }
.sg__smashes.tick b { animation: pop .3s ease-out; }
/* prompt below the piggy with animated finger */
.sg__prompt { text-align: center; padding: 0 16px; margin-top: -6px; }
.sg__finger { width: 44px; height: 44px; display: block; margin: 0 auto 2px; transform-origin: 50% 90%; animation: fingerTap 1.1s ease-in-out infinite; filter: drop-shadow(0 4px 6px rgba(0,0,0,.6)); }
@keyframes fingerTap { 0%,100% { transform: translateY(0) rotate(-8deg) scale(1) } 40% { transform: translateY(-14px) rotate(-8deg) scale(1.05) } 55% { transform: translateY(2px) rotate(-8deg) scale(.95) } }
.sg__prompt .sg__hint--big { margin-top: 0; }
.sg.is-playing .sg__finger { animation-duration: .8s; }

/* ============ Win celebration: full-screen overlay, slot-style ============ */
.sg__win { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 42%, rgba(30,18,50,.9), rgba(6,4,14,.96) 62%); backdrop-filter: blur(6px); animation: sgIn .35s ease-out; }
.sg__rays { position: absolute; left: 50%; top: 42%; width: 160vmax; height: 160vmax; margin: -80vmax 0 0 -80vmax; background: repeating-conic-gradient(from 0deg, rgba(248,209,52,.22) 0deg 7deg, transparent 7deg 20deg); -webkit-mask: radial-gradient(circle, #000 0, rgba(0,0,0,.7) 30%, transparent 62%); mask: radial-gradient(circle, #000 0, rgba(0,0,0,.7) 30%, transparent 62%); animation: rays 30s linear infinite; }
@keyframes rays { to { transform: rotate(360deg) } }
.sg__rain { position: absolute; inset: 0; pointer-events: none; }
.sg__rain i { position: absolute; top: -40px; width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff5b0, var(--gold) 45%, #a77800); box-shadow: 0 0 8px rgba(255,220,80,.9); animation: rain linear infinite; }
.sg__rain i.gem { background: radial-gradient(circle at 35% 30%, #fff, var(--ice) 40%, #2b6fb0); border-radius: 30%; }
.sg__rain i.note { width: 30px; height: 17px; border-radius: 3px; background: linear-gradient(135deg, #7ad68a, #2e8b45); border: 1px solid #d8ffdf; box-shadow: 0 2px 5px rgba(0,0,0,.5); }
@keyframes rain { 0% { transform: translateY(-40px) rotate(0) } 100% { transform: translateY(115vh) rotate(720deg) } }
.sg__burst { position: absolute; left: 50%; top: 45%; pointer-events: none; }
.sg__burst i { position: absolute; left: 0; top: 0; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff5b0, var(--gold) 45%, #a77800); box-shadow: 0 0 8px rgba(255,220,80,.9); animation: burstFly 1.3s cubic-bezier(.15,.8,.3,1) forwards; }
@keyframes burstFly { 0% { transform: translate(-50%,-50%) scale(.3); opacity: 1 } 70% { opacity: 1 } 100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) + 120px)) scale(1) rotate(540deg); opacity: 0 } }
.sg__win-body { position: relative; text-align: center; padding: 0 20px; width: 100%; }
.sg__win-tier { font: 54px/0.95 var(--head); color: #fff; text-transform: uppercase; letter-spacing: .01em; animation: tierIn .7s cubic-bezier(.2,.9,.3,1.4) both; text-shadow: 0 3px 0 #7a5a00, 0 6px 0 #3a2800, 0 0 30px rgba(248,209,52,.6); }
.sg__win-tier span { display: block; font-size: 64px; color: #ffd400; text-shadow: 0 3px 0 #7a5a00, 0 6px 0 #3a2800, 0 0 24px rgba(248,209,52,.9); }
.sg__win-tier em { font-style: normal; display: block; font-size: 40px; margin-top: 2px; }
.sg__win-tier.is-super span { color: #ff6fa3; text-shadow: 0 3px 0 #7a1f45, 0 6px 0 #3a0a20, 0 0 24px rgba(255,111,163,.9); }
.sg__win-tier.is-mega span { color: #8fd6ff; text-shadow: 0 3px 0 #1d4f80, 0 6px 0 #0b2540, 0 0 24px rgba(143,214,255,.9); }
.sg__win-tier.is-epic span { color: #ff5f5f; font-size: 72px; text-shadow: 0 3px 0 #7a1010, 0 6px 0 #3a0505, 0 0 30px rgba(255,95,95,1), 0 0 60px rgba(248,209,52,.7); }
.sg__win-tier.hidden { display: none; }
@keyframes tierIn { 0% { transform: scale(.2) rotate(-8deg); opacity: 0 } 60% { transform: scale(1.15) rotate(2deg); opacity: 1 } 100% { transform: none } }
.sg__win-lbl { margin: 10px 0 0; font: 800 13px/1 var(--body); color: #fff; text-transform: uppercase; letter-spacing: .18em; text-shadow: 0 1px 2px #000; }
.sg__win-amount { font: 68px/1 var(--head); color: var(--gold); text-shadow: 0 4px 0 #7a5a00, 0 8px 0 #3a2800, 0 0 40px rgba(248,209,52,.8); margin: 6px 0 12px; animation: amountPulse 1s ease-in-out infinite alternate; }
@keyframes amountPulse { from { transform: scale(1) } to { transform: scale(1.05) } }
.sg__win-jps { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 0 auto 18px; max-width: 330px; }
.sg__win-jps .jp { width: 78px; animation: pop .4s ease-out both; }
.sg__win-jps .jp span { font-size: 8.5px; }
.sg__win-btn { font-size: 18px; padding: 15px 40px; animation: btnPulse 1.4s ease-in-out infinite; box-shadow: 0 4px 0 #8a6a00, 0 10px 30px rgba(248,209,52,.5); }

/* while playing: tooltip gone, big countdown below the pig */
.sg__big { display: none; align-items: baseline; justify-content: center; gap: 10px; }
.sg__big b { font: 64px/1 var(--head); color: var(--gold-2); text-shadow: 0 4px 0 #7a5a00, 0 8px 0 #3a2800, 0 0 24px rgba(248,209,52,.8); }
.sg__big span { font: 800 16px/1 var(--body); color: #fff; text-transform: uppercase; letter-spacing: .14em; text-shadow: 0 1px 2px #000; }
.sg__big.tick b { animation: pop .3s ease-out; }
.sg.is-playing .sg__big { display: flex; }
.sg.is-playing .sg__finger, .sg.is-playing .sg__hint { display: none; }
.sg.is-playing .sg__smashes { display: none; }
.sg__counter-row .sg__big { margin-top: 2px; }
.sg.is-playing .sg__counter { display: none; }
.sg__sofar { display: none; font: 56px/1 var(--head); color: var(--gold); text-shadow: 0 4px 0 #7a5a00, 0 8px 0 #3a2800, 0 0 30px rgba(248,209,52,.7); }
.sg__sofar small { display: block; font: 800 12px/1 var(--body); color: #fff; letter-spacing: .14em; text-transform: uppercase; text-shadow: 0 1px 2px #000; margin-top: 4px; }
.sg.is-playing .sg__sofar { display: block; }
.sg__sofar.tick { animation: pop .3s ease-out; }

/* ============ Themes ============ */
:root { --accent: #f8d134; --accent2: #8fd6ff; }
.piggy__prop { display: none; }
.rung { position: relative; }
.rung__badge { position: absolute; right: 6px; top: 6px; font-size: 18px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.7)); }
.rung--mystery { justify-content: center; border-style: dashed; }
.rung__q { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font: 34px var(--head); color: var(--muted); background: rgba(255,255,255,.06); border: 2px dashed rgba(255,255,255,.25); }
.rung--mystery b { font: 11px/1.1 var(--head); color: #fff; margin-top: 6px; }
.rung--mystery i { font-style: normal; font-size: 10px; color: var(--muted); line-height: 1.3; margin-top: 6px; }
.rung--mystery em { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--muted); margin-top: 8px; }
.sg__rain i.emo { width: auto; height: auto; border-radius: 0; background: none; box-shadow: none; font-size: 26px; line-height: 1; filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); }
/* accent hooks */
.piggy__badge { background: linear-gradient(180deg, #fff, var(--accent)); }
.piggy.is-full .piggy__img { filter: drop-shadow(0 10px 8px rgba(0,0,0,.55)) drop-shadow(0 0 14px var(--accent)); }
.piggy__bubble { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.piggy__bubble::before { border-right-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.hero__title em, .intro h2, .yours__title { color: var(--accent); }
.hero-ticker__tag { background: var(--accent); }
.rung--current, .rung--ready { border-color: var(--accent); box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 35%, transparent); }
.intro__card, .modal__card { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.btn--gold { background: linear-gradient(180deg, #fff6c2, var(--accent) 60%, color-mix(in srgb, var(--accent) 70%, #000)); }
.btn--ice { background: linear-gradient(180deg, #fff, var(--accent2) 60%, color-mix(in srgb, var(--accent2) 70%, #000)); box-shadow: 0 4px 0 color-mix(in srgb, var(--accent2) 50%, #000), 0 8px 20px color-mix(in srgb, var(--accent2) 35%, transparent); }
/* per-theme modal tints */
.theme-halloween .modal__card, .theme-halloween .intro__card { background: linear-gradient(180deg, rgba(40,10,60,.85), rgba(14,6,26,.97) 55%), url('assets/vault_bg.webp') center/cover; }
.theme-halloween .intro__card { background: linear-gradient(180deg, #2a0b3d, #130520); }
.theme-paddys .modal__card { background: linear-gradient(180deg, rgba(8,50,28,.85), rgba(4,22,12,.97) 55%), url('assets/vault_bg.webp') center/cover; }
.theme-paddys .intro__card { background: linear-gradient(180deg, #0b3d22, #06180f); }
.theme-easter .modal__card { background: linear-gradient(180deg, rgba(60,30,60,.82), rgba(26,12,30,.96) 55%), url('assets/vault_bg.webp') center/cover; }
.theme-easter .intro__card { background: linear-gradient(180deg, #3d1f3a, #1a0c1c); }
.theme-christmas .modal__card { background: linear-gradient(180deg, rgba(60,10,16,.85), rgba(14,22,14,.97) 55%), url('assets/vault_bg.webp') center/cover; }
.theme-christmas .intro__card { background: linear-gradient(180deg, #3d0c12, #0c1a0e); }
.theme-halloween .sg__bg::after { background: linear-gradient(180deg, rgba(40,10,60,.6), rgba(255,122,0,.12) 40%, rgba(20,5,30,.8)); }
.theme-paddys .sg__bg::after { background: linear-gradient(180deg, rgba(8,50,28,.55), rgba(46,204,113,.12) 40%, rgba(4,22,12,.8)); }
.theme-easter .sg__bg::after { background: linear-gradient(180deg, rgba(255,143,200,.3), rgba(143,240,200,.12) 40%, rgba(40,20,40,.7)); }
.theme-christmas .sg__bg::after { background: linear-gradient(180deg, rgba(60,10,16,.6), rgba(143,214,255,.12) 40%, rgba(14,22,14,.8)); }
.theme-halloween .sg__win { background: radial-gradient(circle at 50% 42%, rgba(60,20,90,.92), rgba(10,4,16,.97) 62%); }
.theme-paddys .sg__win { background: radial-gradient(circle at 50% 42%, rgba(10,70,35,.92), rgba(4,14,8,.97) 62%); }
.theme-christmas .sg__win { background: radial-gradient(circle at 50% 42%, rgba(80,14,20,.92), rgba(8,14,8,.97) 62%); }
.theme-easter .sg__win { background: radial-gradient(circle at 50% 42%, rgba(90,40,80,.92), rgba(20,10,22,.97) 62%); }
