@import url("https://fonts.googleapis.com/css2?family=Chewy&family=Nunito:wght@600;700;800;900&display=swap");

:root {
  --ink: #24163e;
  --cream: #fff8e9;
  --paper: #fffdf7;
  --plum: #5b2a86;
  --violet: #8c42d7;
  --spark: #a44df4;
  --pink: #ff829f;
  --gold: #ffc85a;
  --shadow: rgba(45, 20, 76, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #8b69ce;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 3%, rgba(255, 248, 217, 0.95) 0 5%, transparent 23%),
    linear-gradient(180deg, #9b7bd7 0, #c4a9e4 34rem, #f4d5d1 58rem, #fff6df 100%);
  font-family: "Nunito", sans-serif;
  overflow-x: hidden;
}

button {
  font: inherit;
}

.sky {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.star {
  position: absolute;
  color: rgba(255, 249, 196, 0.9);
  text-shadow: 0 0 18px #fff6a6;
  animation: twinkle 2.4s ease-in-out infinite alternate;
}

.star--one { top: 8%; left: 13%; font-size: 2rem; }
.star--two { top: 17%; right: 10%; font-size: 3rem; animation-delay: -1.1s; }
.star--three { top: 37%; left: 5%; font-size: 1.3rem; animation-delay: -0.5s; }

.cloud {
  position: absolute;
  width: 260px;
  height: 64px;
  border-radius: 50%;
  opacity: 0.2;
  background: #fff;
  filter: blur(1px);
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: inherit;
}

.cloud::before { width: 110px; height: 110px; left: 32px; bottom: 5px; }
.cloud::after { width: 145px; height: 145px; right: 25px; bottom: 0; }
.cloud--one { top: 24rem; left: -90px; }
.cloud--two { top: 10rem; right: -100px; transform: scale(0.75); }

.game-shell {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 32px;
}

.game-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 20px 28px;
}

.eyebrow,
.tiny-label,
.wallet-label {
  display: block;
  color: #704596;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.title-lockup h1 {
  margin: 2px 0 0;
  color: #fff9dc;
  font-family: "Chewy", cursive;
  font-size: clamp(3.3rem, 9vw, 6.7rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 0.92;
  text-shadow: 0 5px 0 #694294, 0 9px 28px rgba(52, 24, 80, 0.34);
}

.title-lockup p {
  margin: 12px 0 0;
  color: #3f265f;
  font-weight: 800;
}

.spark-wallet {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  min-width: 176px;
  padding: 12px 20px 12px 12px;
  border: 3px solid #52207c;
  border-radius: 999px;
  background: rgba(255, 250, 230, 0.95);
  box-shadow: 0 6px 0 #52207c, 0 14px 30px var(--shadow);
}

.spark-icon,
.mini-spark {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff5a7;
  background: radial-gradient(circle at 35% 28%, #d179ff, #7d2cbd 64%, #4e147e);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.18), 0 2px 0 #421067;
  text-shadow: 0 0 6px #fff;
}

.spark-icon {
  width: 48px;
  height: 48px;
  font-size: 1.45rem;
  animation: sparkFloat 2.2s ease-in-out infinite;
}

.spark-wallet strong {
  display: block;
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1;
}

.play-card {
  position: relative;
  overflow: hidden;
  border: 4px solid #51227b;
  border-radius: 38px;
  background: var(--paper);
  box-shadow: 0 11px 0 #51227b, 0 28px 55px rgba(50, 22, 81, 0.25);
}

.rarity-ribbon {
  position: absolute;
  z-index: 3;
  top: 26px;
  right: -48px;
  width: 185px;
  padding: 6px;
  transform: rotate(42deg);
  color: white;
  background: #9665aa;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.17em;
  text-align: center;
  box-shadow: 0 3px 0 rgba(47, 22, 70, 0.22);
}

.clicker-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 40px 14px;
}

.clicker-info h2 {
  margin: 0;
  font-family: "Chewy", cursive;
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 1;
}

.spark-rate {
  padding-right: 70px;
  text-align: right;
}

.spark-rate span {
  color: var(--plum);
  font-family: "Chewy", cursive;
  font-size: 2rem;
}

.spark-rate small {
  display: block;
  color: #836d90;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.click-stage {
  position: relative;
  display: grid;
  min-height: 475px;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(rgba(77, 39, 115, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 39, 115, 0.1) 1px, transparent 1px),
    linear-gradient(180deg, #e8ddf5 0%, #d7bee9 68%, #bd92d4 68%, #af7ac6 100%);
  background-size: 42px 42px, 42px 42px, auto;
  box-shadow: inset 0 3px 10px rgba(69, 36, 91, 0.14);
}

.click-stage::after {
  content: "";
  position: absolute;
  right: -5%;
  bottom: -150px;
  left: -5%;
  height: 250px;
  border-radius: 50%;
  background: #9465b2;
  box-shadow: 0 -12px 0 rgba(255, 255, 255, 0.12);
}

.moon {
  position: absolute;
  top: 48px;
  width: 210px;
  height: 210px;
  border: 4px solid rgba(91, 45, 126, 0.2);
  border-radius: 50%;
  background:
    radial-gradient(circle at 68% 27%, rgba(165, 116, 187, 0.25) 0 9px, transparent 10px),
    radial-gradient(circle at 34% 68%, rgba(165, 116, 187, 0.22) 0 14px, transparent 15px),
    #fff8c9;
  box-shadow: 0 0 0 18px rgba(255, 250, 204, 0.12), 0 0 55px rgba(255, 246, 168, 0.65);
}

.click-prompt {
  position: absolute;
  z-index: 4;
  top: 28px;
  padding: 7px 16px;
  border: 2px solid #542778;
  border-radius: 999px;
  color: #542778;
  background: #fff9df;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  box-shadow: 0 3px 0 #542778;
  animation: promptBob 1.8s ease-in-out infinite;
}

.dumpling {
  position: relative;
  z-index: 3;
  width: 285px;
  height: 270px;
  margin-top: 60px;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  filter: drop-shadow(0 18px 13px rgba(53, 23, 78, 0.25));
}

.dumpling-body {
  position: absolute;
  inset: 40px 15px 22px;
  display: block;
  overflow: hidden;
  border: 4px solid #4c2965;
  border-radius: 49% 51% 42% 44% / 42% 43% 55% 56%;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.85) 0 17%, transparent 18%),
    var(--dumpling-color, #fff0d3);
  box-shadow:
    inset -22px -25px 0 var(--dumpling-shade, #edcdb8),
    inset 15px 14px 0 rgba(255, 255, 255, 0.23);
  transition: filter 180ms ease;
}

.dumpling-body::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  width: 104px;
  height: 42px;
  transform: translateX(-50%);
  border-bottom: 5px solid rgba(75, 42, 93, 0.3);
  border-radius: 50%;
}

.dragon-horns {
  position: absolute;
  z-index: -1;
  top: 8px;
  left: 50%;
  width: 205px;
  height: 100px;
  transform: translateX(-50%);
}

.dragon-horns i {
  position: absolute;
  top: 22px;
  width: 50px;
  height: 76px;
  border: 4px solid #4c2965;
  background: var(--horn-color, #ffc770);
}

.dragon-horns i:first-child {
  left: 2px;
  transform: rotate(-29deg);
  border-radius: 72% 22% 48% 43%;
}

.dragon-horns i:last-child {
  right: 2px;
  transform: rotate(29deg);
  border-radius: 22% 72% 43% 48%;
}

.face i {
  position: absolute;
  display: block;
}

.eye {
  top: 96px;
  width: 18px;
  height: 25px;
  border-radius: 50%;
  background: #3d2253;
  box-shadow: inset 4px 3px 0 rgba(255, 255, 255, 0.75);
}

.eye--left { left: 73px; }
.eye--right { right: 73px; }

.cheek {
  top: 126px;
  width: 35px;
  height: 16px;
  border-radius: 50%;
  background: #f49ab0;
  opacity: 0.72;
}

.cheek--left { left: 45px; transform: rotate(-8deg); }
.cheek--right { right: 45px; transform: rotate(8deg); }

.mouth {
  top: 130px;
  left: 50%;
  width: 23px;
  height: 14px;
  transform: translateX(-50%);
  border: 4px solid #3d2253;
  border-top: 0;
  border-radius: 0 0 20px 20px;
}

.belly-mark {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(92, 51, 110, 0.3);
  font-size: 2rem;
  font-weight: 900;
}

.dumpling-shadow {
  position: absolute;
  z-index: -2;
  right: 25px;
  bottom: 4px;
  left: 25px;
  height: 45px;
  border-radius: 50%;
  background: rgba(54, 26, 73, 0.38);
  filter: blur(4px);
}

.dumpling:hover .dumpling-body {
  filter: brightness(1.04);
}

.dumpling:focus-visible .dumpling-body {
  outline: 6px solid #fff59d;
  outline-offset: 5px;
}

.dumpling.is-squishing {
  animation: squish 230ms cubic-bezier(.3,.8,.4,1);
}

.dumpling.is-squishing .mouth {
  width: 28px;
  height: 23px;
  border: 4px solid #3d2253;
  border-radius: 50%;
  background: #a94272;
}

.particle-layer {
  position: absolute;
  z-index: 6;
  inset: 0;
  pointer-events: none;
}

.spark-pop {
  position: absolute;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 3px solid #542778;
  border-radius: 50%;
  color: #fff6a8;
  background: #8c3dce;
  font-size: 1.05rem;
  font-weight: 900;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,0.18), 0 4px 0 rgba(71, 27, 104, 0.4);
  animation: sparkPop 850ms ease-out forwards;
}

.spark-number {
  position: absolute;
  z-index: 8;
  color: #fff8a9;
  font-family: "Chewy", cursive;
  font-size: 1.5rem;
  -webkit-text-stroke: 4px #612c83;
  paint-order: stroke fill;
  animation: numberPop 700ms ease-out forwards;
}

.session-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 20px;
  color: #735b80;
  font-size: 0.8rem;
  font-weight: 800;
}

.session-stats b {
  color: var(--ink);
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c09ecb;
}

.collection-section {
  margin-top: 70px;
}

.owned-section {
  margin-top: 62px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding: 0 12px 22px;
}

.section-heading h2 {
  margin: 2px 0 0;
  color: #fff9dc;
  font-family: "Chewy", cursive;
  font-size: 3.2rem;
  font-weight: 400;
  line-height: 1;
  text-shadow: 0 3px 0 #694294;
}

.section-heading p {
  max-width: 360px;
  margin: 0;
  color: #563972;
  font-size: 0.88rem;
  font-weight: 800;
  text-align: right;
}

.chest-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.chest-card {
  position: relative;
  display: flex;
  min-height: 294px;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  padding: 17px 15px 16px;
  border: 3px solid #5e3678;
  border-radius: 25px;
  background:
    radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--chest-color) 19%, transparent), transparent 48%),
    rgba(255, 253, 247, 0.96);
  box-shadow: 0 7px 0 #5e3678, 0 14px 24px rgba(74, 37, 91, 0.15);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.chest-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 11px 0 #5e3678, 0 18px 28px rgba(74, 37, 91, 0.19);
}

