/* UI. Layout: full-screen 3D candy world on canvas, DOM HUD + dialogs on top.
   Premium look: deep jewel panels, polished gold trim, glossy chunky buttons, one bold display face. */
:root {
  --ink: #ffffff;
  --ink-soft: #d3c4f2;
  --ink-mute: #a996d6;
  --panel-a: #4b1e92;
  --panel-b: #260c55;
  --panel-edge: #f6c453;
  --panel-out: #1a063c;
  --glass: rgba(14, 4, 34, .62);
  --row: rgba(255, 255, 255, .07);
  --row-line: rgba(255, 255, 255, .11);
  --gold-a: #fff0a8; --gold-b: #f7b52c; --gold-e: #8a4a00;
  --green-a: #8ef05c; --green-b: #2fae3e; --green-e: #12601f;
  --orange-a: #ffd05a; --orange-b: #ff8a14; --orange-e: #8f3d00;
  --blue-a: #74d2ff; --blue-b: #2b86ff; --blue-e: #0e3d8f;
  --ruby-a: #ff7a90; --ruby-b: #e2183f; --ruby-e: #700a20;
  --purple-a: #c49cff; --purple-b: #7d3cf0; --purple-e: #3a1180;
  --grey-a: #8a80a8; --grey-b: #5d547a; --grey-e: #2e2745;
  --scrim: rgba(8, 2, 22, .72);
  --display: 'Lilita One', 'Arial Rounded MT Bold', 'Trebuchet MS', system-ui, sans-serif;
  --body: 'Fredoka', 'Trebuchet MS', system-ui, sans-serif;
  --safe-t: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
  --safe-b: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  /* text outlines are real strokes painted behind the letters (smooth on sharp screens); never fake them with offset shadows */
  --outline-c: rgba(20, 4, 40, .9);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; overscroll-behavior: none; }