.chest-card--random {
  background:
    radial-gradient(circle at 20% 35%, rgba(255, 105, 186, 0.2), transparent 36%),
    radial-gradient(circle at 80% 52%, rgba(80, 226, 255, 0.2), transparent 38%),
    #fffdf7;
}

.chest-rarity {
  align-self: flex-start;
  padding: 4px 8px;
  border-radius: 7px;
  color: white;
  background: var(--chest-color);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.11em;
}

.chest-art {
  position: relative;
  width: 132px;
  height: 112px;
  margin: 15px auto 5px;
  filter: drop-shadow(0 9px 4px rgba(62, 32, 78, 0.2));
}

.chest-lid,
.chest-box {
  position: absolute;
  left: 50%;
  width: 112px;
  transform: translateX(-50%);
  border: 4px solid #4c2965;
  background: var(--chest-color);
}

.chest-lid {
  z-index: 2;
  top: 7px;
  height: 45px;
  border-radius: 55px 55px 9px 9px;
  box-shadow: inset 0 9px 0 rgba(255,255,255,0.2);
  transition: transform 180ms ease;
}

.chest-box {
  bottom: 5px;
  height: 68px;
  border-radius: 8px 8px 22px 22px;
  box-shadow: inset 0 -14px 0 rgba(47, 18, 70, 0.2);
}

.chest-box::before,
.chest-lid::before {
  content: "";
  position: absolute;
  right: -4px;
  left: -4px;
  height: 11px;
  border: 3px solid #4c2965;
  background: #ffc95f;
}

.chest-lid::before { bottom: -7px; }
.chest-box::before { bottom: 15px; }

.chest-box i {
  position: absolute;
  z-index: 3;
  top: 18px;
  left: 50%;
  display: grid;
  width: 28px;
  height: 32px;
  place-items: center;
  transform: translateX(-50%);
  border: 3px solid #4c2965;
  border-radius: 8px;
  color: #fff8a6;
  background: #8d3dcc;
  font-style: normal;
}

.chest-card:hover .chest-lid {
  transform: translateX(-50%) translateY(-7px) rotate(-2deg);
}

.chest-card h3 {
  margin: 0;
  font-family: "Chewy", cursive;
  font-size: 1.42rem;
  font-weight: 400;
}

.chest-card p {
  margin: 1px 0 12px;
  color: #82698c;
  font-size: 0.69rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chest-button {
  width: 100%;
  margin-top: auto;
  padding: 10px 8px;
  border: 2px solid #51227b;
  border-radius: 12px;
  color: white;
  background: var(--chest-color);
  font-size: 0.75rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 0 #51227b;
}

.chest-button:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.chest-button:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #51227b;
}