[hidden] { display: none !important; }
body {
  margin: 0; overflow: hidden; background: #1a0838; color: var(--ink);
  font-family: var(--body); font-size: 15px; font-weight: 500;
  -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
button { font: inherit; color: inherit; }
button:focus-visible { outline: 3px solid var(--gold-b); outline-offset: 2px; }
:is(svg, img).ic { width: 24px; height: 24px; flex: none; vertical-align: middle; }
#world { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.screen { position: fixed; inset: 0; pointer-events: none; display: flex; flex-direction: column; padding: calc(var(--safe-t) + 10px) 14px calc(var(--safe-b) + 12px); }
.screen > * { pointer-events: auto; }
.screen .spacer { flex: 1; pointer-events: none; }

/* ---------- splash ---------- */
#splash { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: radial-gradient(circle at 50% 42%, #c55ff2, #7a18bd 45%, #2c0752); transition: opacity .4s ease; }
#splash.gone { opacity: 0; pointer-events: none; }
#splash .inner { display: flex; flex-direction: column; align-items: center; gap: 26px; width: min(280px, 80vw); }
#splash .load { width: 100%; height: 14px; border-radius: 99px; background: rgba(0,0,0,.35); box-shadow: 0 0 0 2px rgba(246,196,83,.8); overflow: hidden; }
#splash .load i { display: block; height: 100%; width: 4%; border-radius: 99px; background: linear-gradient(90deg, var(--gold-a), var(--gold-b)); transition: width .15s ease; }
#splash p { margin: 0; font-family: var(--display); letter-spacing: .5px; color: var(--ink-soft); }

/* ---------- logo ---------- */
.logo { position: relative; display: flex; flex-direction: column; align-items: center; font-family: var(--display); text-transform: uppercase; line-height: .9; text-align: center; }
.logo .logo-crown { width: clamp(44px, 7.5vh, 64px); height: clamp(44px, 7.5vh, 64px); margin-bottom: -10px; filter: drop-shadow(0 4px 0 rgba(40,8,70,.55)); transform: rotate(-6deg); z-index: 1; }
.logo .l1 { font-size: clamp(30px, min(11.5vw, 6.6vh), 62px); letter-spacing: 1px; white-space: nowrap;
  background: linear-gradient(180deg, #fffbe0 0%, #ffd84a 42%, #ff9a10 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #7a1fb0) drop-shadow(0 -2px 0 #7a1fb0) drop-shadow(2px 0 0 #7a1fb0) drop-shadow(-2px 0 0 #7a1fb0) drop-shadow(0 7px 0 #2a0754) drop-shadow(0 12px 16px rgba(0,0,0,.45)); }
.logo .l2 { margin-top: 8px; font-size: clamp(16px, min(5vw, 2.8vh), 24px); letter-spacing: 6px; padding: 4px 18px 5px 24px; color: #fff; border-radius: 10px;
  background: linear-gradient(#ff2e55, #b8002a); box-shadow: 0 0 0 2.5px #ffd24a, 0 0 0 5px #6a0420, 0 5px 0 5px #6a0420, 0 10px 18px rgba(0,0,0,.4), inset 0 2px 0 rgba(255,255,255,.35); -webkit-text-stroke: 3px #5a0018; paint-order: stroke fill; text-shadow: 0 2px 0 #5a0018; }
.logo .l1.drawn { position: relative; color: transparent; background: none; -webkit-background-clip: border-box; background-clip: border-box; filter: none; }
.logo .l1 .l1-art { position: absolute; max-width: none; height: auto; pointer-events: none; }
#splash .logo .l1 { font-size: clamp(30px, 10.5vw, 60px); }   /* with its outline the word art is ~1.12× the text: 10.5vw keeps it inside even a 320px screen */

/* ---------- currency pills & round buttons ---------- */
.hud { display: flex; align-items: center; gap: 8px; }
.hud .grow { flex: 1; }
.pill { display: flex; align-items: center; height: 38px; padding: 0 4px 0 2px; border-radius: 999px; background: var(--glass); border: 2px solid rgba(246,196,83,.85); box-shadow: 0 3px 0 rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.12); cursor: pointer; gap: 6px; min-width: 0; color: #fff; }
.pill .ic { width: 32px; height: 32px; flex: none; margin-left: -4px; }
.pill b { font-family: var(--display); font-weight: 400; font-size: 18px; letter-spacing: .4px; font-variant-numeric: tabular-nums; min-width: 34px; text-align: left; -webkit-text-stroke: 3px var(--outline-c); paint-order: stroke fill; text-shadow: 0 2px 0 var(--outline-c); }
.pill .plus { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(var(--green-a), var(--green-b)); color: #fff; display: grid; place-items: center; font-family: var(--display); font-size: 19px; line-height: 1; box-shadow: inset 0 -2px 0 var(--green-e), 0 0 0 1.5px var(--green-e); text-shadow: 0 1px 0 var(--green-e); }
.round { width: 46px; height: 46px; border-radius: 15px; border: 2px solid var(--panel-edge); cursor: pointer; display: grid; place-items: center; background: linear-gradient(#6a33c2, #33106a); box-shadow: 0 4px 0 #14042e, inset 0 2px 0 rgba(255,255,255,.22); color: #fff; flex: none; }
.round :is(svg, img) { width: 28px; height: 28px; }
.round:active { transform: translateY(3px); box-shadow: 0 1px 0 #14042e; }
/* hearts */
.pill.hearts { gap: 4px; padding-right: 10px; }
.pill.hearts .heart-ic { position: relative; width: 34px; height: 34px; flex: none; margin-left: -4px; display: grid; place-items: center; }
.pill.hearts .heart-ic :is(svg, img) { position: absolute; inset: 0; width: 34px; height: 34px; }
.pill.hearts .heart-ic b { position: relative; min-width: 0; text-align: center; font-size: 15px; margin-top: -2px; -webkit-text-stroke: 2px rgba(90,0,20,.9); paint-order: stroke fill; text-shadow: 0 1px 0 rgba(90,0,20,.9); }
.pill.hearts em { font-style: normal; font-family: var(--display); font-size: 14px; letter-spacing: .3px; color: #fff; -webkit-text-stroke: 3px var(--outline-c); paint-order: stroke fill; text-shadow: 0 2px 0 var(--outline-c); white-space: nowrap; font-variant-numeric: tabular-nums; }
.round.restart { position: relative; }
.heart-badge { position: absolute; bottom: -8px; right: -10px; min-width: 26px; height: 24px; padding: 0 7px 0 6px; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; font-style: normal; font-family: var(--display); font-size: 13px; color: #fff; background: linear-gradient(#ff6a82, #e2183f); border: 2px solid #fff; box-shadow: 0 2px 0 rgba(0,0,0,.3); text-shadow: 0 1px 0 #700a20; }
.heart-badge::before { content: '♥'; margin-right: 2px; font-size: 11px; }
.hearts-big { display: flex; justify-content: center; gap: 6px; margin: 4px 0 10px; }
.hearts-big :is(svg, img) { width: 46px; height: 46px; filter: drop-shadow(0 3px 0 rgba(0,0,0,.3)); }
.hearts-big .empty { opacity: .28; filter: grayscale(1); }
/* narrow phones: the coin/gem pills drop their "+" (the pill itself still opens the shop) so the hearts timer fits */
@media (max-width: 370px) {
  #home .hud { gap: 5px; }
  #home .pill .plus { display: none; }
  #home .pill { padding-right: 9px; }
  #home .pill b { min-width: 0; font-size: 16px; }
  .pill.hearts em { font-size: 12.5px; }
}

/* ---------- chunky buttons ---------- */
.btn { --a: var(--green-a); --b: var(--green-b); --e: var(--green-e);
  position: relative; border: 0; cursor: pointer; border-radius: 20px; padding: 12px 22px 13px;
  font-family: var(--display); font-weight: 400; font-size: 21px; letter-spacing: .5px; color: #fff;
  background: linear-gradient(var(--a), var(--b)); box-shadow: 0 0 0 2.5px var(--e), 0 6px 0 var(--e), 0 10px 18px rgba(0,0,0,.4), inset 0 2px 0 rgba(255,255,255,.5);
  -webkit-text-stroke: 3px var(--e); paint-order: stroke fill; text-shadow: 0 2px 0 var(--e); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn::after { content: ''; position: absolute; left: 10px; right: 10px; top: 4px; height: 40%; border-radius: 14px; background: linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,0)); pointer-events: none; }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 2.5px var(--e), 0 2px 0 var(--e), inset 0 2px 0 rgba(255,255,255,.5); }
.btn.orange { --a: var(--orange-a); --b: var(--orange-b); --e: var(--orange-e); }
.btn.blue { --a: var(--blue-a); --b: var(--blue-b); --e: var(--blue-e); }
.btn.pink, .btn.ruby { --a: var(--ruby-a); --b: var(--ruby-b); --e: var(--ruby-e); }
.btn.purple { --a: var(--purple-a); --b: var(--purple-b); --e: var(--purple-e); }
.btn.gold { --a: var(--gold-a); --b: var(--gold-b); --e: var(--gold-e); }
.btn.btn:disabled { --a: var(--grey-a); --b: var(--grey-b); --e: var(--grey-e); cursor: default; opacity: .85; }
.btn.btn:disabled:active { transform: none; }
.btn.small { font-size: 16px; padding: 8px 14px 9px; border-radius: 15px; box-shadow: 0 0 0 2px var(--e), 0 4px 0 var(--e), inset 0 2px 0 rgba(255,255,255,.45); }
.btn.wide { width: 100%; }
.btn .ic { width: 26px; height: 26px; }
.btn .ad { width: 24px; height: 24px; }

/* ---------- home ---------- */
#home .title { text-align: center; margin-top: 6px; display: flex; flex-direction: column; align-items: center; }
.world-chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; background: var(--glass); border: 2px solid rgba(246,196,83,.7); border-radius: 999px; padding: 5px 14px 5px 6px; font-weight: 600; color: #fff; box-shadow: 0 3px 0 rgba(0,0,0,.3); }
.world-chip .num { background: linear-gradient(var(--gold-a), var(--gold-b)); color: #5a2a00; font-family: var(--display); border-radius: 999px; padding: 2px 10px; font-size: 14px; }
.world-bar { width: 90px; height: 10px; background: rgba(0,0,0,.4); border-radius: 99px; overflow: hidden; }
.world-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-a), var(--gold-b)); border-radius: 99px; }
.home-mid { flex: 1; display: grid; grid-template-columns: 66px 1fr 66px; gap: 8px; align-items: center; pointer-events: none; min-height: 0; }
.side { display: flex; flex-direction: column; gap: 14px; pointer-events: auto; align-items: center; }
.side-btn { position: relative; width: 66px; border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; }
.side-btn .bub { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(#6a33c2, #2e0d62); border: 2px solid var(--panel-edge); box-shadow: 0 5px 0 #14042e, 0 8px 14px rgba(0,0,0,.35), inset 0 2px 0 rgba(255,255,255,.22); }
.side-btn .bub :is(svg, img) { width: 40px; height: 40px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.3)); }
.side-btn span { font-family: var(--display); font-size: 13px; color: #fff; -webkit-text-stroke: 3px var(--outline-c); paint-order: stroke fill; text-shadow: 0 2px 0 var(--outline-c); letter-spacing: .4px; white-space: nowrap; }
.side-btn:active .bub { transform: translateY(3px); box-shadow: 0 2px 0 #14042e; }
.dot { position: absolute; z-index: 3; top: -5px; right: 0; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: linear-gradient(#ff6a82, #e2183f); color: #fff; font-family: var(--display); font-size: 13px; display: grid; place-items: center; border: 2px solid #fff; box-shadow: 0 2px 0 rgba(0,0,0,.3); font-style: normal; }
.play-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-bottom: 6px; }
.play { font-size: 32px; padding: 16px 34px 18px; border-radius: 26px; min-width: 240px; }
.play small { display: block; font-size: 14px; letter-spacing: .6px; opacity: .95; }
.play .stack { display: flex; flex-direction: column; line-height: 1; gap: 3px; }
.tag { font-family: var(--display); font-size: 13px; letter-spacing: .8px; color: #fff; padding: 3px 10px; border-radius: 99px; background: linear-gradient(#ff6a82, #e2183f); box-shadow: 0 0 0 1.5px var(--ruby-e), 0 2px 0 var(--ruby-e); text-transform: uppercase; text-shadow: 0 1px 0 var(--ruby-e); }
.tag.super { background: linear-gradient(90deg, #7d3cf0, #e2183f); box-shadow: 0 0 0 1.5px #2a0754, 0 2px 0 #2a0754; }
.tag.easy { background: linear-gradient(var(--green-a), var(--green-b)); box-shadow: 0 0 0 1.5px var(--green-e), 0 2px 0 var(--green-e); text-shadow: 0 1px 0 var(--green-e); }
.chest-bar { display: flex; align-items: center; gap: 10px; background: var(--glass); border: 2px solid rgba(246,196,83,.7); border-radius: 18px; padding: 8px 12px; box-shadow: 0 3px 0 rgba(0,0,0,.3); width: min(340px, 100%); cursor: pointer; color: #fff; }
.chest-bar :is(svg, img) { width: 36px; height: 36px; flex: none; }
.chest-bar .meter { flex: 1; height: 18px; border-radius: 99px; background: rgba(0,0,0,.45); overflow: hidden; position: relative; box-shadow: inset 0 2px 3px rgba(0,0,0,.4); }
.chest-bar .meter i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(var(--gold-a), var(--gold-b)); border-radius: 99px; transition: width .6s cubic-bezier(.2,1.4,.4,1); }
.chest-bar .meter em { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-family: var(--display); font-size: 12.5px; color: #fff; -webkit-text-stroke: 3px var(--outline-c); paint-order: stroke fill; text-shadow: 0 2px 0 var(--outline-c); }
.streak { display: inline-flex; align-items: center; gap: 4px; font-family: var(--display); color: #fff; background: linear-gradient(#ffb03a, #ff5a14); border-radius: 99px; padding: 3px 10px 3px 6px; box-shadow: 0 0 0 1.5px #8f2d00, 0 2px 0 #8f2d00; font-size: 15px; text-shadow: 0 1px 0 #8f2d00; }
.streak :is(svg, img) { width: 18px; height: 18px; }

/* vibrant per-feature tiles */
.side-btn .bub.ruby   { background: linear-gradient(160deg, #ff6a86, #e0082e 55%, #8a0420); }
.side-btn .bub.blue   { background: linear-gradient(160deg, #6fd0ff, #1a72ff 55%, #0a3a9a); }
.side-btn .bub.teal   { background: linear-gradient(160deg, #5ff0c8, #0fb48a 55%, #06664e); }
.side-btn .bub.purple { background: linear-gradient(160deg, #c78cff, #7a1cf0 55%, #3d0a8a); }
.side-btn .bub.pink   { background: linear-gradient(160deg, #ff8ad8, #e01c9a 55%, #7a0a55); }
.side-btn .bub.orange { background: linear-gradient(160deg, #ffc35a, #ff6a00 55%, #9a3600); }
.side-btn .bub { position: relative; overflow: visible; }
.side-btn .bub::after { content: ''; position: absolute; left: 6px; right: 6px; top: 4px; height: 40%; border-radius: 12px; background: linear-gradient(rgba(255,255,255,.45), rgba(255,255,255,0)); pointer-events: none; }
.side-btn .bub :is(svg, img) { position: relative; z-index: 1; width: 120%; height: 120%; margin: -10%; }
.dot.info { background: linear-gradient(var(--gold-a), var(--gold-b)); color: #5a2a00; font-size: 11px; right: -6px; min-width: 34px; }
.dock { display: grid; grid-template-columns: 1fr 1.25fr 1fr; align-items: end; gap: 8px; margin: 10px -14px calc(-12px - var(--safe-b)); padding: 10px 14px calc(10px + var(--safe-b));
  background: linear-gradient(180deg, rgba(40,10,80,.92), rgba(18,4,40,.97)); border-top: 2px solid rgba(246,196,83,.85); border-radius: 26px 26px 0 0; box-shadow: 0 -8px 24px rgba(0,0,0,.35); }
.dock-btn { position: relative; border: 0; background: none; color: #fff; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0; }
.dock-btn :is(svg, img) { width: clamp(42px, 6.6vh, 56px); height: clamp(42px, 6.6vh, 56px); filter: drop-shadow(0 3px 0 rgba(0,0,0,.35)); transition: transform .15s; }
.dock-btn span { font-family: var(--display); font-size: 13px; letter-spacing: .5px; -webkit-text-stroke: 3px var(--outline-c); paint-order: stroke fill; text-shadow: 0 2px 0 var(--outline-c); }
.dock-btn.main { margin-top: -30px; }
.dock-btn.main::before { content: ''; position: absolute; top: -6px; left: 50%; width: clamp(70px, 10vh, 86px); aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #ffb04a, #ff6a00 60%, #b33a00); border: 3px solid var(--panel-edge); box-shadow: 0 6px 0 #5a1d00, 0 10px 20px rgba(0,0,0,.45), inset 0 3px 0 rgba(255,255,255,.4); }
.dock-btn.main :is(svg, img) { position: relative; width: clamp(52px, 8vh, 66px); height: clamp(52px, 8vh, 66px); margin-top: 2px; }
.dock-btn.main span { position: relative; margin-top: 6px; }
.dock-btn.main .dot { top: -10px; right: calc(50% - 46px); }
.dock-btn:active :is(svg, img) { transform: translateY(2px) scale(.96); }
#home .side-btn .bub { width: clamp(46px, 7.4vh, 62px); height: clamp(46px, 7.4vh, 62px); }
#home .side { gap: clamp(8px, 1.8vh, 16px); justify-content: center; }
#home .play { font-size: clamp(24px, 4vh, 32px); padding: clamp(10px, 1.6vh, 16px) 34px clamp(12px, 1.9vh, 18px); }
#home.snug .logo .logo-crown { display: none; }
#home.snug .logo .l1 { font-size: clamp(30px, min(10vw, 5.2vh), 52px); }
#home.snug .logo .l2 { margin-top: 5px; }
#home.snug .world-chip { margin-top: 7px; }
#home.snug .side { gap: 8px; }
#home.snug .side-btn .bub { width: clamp(44px, 6.4vh, 54px); height: clamp(44px, 6.4vh, 54px); }
#home.snug .play-wrap { gap: 8px; }
#home.compact .side-btn span { display: none; }
#home.tight .side-btn .bub { width: 42px; height: 42px; border-radius: 14px; }
#home.tight .side { gap: 6px; }
#home .title { margin-top: 2px; }
#home .world-chip { margin-top: 10px; }
#home .world-chip { max-width: 100%; white-space: nowrap; }
#home .world-chip .world-bar { flex: 0 1 90px; min-width: 36px; }
.i3d { display: inline-block; object-fit: contain; -webkit-user-drag: none; }

/* ---------- game HUD ---------- */
#game .top { display: flex; align-items: center; gap: 8px; }
.lvl-box { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.lvl-box .name { padding: 3px 18px 5px; border-radius: 999px; background: rgba(12,3,30,.55); border: 2px solid rgba(246,196,83,.85); box-shadow: 0 3px 0 rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.12); white-space: nowrap;
  font-family: var(--display); font-size: 22px; color: #fff; -webkit-text-stroke: 4px rgba(20,4,40,.9); paint-order: stroke fill; text-shadow: 0 3px 0 rgba(20,4,40,.9); line-height: 1.05; letter-spacing: .5px; }
.lvl-box .sub { display: flex; gap: 6px; align-items: center; margin-top: 3px; }
.boosters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 420px; width: 100%; margin: 0 auto; padding: 9px 10px 8px; border-radius: 26px;
  background: linear-gradient(rgba(52,16,104,.88), rgba(22,6,50,.92)); border: 2px solid rgba(246,196,83,.75); box-shadow: 0 8px 22px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.14); }
.boost { position: relative; border: 1.5px solid rgba(246,196,83,.55); cursor: pointer; border-radius: 18px; padding: 6px 2px 5px; background: radial-gradient(120% 90% at 50% 20%, #7a3ad6, #3a1280 70%); box-shadow: 0 4px 0 #14042e, inset 0 2px 0 rgba(255,255,255,.22); display: flex; flex-direction: column; align-items: center; gap: 2px; color: #fff; }
.boost :is(svg, img) { width: 34px; height: 34px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.3)); }
.boost span { font-family: var(--display); font-size: 12px; letter-spacing: .4px; -webkit-text-stroke: 3px var(--outline-c); paint-order: stroke fill; text-shadow: 0 2px 0 var(--outline-c); }
.boost .count { position: absolute; top: -9px; right: -6px; min-width: 27px; height: 27px; border-radius: 99px; padding: 0 6px; display: grid; place-items: center; font-family: var(--display); font-size: 15px; color: #fff; background: linear-gradient(var(--blue-a), var(--blue-b)); border: 2.5px solid #fff; box-shadow: 0 2px 0 rgba(0,0,0,.3); font-style: normal; text-shadow: 0 1px 0 var(--blue-e); }
.boost .count.free { background: linear-gradient(var(--green-a), var(--green-b)); font-size: 11px; text-shadow: 0 1px 0 var(--green-e); }
.boost .count.plus { background: linear-gradient(var(--green-a), var(--green-b)); font-size: 20px; text-shadow: 0 1px 0 var(--green-e); }
.boost:active { transform: translateY(3px); box-shadow: 0 1px 0 #14042e, inset 0 2px 0 rgba(255,255,255,.22); }
.boost:disabled { opacity: .45; }
/* after the "Stuck?" window is closed: a way back to the options, and the boosters that can help glow */
.stuck-bar { position: absolute; left: 50%; top: 120px; transform: translateX(-50%); z-index: 2; display: inline-flex; align-items: center; gap: 10px; max-width: calc(100% - 28px);
  padding: 6px 6px 6px 16px; border-radius: 999px; border: 2px solid rgba(246,196,83,.9); background: var(--glass); cursor: pointer; color: #fff;
  font-family: var(--display); font-size: 16px; letter-spacing: .3px; white-space: nowrap; -webkit-text-stroke: 3px var(--outline-c); paint-order: stroke fill; text-shadow: 0 2px 0 var(--outline-c);
  box-shadow: 0 4px 0 rgba(0,0,0,.35), 0 0 18px rgba(255,200,60,.35); animation: stuckIn .35s cubic-bezier(.2,1.5,.4,1); }
.stuck-bar span { overflow: hidden; text-overflow: ellipsis; }
.stuck-bar b { font-weight: 400; color: #5a2a00; text-shadow: none; padding: 5px 14px 6px; border-radius: 999px; background: linear-gradient(var(--gold-a), var(--gold-b)); box-shadow: 0 0 0 1.5px var(--gold-e), 0 2px 0 var(--gold-e); }
.stuck-bar:active { transform: translateX(-50%) translateY(2px); }
/* level-1 coach line (what the tutorial arrow wants, in words) */
.coach { position: absolute; left: 50%; top: 120px; transform: translateX(-50%); z-index: 2; width: max-content; max-width: calc(100% - 32px); max-height: 66px; box-sizing: border-box; overflow: hidden;
  padding: 8px 18px 9px; border-radius: 18px; border: 2px solid rgba(246,196,83,.9); background: var(--glass); color: #fff; pointer-events: none; text-align: center;
  font-family: var(--display); font-size: 17px; line-height: 1.25; letter-spacing: .3px; -webkit-text-stroke: 3px var(--outline-c); paint-order: stroke fill; text-shadow: 0 2px 0 var(--outline-c);
  box-shadow: 0 4px 0 rgba(0,0,0,.35), 0 0 18px rgba(255,200,60,.3); animation: stuckIn .35s cubic-bezier(.2,1.5,.4,1); }
@keyframes stuckIn { from { transform: translateX(-50%) scale(.6); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
.boosters.help .boost.helps { animation: helpGlow 1.4s ease-in-out infinite; }
@keyframes helpGlow { 0%, 100% { box-shadow: 0 4px 0 #14042e, inset 0 2px 0 rgba(255,255,255,.22); }
  50% { box-shadow: 0 4px 0 #14042e, inset 0 2px 0 rgba(255,255,255,.22), 0 0 0 3px rgba(255,210,74,.95), 0 0 22px rgba(255,210,74,.7); } }
@media (prefers-reduced-motion: reduce) { .stuck-bar { animation: none; } .boosters.help .boost.helps { animation: none; box-shadow: 0 4px 0 #14042e, 0 0 0 3px rgba(255,210,74,.95); } }
.toast { position: fixed; left: 50%; top: calc(var(--safe-t) + 78px); transform: translateX(-50%); background: linear-gradient(#3d167a, #22094d); color: #fff; font-weight: 600; padding: 11px 18px; border-radius: 16px; border: 2px solid var(--panel-edge); box-shadow: 0 8px 24px rgba(0,0,0,.45); max-width: calc(100% - 32px); text-align: center; z-index: 60; pointer-events: none; animation: drop .3s cubic-bezier(.2,1.5,.4,1); }

/* ---------- dialogs ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 40; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); place-items: center; padding: calc(var(--safe-t) + 26px) 16px calc(var(--safe-b) + 16px); animation: fade .2s ease; }
.panel { position: relative; width: min(380px, 100%); max-width: 100%; max-height: 100%; min-width: 0; display: flex; flex-direction: column; color: #fff;
  background: linear-gradient(180deg, var(--panel-a), var(--panel-b)); border: 3px solid var(--panel-edge); border-radius: 28px;
  box-shadow: 0 0 0 3px var(--panel-out), inset 0 2px 0 rgba(255,255,255,.2), inset 0 -40px 60px rgba(0,0,0,.18), 0 24px 60px rgba(0,0,0,.6); padding: 36px 18px 18px; animation: pop .35s cubic-bezier(.2,1.5,.4,1); }
.panel.tall { height: 100%; width: min(460px, 100%); }
.ribbon { position: absolute; left: 50%; top: -24px; transform: translateX(-50%); white-space: nowrap; font-family: var(--display); font-size: 25px; color: #fff; letter-spacing: .6px; padding: 8px 32px 10px; border-radius: 14px;
  background: linear-gradient(180deg, var(--gold-a), var(--gold-b) 60%, #d98a12); box-shadow: 0 0 0 3px var(--gold-e), 0 6px 0 var(--gold-e), 0 10px 18px rgba(0,0,0,.4), inset 0 2px 0 rgba(255,255,255,.6);
  -webkit-text-stroke: 4px var(--gold-e); paint-order: stroke fill; text-shadow: 0 2px 0 var(--gold-e); }
.ribbon.purple { background: linear-gradient(var(--purple-a), var(--purple-b)); box-shadow: 0 0 0 3px var(--purple-e), 0 6px 0 var(--purple-e), 0 10px 18px rgba(0,0,0,.4), inset 0 2px 0 rgba(255,255,255,.5); -webkit-text-stroke: 4px var(--purple-e); paint-order: stroke fill; text-shadow: 0 2px 0 var(--purple-e); }
.ribbon.green { background: linear-gradient(var(--green-a), var(--green-b)); box-shadow: 0 0 0 3px var(--green-e), 0 6px 0 var(--green-e), 0 10px 18px rgba(0,0,0,.4), inset 0 2px 0 rgba(255,255,255,.5); -webkit-text-stroke: 4px var(--green-e); paint-order: stroke fill; text-shadow: 0 2px 0 var(--green-e); }
.ribbon.orange { background: linear-gradient(var(--orange-a), var(--orange-b)); box-shadow: 0 0 0 3px var(--orange-e), 0 6px 0 var(--orange-e), 0 10px 18px rgba(0,0,0,.4), inset 0 2px 0 rgba(255,255,255,.5); -webkit-text-stroke: 4px var(--orange-e); paint-order: stroke fill; text-shadow: 0 2px 0 var(--orange-e); }
.x { position: absolute; right: -10px; top: -14px; width: 42px; height: 42px; border-radius: 50%; border: 3px solid #fff; background: linear-gradient(var(--ruby-a), var(--ruby-b)); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 0 0 2px var(--ruby-e), 0 4px 0 var(--ruby-e); z-index: 2; }
.x :is(svg, img) { width: 18px; height: 18px; }
.body { overflow-y: auto; overflow-x: hidden; min-height: 0; flex: 1; padding: 2px; -webkit-overflow-scrolling: touch; }
.center { text-align: center; }
.lead { color: var(--ink-soft); line-height: 1.45; margin: 4px 0 14px; text-wrap: balance; }
.h2 { font-family: var(--display); font-weight: 400; font-size: 29px; margin: 0 0 4px; text-align: center; line-height: 1.05; text-wrap: balance; letter-spacing: .4px; text-shadow: 0 3px 0 rgba(20,4,40,.6); }
.row { display: flex; gap: 10px; align-items: center; }
.reward-row { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 16px; }
.reward { display: flex; flex-direction: column; align-items: center; gap: 2px; background: var(--row); border: 1px solid var(--row-line); border-radius: 18px; padding: 10px 12px 8px; min-width: 78px; }
.reward :is(svg, img) { width: 42px; height: 42px; filter: drop-shadow(0 3px 0 rgba(0,0,0,.3)); }
.reward b { font-family: var(--display); font-weight: 400; font-size: 20px; font-variant-numeric: tabular-nums; -webkit-text-stroke: 3px var(--outline-c); paint-order: stroke fill; text-shadow: 0 2px 0 var(--outline-c); }
.reward small { font-size: 12px; color: var(--ink-mute); }
.note { font-size: 12.5px; color: var(--ink-mute); text-align: center; margin-top: 10px; line-height: 1.4; }
.stack-btns { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }

/* win */
.win-burst { width: 240px; height: 140px; max-width: 100%; margin: -6px auto 0; display: block; }
.meter-lg { height: 20px; border-radius: 99px; background: rgba(0,0,0,.45); box-shadow: inset 0 2px 3px rgba(0,0,0,.4); overflow: hidden; position: relative; margin: 2px 0 16px; }
.meter-lg i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(var(--gold-a), var(--gold-b)); transition: width .9s cubic-bezier(.2,1.2,.4,1) .3s; }
.meter-lg em { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-family: var(--display); font-size: 12.5px; -webkit-text-stroke: 3px var(--outline-c); paint-order: stroke fill; text-shadow: 0 2px 0 var(--outline-c); }

/* shop */
.shop-sec { font-family: var(--display); font-size: 19px; margin: 18px 4px 8px; display: flex; align-items: center; gap: 8px; letter-spacing: .4px; -webkit-text-stroke: 3px var(--outline-c); paint-order: stroke fill; text-shadow: 0 2px 0 var(--outline-c); }
.shop-sec:first-child { margin-top: 4px; }
.shop-sec :is(svg, img).ic { width: 28px; height: 28px; }
.offer { position: relative; border-radius: 22px; padding: 14px; color: #fff; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; border: 2px solid rgba(255,255,255,.35); box-shadow: 0 5px 0 rgba(0,0,0,.35), inset 0 2px 0 rgba(255,255,255,.3); }
.offer > div { min-width: 0; }
.offer + .offer { margin-top: 12px; }
.offer.starter { background: linear-gradient(135deg, #ff7a5a, #e2183f 55%, #7a0a3a); }
.offer.noads { background: linear-gradient(135deg, #4fb4ff, #1f45c9 60%, #13207a); }
.offer.piggy { background: linear-gradient(135deg, #e89a1c, #b35f06 55%, #6e3300); }
.offer.bundle { background: linear-gradient(135deg, #b06bff, #5a1fc0 60%, #2a0a6a); }
.offer h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 21px; letter-spacing: .4px; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.offer p { margin: 3px 0 8px; font-size: 13px; line-height: 1.35; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.offer .items span { text-shadow: 0 1px 1px rgba(0,0,0,.4); }
.offer .items { display: flex; flex-wrap: wrap; gap: 6px; }
.offer .items span { display: inline-flex; align-items: center; gap: 3px; background: rgba(0,0,0,.25); border-radius: 99px; padding: 2px 8px 2px 3px; font-weight: 600; font-size: 13px; }
.offer .items :is(svg, img) { width: 20px; height: 20px; }
.offer .badge { position: absolute; top: 10px; right: -30px; transform: rotate(35deg); background: linear-gradient(var(--gold-a), var(--gold-b)); color: #5a2a00; font-family: var(--display); font-size: 11px; padding: 3px 34px; letter-spacing: .6px; }
.price { font-family: var(--display); font-size: 18px; border: 0; cursor: pointer; border-radius: 16px; padding: 10px 14px 11px; background: linear-gradient(var(--green-a), var(--green-b)); color: #fff; box-shadow: 0 0 0 2px var(--green-e), 0 4px 0 var(--green-e), inset 0 2px 0 rgba(255,255,255,.45); text-shadow: 0 2px 0 var(--green-e); white-space: nowrap; min-width: 78px; }
.price:active { transform: translateY(3px); box-shadow: 0 0 0 2px var(--green-e), 0 1px 0 var(--green-e); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { position: relative; background: var(--row); border-radius: 20px; padding: 12px 6px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; border: 2px solid var(--row-line); }
.tile :is(svg, img).big { width: 52px; height: 52px; filter: drop-shadow(0 3px 0 rgba(0,0,0,.3)); }
.tile b { font-family: var(--display); font-weight: 400; font-size: 17px; font-variant-numeric: tabular-nums; -webkit-text-stroke: 3px var(--outline-c); paint-order: stroke fill; text-shadow: 0 2px 0 var(--outline-c); }
.tile .bonus { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: linear-gradient(#ff6a82, #e2183f); color: #fff; font-family: var(--display); font-size: 11px; border-radius: 99px; padding: 2px 8px; white-space: nowrap; box-shadow: 0 0 0 1.5px var(--ruby-e); }
.tile .price { font-size: 15px; padding: 7px 8px 8px; min-width: 0; width: 100%; }
.tile.hot { border-color: var(--panel-edge); background: rgba(246,196,83,.12); }
.price.coin { background: linear-gradient(var(--orange-a), var(--orange-b)); box-shadow: 0 0 0 2px var(--orange-e), 0 4px 0 var(--orange-e), inset 0 2px 0 rgba(255,255,255,.45); text-shadow: 0 2px 0 var(--orange-e); display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.price.gem { background: linear-gradient(var(--blue-a), var(--blue-b)); box-shadow: 0 0 0 2px var(--blue-e), 0 4px 0 var(--blue-e), inset 0 2px 0 rgba(255,255,255,.45); text-shadow: 0 2px 0 var(--blue-e); display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.price.ad { background: linear-gradient(var(--purple-a), var(--purple-b)); box-shadow: 0 0 0 2px var(--purple-e), 0 4px 0 var(--purple-e), inset 0 2px 0 rgba(255,255,255,.45); text-shadow: 0 2px 0 var(--purple-e); display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.tile .price :is(svg, img), .price :is(svg, img) { width: 18px; height: 18px; }
.price.price:disabled { background: linear-gradient(var(--grey-a), var(--grey-b)); box-shadow: 0 0 0 2px var(--grey-e), 0 4px 0 var(--grey-e); text-shadow: 0 1px 0 var(--grey-e); cursor: default; transform: none; }
.link { background: none; border: 0; color: var(--ink-mute); text-decoration: underline; cursor: pointer; font-size: 13px; padding: 6px; }

/* booster purchase */
.boost-hero { width: 100px; height: 100px; margin: 0 auto 4px; display: block; filter: drop-shadow(0 5px 0 rgba(0,0,0,.3)); }
.pack { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; background: var(--row); border: 1px solid var(--row-line); border-radius: 18px; padding: 8px 10px; }
.pack + .pack { margin-top: 10px; }
.pack .qty { font-family: var(--display); font-size: 21px; -webkit-text-stroke: 3px var(--outline-c); paint-order: stroke fill; text-shadow: 0 2px 0 var(--outline-c); }
.pack :is(svg, img).mini { width: 38px; height: 38px; }

/* daily */
.cal { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.day { position: relative; background: var(--row); border-radius: 16px; padding: 8px 4px 6px; text-align: center; border: 2px solid var(--row-line); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.day.big { grid-column: span 2; }
.day small { font-family: var(--display); font-size: 12px; color: var(--ink-mute); }
.day :is(svg, img) { width: 34px; height: 34px; }
.day b { font-family: var(--display); font-weight: 400; font-size: 14px; -webkit-text-stroke: 3px var(--outline-c); paint-order: stroke fill; text-shadow: 0 2px 0 var(--outline-c); }
.day.today { border-color: var(--panel-edge); background: rgba(246,196,83,.15); box-shadow: 0 0 16px rgba(246,196,83,.35); }
.day.got { opacity: .5; }
.day.got::after { content: '✓'; position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 36px; color: var(--green-a); text-shadow: 0 2px 0 var(--green-e); }

/* spin */
.wheel-wrap { --wd: min(244px, 62vw); position: relative; width: var(--wd); aspect-ratio: 1; max-width: 100%; margin: 34px auto 30px; }
/* painted gold rim with bulbs sits over the spinning wheel (its see-through centre shows the segments) */
.wheel-frame { position: absolute; left: -14%; top: -14%; width: 128%; height: 128%; z-index: 1; pointer-events: none; filter: drop-shadow(0 8px 14px rgba(0,0,0,.45)); }
.wheel { position: absolute; inset: 0; border-radius: 50%; border: 8px solid #f6c453; box-shadow: 0 0 0 4px #8a4a00, 0 10px 24px rgba(0,0,0,.45), inset 0 0 20px rgba(0,0,0,.3); transition: transform 4s cubic-bezier(.12,.8,.18,1); overflow: hidden; }
.wheel .seg { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.wheel .seg div { position: absolute; left: -26px; top: calc(-1 * var(--wd) / 2 + 20px); width: 52px; display: flex; flex-direction: column; align-items: center; font-family: var(--display); font-size: 13px; color: #fff; -webkit-text-stroke: 3px var(--outline-c); paint-order: stroke fill; text-shadow: 0 2px 0 var(--outline-c); }
.wheel .seg :is(svg, img) { width: 30px; height: 30px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.35)); }
.pointer { position: absolute; left: 50%; top: -34px; transform: translateX(-50%); width: 40px; height: auto; z-index: 2; filter: drop-shadow(0 3px 0 rgba(0,0,0,.35)); }
.hub { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff6c2, #f7b52c 55%, #b5650a); border: 3px solid #8a4a00; box-shadow: 0 3px 0 #5a2a00; z-index: 2; }

/* lists */
.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; background: var(--row); border: 1px solid var(--row-line); border-radius: 18px; padding: 10px 12px; }
.item .ico { width: 46px; height: 46px; display: grid; place-items: center; }
.item .ico :is(svg, img), .item .ico canvas { width: 44px; height: 44px; }
.item.gold { background: linear-gradient(135deg, rgba(246,196,83,.22), rgba(246,196,83,.08)); border-color: rgba(246,196,83,.6); }
.item h4 { margin: 0; font-size: 15px; font-weight: 600; }
.item p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-soft); line-height: 1.35; }
.prog { height: 10px; border-radius: 99px; background: rgba(0,0,0,.4); overflow: hidden; margin-top: 5px; }
.prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-a), var(--gold-b)); border-radius: 99px; }
.toggle { width: 56px; height: 32px; border-radius: 99px; border: 2px solid rgba(255,255,255,.25); background: rgba(0,0,0,.35); position: relative; cursor: pointer; flex: none; transition: background .2s; }
.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.35); transition: transform .2s cubic-bezier(.3,1.4,.5,1); }
.toggle[aria-pressed="true"] { background: var(--green-b); border-color: var(--green-a); }
.toggle[aria-pressed="true"]::after { transform: translateX(24px); }
.tierchip { font-family: var(--display); font-size: 11px; padding: 2px 8px; border-radius: 99px; color: #fff; background: var(--grey-b); }
.tierchip.bronze { background: #c47a3a; } .tierchip.silver { background: #9aa6c0; color: #1a1030; } .tierchip.gold { background: linear-gradient(var(--gold-a), var(--gold-b)); color: #5a2a00; }
select.year, input.year { font: inherit; font-size: 20px; font-family: var(--display); padding: 10px 14px; border-radius: 16px; border: 2px solid var(--panel-edge); background: rgba(0,0,0,.35); color: #fff; width: 100%; text-align: center; }
select.year option { color: #000; }
input.year { padding: 8px 12px; font-size: 18px; }

/* demo ad + demo store (web build only) */
.adfake { position: fixed; inset: 0; z-index: 90; background: #0c0420; color: #fff; display: grid; place-items: center; text-align: center; padding: 24px; }
.adfake .box { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.adfake .t { font-family: var(--display); font-size: 28px; }
.adfake .c { font-size: 14px; opacity: .75; max-width: 280px; line-height: 1.4; }
.adfake .ring { width: 70px; height: 70px; border-radius: 50%; border: 6px solid rgba(255,255,255,.2); border-top-color: var(--gold-b); animation: spin 1s linear infinite; }
.adfake .skip { position: absolute; top: calc(var(--safe-t) + 14px); right: 14px; }

@keyframes pop { from { transform: scale(.75); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes drop { from { transform: translate(-50%, -20px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.wiggle { animation: wiggle 1.2s ease-in-out infinite; }
.bob { animation: bob 1.6s ease-in-out infinite; }
@media (max-height: 640px) { .logo { font-size: 42px; } .play { font-size: 26px; padding: 12px 26px 14px; } .side { gap: 8px; } .side-btn .bub { width: 50px; height: 50px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- win celebration: fireworks + a big glossy word, then the reward window ---------- */
.celebrate { position: fixed; inset: 0; z-index: 35; display: grid; place-items: center; background: radial-gradient(circle at 50% 42%, rgba(10,2,26,.25), rgba(10,2,26,.7)); animation: fadeIn .25s ease both; }
.celebrate canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.celebrate .word { position: relative; max-width: calc(100% - 24px); height: auto; animation: wordIn .7s cubic-bezier(.2,1.6,.35,1) both; filter: drop-shadow(0 10px 24px rgba(0,0,0,.45)); }
.celebrate.out { animation: fadeOut .45s ease forwards; }
.celebrate.out .word { animation: wordOut .45s ease-in forwards; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes wordIn { 0% { transform: scale(.2) rotate(-8deg); opacity: 0; } 60% { transform: scale(1.12) rotate(2deg); opacity: 1; } 100% { transform: none; } }
@keyframes wordOut { to { transform: translateY(-60px) scale(.8); opacity: 0; } }

.panel.win .body { padding-top: 6px; }
.win-hero { position: relative; height: 150px; margin: 0 auto 2px; width: 220px; }
.win-hero .rays { position: absolute; left: 50%; top: 50%; width: 330px; height: 330px; margin: -165px 0 0 -165px; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(rgba(255,214,90,.28) 0 10deg, rgba(255,214,90,0) 10deg 24deg); -webkit-mask: radial-gradient(circle, #000 0, #000 22%, transparent 62%); mask: radial-gradient(circle, #000 0, #000 22%, transparent 62%);
  animation: spin 22s linear infinite; }
.win-hero .ped { position: absolute; left: 50%; bottom: 0; width: 150px; transform: translateX(-50%); filter: drop-shadow(0 8px 12px rgba(0,0,0,.45)); }
.win-hero .pile { position: absolute; left: 50%; bottom: 62px; width: 128px; transform: translateX(-50%); animation: pileIn .6s cubic-bezier(.2,1.5,.4,1) .15s both; filter: drop-shadow(0 6px 8px rgba(0,0,0,.35)); }
@keyframes pileIn { from { transform: translate(-50%, -40px) scale(.6); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
.win-amount { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 2px 0 6px; }
.win-amount :is(svg, img) { width: 38px; height: 38px; }
.win-amount b { font-family: var(--display); font-weight: 400; font-size: 38px; line-height: 1; color: #ffe27a; -webkit-text-stroke: 5px #4a1a00; paint-order: stroke fill; text-shadow: 0 3px 0 #4a1a00; font-variant-numeric: tabular-nums; }
.win-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 12px; }
.win-chips span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px 5px 6px; border-radius: 999px; background: rgba(0,0,0,.28); border: 1.5px solid rgba(246,196,83,.55); font-weight: 600; font-size: 14px; }
.win-chips :is(svg, img) { width: 24px; height: 24px; }
.streak-bar { margin: 0 0 14px; padding: 8px 10px 10px; border-radius: 18px; background: rgba(0,0,0,.28); border: 1.5px solid rgba(255,140,40,.55); }
.streak-bar .lbl { display: flex; align-items: center; gap: 6px; font-family: var(--display); font-size: 15px; letter-spacing: .3px; margin-bottom: 7px; -webkit-text-stroke: 3px var(--outline-c); paint-order: stroke fill; }
.streak-bar .lbl :is(svg, img) { width: 22px; height: 22px; color: #ff8a1f; }
.streak-bar .lbl em { margin-left: auto; font-style: normal; font-size: 13px; color: #ffd27a; }
.streak-bar .cells { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.streak-bar .cells span { text-align: center; font-family: var(--display); font-size: 13px; padding: 5px 0 6px; border-radius: 10px; background: rgba(255,255,255,.08); color: #b9a6dc; }
.streak-bar .cells span.past { background: rgba(255,138,31,.35); color: #ffe2c2; }
.streak-bar .cells span.on { background: linear-gradient(#ffb03a, #ff5a14); color: #fff; box-shadow: 0 0 0 2px #fff3, 0 0 14px rgba(255,120,30,.75); -webkit-text-stroke: 3px #8f2d00; paint-order: stroke fill; transform: scale(1.08); }
@media (prefers-reduced-motion: reduce) { .win-hero .rays, .win-hero .pile { animation: none; } }

/* ---------- shop: cream cards with gold rims and painted treasure (www/img) ---------- */
.panel.shop { --cream-a: #fffaf0; --cream-b: #f6e2b8; --ink-dark: #3d1a00; --rim: #e8a92c; --rim-e: #7a3e00; }
.shop-banner { margin: -4px -4px 6px; border-radius: 18px; overflow: hidden; border: 2.5px solid var(--rim); box-shadow: 0 0 0 2px var(--rim-e), 0 6px 14px rgba(0,0,0,.35); aspect-ratio: 16 / 7; }
.shop-banner .banner { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.panel.shop .offer { grid-template-columns: 84px minmax(0, 1fr); grid-template-areas: 'art info' 'art buy'; column-gap: 10px; row-gap: 8px; padding: 12px 12px 12px 8px; color: var(--ink-dark);
  background: linear-gradient(180deg, var(--cream-a), var(--cream-b)); border: 2.5px solid var(--rim); box-shadow: 0 0 0 2px var(--rim-e), 0 5px 0 var(--rim-e), 0 10px 16px rgba(0,0,0,.35), inset 0 2px 0 #fff; }
.panel.shop .offer > .info { grid-area: info; }
.panel.shop .offer > .price { grid-area: buy; justify-self: end; min-width: 108px; }
.panel.shop .offer .art { grid-area: art; align-self: center; width: 84px; height: 84px; object-fit: contain; filter: drop-shadow(0 4px 4px rgba(60,20,0,.35)); }
.panel.shop .offer h3 { color: #4a1690; text-shadow: none; -webkit-text-stroke: 0; font-size: 19px; line-height: 1.1; }
.panel.shop .offer p { color: #6a4520; text-shadow: none; margin: 2px 0 6px; }
.panel.shop .offer .items span { background: rgba(122,62,0,.1); color: var(--ink-dark); text-shadow: none; border: 1px solid rgba(122,62,0,.18); }
.panel.shop .offer.starter { background: linear-gradient(180deg, #fff4f6, #ffd9b8); }
.panel.shop .offer.noads { background: linear-gradient(180deg, #f2f6ff, #d8e4ff); }
.panel.shop .offer + .offer { margin-top: 14px; }
.panel.shop .tile { background: linear-gradient(180deg, var(--cream-a), var(--cream-b)); border: 2.5px solid var(--rim); box-shadow: 0 0 0 2px var(--rim-e), 0 4px 0 var(--rim-e), inset 0 2px 0 #fff; padding: 12px 6px 9px; gap: 4px; }
.panel.shop .tile.hot { border-color: #ff9a1f; background: linear-gradient(180deg, #fff6dd, #ffd98a); }
.panel.shop .tile .art { width: 76px; height: 64px; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(60,20,0,.35)); }
.panel.shop .tile b { color: var(--ink-dark); -webkit-text-stroke: 0; text-shadow: none; font-size: 18px; }
.panel.shop .tile .flag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); z-index: 1; white-space: nowrap; font-family: var(--display); font-size: 11px; letter-spacing: .3px; color: #fff; padding: 2px 9px 3px; border-radius: 99px;
  background: linear-gradient(#ffb03a, #ff6a14); box-shadow: 0 0 0 1.5px #8f2d00, 0 2px 0 #8f2d00; }
/* a tile with both a flag and a bonus: the bonus tucks into the top-right corner, above the treasure art (the art is drawn
   after it, so without the z-index the pile covered the "+25%") */
.panel.shop .tile .flag + .bonus { top: 16px; left: auto; right: -1px; transform: rotate(10deg); z-index: 2; }
.panel.shop .shop-sec { margin-top: 20px; }


/* home side buttons: the painted icons stand on their own (no coloured tile), with a soft glow behind for contrast */
.side-btn .bub, .side-btn .bub.ruby, .side-btn .bub.blue, .side-btn .bub.teal, .side-btn .bub.purple, .side-btn .bub.pink, .side-btn .bub.orange { background: none; border: 0; box-shadow: none; }
.side-btn .bub::after { display: none; }
.side-btn .bub::before { content: ''; position: absolute; inset: -14%; border-radius: 50%; background: radial-gradient(circle, rgba(10,2,30,.5), rgba(10,2,30,0) 68%); pointer-events: none; }
.side-btn .bub > :is(svg, img) { position: absolute; left: -4%; top: -4%; width: 108%; height: 108%; margin: 0; filter: drop-shadow(0 4px 3px rgba(0,0,0,.5)); }   /* pinned: a % height inside the grid would not hold tall icons */
.side-btn:active .bub { transform: translateY(2px) scale(.95); box-shadow: none; }
.day .chest7 { width: 64px; height: 50px; margin: -6px 0 -4px; filter: drop-shadow(0 3px 3px rgba(0,0,0,.4)); }