.chest-button:disabled,
.chest-button.cannot-afford {
  color: #806c88;
  border-color: #9e86a8;
  background: #ddd1e1;
  box-shadow: 0 4px 0 #9e86a8;
}

.chest-button:disabled {
  cursor: default;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.clicker-card {
  position: relative;
  display: flex;
  min-height: 300px;
  flex-direction: column;
  overflow: hidden;
  padding: 16px;
  border: 3px solid #5e3678;
  border-radius: 25px;
  background: rgba(255, 253, 247, 0.94);
  box-shadow: 0 7px 0 #5e3678, 0 14px 24px rgba(74, 37, 91, 0.15);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.clicker-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 11px 0 #5e3678, 0 18px 28px rgba(74, 37, 91, 0.19);
}

.clicker-card.is-equipped {
  border-color: #ffc24d;
  box-shadow: 0 7px 0 #cf7e24, 0 0 0 5px rgba(255, 242, 143, 0.55), 0 16px 30px rgba(74, 37, 91, 0.16);
}

.card-rarity {
  align-self: flex-start;
  padding: 4px 8px;
  border-radius: 7px;
  color: white;
  background: var(--rarity-color);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.11em;
}

.mini-dumpling {
  position: relative;
  width: 116px;
  height: 96px;
  margin: 18px auto 12px;
}

.mini-dumpling::before {
  content: "";
  position: absolute;
  inset: 7px 6px 5px;
  border: 3px solid #4c2965;
  border-radius: 52% 48% 43% 44% / 42% 42% 58% 58%;
  background:
    radial-gradient(circle at 32% 22%, rgba(255,255,255,0.75) 0 16%, transparent 17%),
    var(--card-color);
  box-shadow: inset -10px -11px 0 var(--card-shade);
}

.mini-dumpling::after {
  content: "• ᴗ •";
  position: absolute;
  top: 46px;
  left: 50%;
  width: 70px;
  transform: translateX(-50%);
  color: #422555;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 5px;
  text-align: center;
}

.mini-horns::before,
.mini-horns::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -2px;
  width: 25px;
  height: 43px;
  border: 3px solid #4c2965;
  border-radius: 60% 28% 45% 42%;
  background: var(--card-horn);
}

.mini-horns::before { left: 12px; transform: rotate(-28deg); }
.mini-horns::after { right: 12px; transform: scaleX(-1) rotate(-28deg); }

.clicker-card h3 {
  margin: 0;
  font-family: "Chewy", cursive;
  font-size: 1.45rem;
  font-weight: 400;
  text-align: center;
}

.card-rate {
  margin: 2px 0 15px;
  color: #856690;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.card-action {
  width: 100%;
  margin-top: auto;
  padding: 10px 8px;
  border: 2px solid #51227b;
  border-radius: 12px;
  color: white;
  background: #7e3cb3;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 4px 0 #51227b;
}

.card-action:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #9149c7;
  box-shadow: 0 5px 0 #51227b;
}

.card-action:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #51227b;
}

.card-action:disabled {
  cursor: not-allowed;
}

.card-action.is-equipped {
  color: #7d632d;
  border-color: #c49535;
  background: #fff0a5;
  box-shadow: 0 4px 0 #c49535;
}

.card-action.cannot-afford {
  color: #806c88;
  border-color: #9e86a8;
  background: #ddd1e1;
  box-shadow: 0 4px 0 #9e86a8;
}

.mini-spark {
  width: 19px;
  height: 19px;
  margin-right: 4px;
  font-size: 0.65rem;
  vertical-align: -4px;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 34px 12px 5px;
  color: #674b75;
  font-size: 0.75rem;
  font-weight: 800;
}

.reset-button {
  padding: 5px 0;
  border: 0;
  border-bottom: 2px solid currentColor;
  color: #674b75;
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}

.toast {
  position: fixed;
  z-index: 50;
  bottom: 24px;
  left: 50%;
  padding: 12px 20px;
  transform: translate(-50%, 100px);
  border: 3px solid #4f2272;
  border-radius: 999px;
  color: #4f2272;
  background: #fff8d9;
  font-size: 0.82rem;
  font-weight: 900;
  box-shadow: 0 5px 0 #4f2272, 0 12px 30px rgba(42, 18, 61, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: 250ms ease;
}

.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.reset-dialog {
  width: min(420px, calc(100% - 32px));
  padding: 30px;
  border: 4px solid #51227b;
  border-radius: 28px;
  color: var(--ink);
  background: #fffaf0;
  box-shadow: 0 10px 0 #51227b, 0 30px 80px rgba(32, 12, 48, 0.4);
  text-align: center;
}

.reveal-dialog {
  width: min(420px, calc(100% - 32px));
  overflow: visible;
  padding: 32px;
  border: 4px solid #51227b;
  border-radius: 34px;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 233, 126, 0.42), transparent 35%),
    #fffaf0;
  box-shadow: 0 10px 0 #51227b, 0 30px 80px rgba(32, 12, 48, 0.4);
  text-align: center;
}

.reveal-dialog::backdrop {
  background: rgba(41, 17, 62, 0.68);
  backdrop-filter: blur(5px);
}

.reveal-burst {
  position: absolute;
  top: -34px;
  left: 50%;
  color: #fff3a4;
  font-size: 4rem;
  text-shadow: 0 0 18px #ffc85a;
  transform: translateX(-50%);
  animation: revealSpin 1.8s ease-in-out infinite alternate;
}

.reveal-rarity {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  color: white;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.reveal-squishy {
  position: relative;
  width: 150px;
  height: 125px;
  margin: 22px auto 8px;
}

.reveal-squishy::before {
  content: "";
  position: absolute;
  inset: 8px;
  z-index: 1;
  border: 4px solid #4c2965;
  border-radius: 52% 48% 43% 44% / 42% 42% 58% 58%;
  background:
    radial-gradient(circle at 32% 22%, rgba(255,255,255,0.75) 0 16%, transparent 17%),
    var(--card-color);
  box-shadow: inset -13px -14px 0 var(--card-shade), 0 11px 16px rgba(64, 29, 81, 0.2);
}

.reveal-squishy::after {
  content: "• ᴗ •";
  position: absolute;
  z-index: 2;
  top: 61px;
  left: 50%;
  width: 80px;
  transform: translateX(-50%);
  color: #422555;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 6px;
}

.reveal-squishy .mini-horns::before,
.reveal-squishy .mini-horns::after {
  z-index: 0;
  top: 0;
  width: 32px;
  height: 52px;
}

.reveal-dialog h2 {
  margin: 4px 0;
  font-family: "Chewy", cursive;
  font-size: 2.3rem;
  font-weight: 400;
}

.reveal-dialog p {
  margin: 0 0 20px;
  color: #75627f;
  font-size: 0.82rem;
  font-weight: 800;
}

.reveal-dialog button {
  width: 100%;
  padding: 11px;
  border: 2px solid #51227b;
  border-radius: 12px;
  color: white;
  background: #8440b9;
  font-size: 0.75rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 0 #51227b;
}

.reveal-dialog .reveal-close {
  margin-top: 10px;
  color: #765f80;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.reset-dialog::backdrop {
  background: rgba(41, 17, 62, 0.62);
  backdrop-filter: blur(4px);
}

.dialog-art { font-size: 4rem; }

.reset-dialog h2 {
  margin: 5px 0;
  font-family: "Chewy", cursive;
  font-size: 2rem;
  font-weight: 400;
}

.reset-dialog p {
  margin: 0 0 22px;
  color: #75627f;
  font-size: 0.86rem;
  font-weight: 700;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.dialog-actions button {
  padding: 11px;
  border: 2px solid #593176;
  border-radius: 12px;
  color: #593176;
  background: #eee3f2;
  font-size: 0.75rem;
  font-weight: 900;
  cursor: pointer;
}

.dialog-actions .danger {
  color: white;
  border-color: #8e2e52;
  background: #c84469;
}

@keyframes twinkle {
  to { transform: scale(1.35) rotate(15deg); opacity: 0.5; }
}

@keyframes sparkFloat {
  50% { transform: translateY(-3px) rotate(8deg); }
}

@keyframes promptBob {
  50% { transform: translateY(-5px); }
}

@keyframes squish {
  0%, 100% { transform: scale(1); }
  42% { transform: scale(1.13, 0.76) translateY(25px); }
  70% { transform: scale(0.92, 1.08) translateY(-8px); }
}

@keyframes sparkPop {
  0% { transform: translate(-50%, -50%) scale(0.3) rotate(0); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: translate(var(--drift), -170px) scale(0.8) rotate(160deg); opacity: 0; }
}

@keyframes numberPop {
  0% { transform: translate(-50%, 0) scale(0.5); opacity: 0; }
  25% { transform: translate(-50%, -15px) scale(1.2); opacity: 1; }
  100% { transform: translate(-50%, -90px) scale(0.9); opacity: 0; }
}

@keyframes revealSpin {
  to { transform: translateX(-50%) rotate(20deg) scale(1.2); }
}

@media (max-width: 850px) {
  .chest-grid,
  .collection-grid { grid-template-columns: repeat(2, 1fr); }
  .game-header { align-items: center; }
  .click-stage { min-height: 430px; }
}

@media (max-width: 600px) {
  .game-shell {
    width: min(100% - 18px, 1120px);
    padding-top: 72px;
  }

  .game-header {
    align-items: stretch;
    flex-direction: column;
    padding: 12px 8px 22px;
    text-align: center;
  }

  .title-lockup h1 { font-size: clamp(3.4rem, 18vw, 5rem); }
  .spark-wallet { align-self: center; }
  .play-card { border-radius: 26px; }

  .clicker-info {
    padding: 20px 18px 12px;
  }

  .clicker-info h2 { font-size: 2rem; }
  .spark-rate { padding-right: 42px; }
  .spark-rate span { font-size: 1.5rem; }
  .click-stage { min-height: 380px; }
  .moon { top: 55px; width: 180px; height: 180px; }
  .click-prompt { top: 20px; }
  .dumpling { width: 245px; height: 235px; margin-top: 62px; }
  .dumpling-body { inset: 37px 14px 19px; }
  .dragon-horns { width: 178px; }
  .eye { top: 84px; }
  .eye--left { left: 62px; }
  .eye--right { right: 62px; }
  .cheek { top: 112px; }
  .mouth { top: 114px; }
  .session-stats { gap: 7px; font-size: 0.66rem; }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .section-heading h2 { font-size: 2.7rem; }
  .section-heading p { text-align: left; }
  .chest-grid,
  .collection-grid { gap: 12px; }
  .chest-card,
  .clicker-card { min-height: 275px; padding: 12px; border-radius: 20px; }
  .clicker-card h3 { font-size: 1.2rem; }
  .mini-dumpling { transform: scale(0.9); margin: 12px auto 5px; }
}

@media (max-width: 390px) {
  .chest-grid,
  .collection-grid { grid-template-columns: 1fr; }
  .clicker-card { min-height: 255px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
