/* ===================================================================
   World 2 — Candy match-3.   All sizes are logical px in the same
   1080-wide space as World 1 (the whole #app is CSS-scaled to fit).
   =================================================================== */
#candy-screen {
  --cc-ink: #4b1d78;
  --cc-pink: #ff5fa2;
  --cc-orange: #ffa53b;
  --cc-gold: #ffd23f;
  --cc-purple: #8b5cff;
  --cc-teal: #2fd6c4;
  position: absolute;
  inset: 0;
  z-index: 20;
  overflow: hidden;
  color: #fff;
  touch-action: none;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(255, 255, 255, 0.35), transparent 60%),
    linear-gradient(180deg, #ff7fbf 0%, #b56dff 48%, #5d6dff 100%);
}
#candy-screen.hidden,
#candy-screen .hidden {
  display: none !important;
}

/* floating bubbles behind everything */
.cc-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.cc-bg i {
  position: absolute;
  left: var(--x);
  bottom: -360px;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.12) 45%, rgba(255, 255, 255, 0.04) 70%, transparent 72%);
  animation: cc-rise var(--d) linear infinite;
  animation-delay: var(--o);
}
@keyframes cc-rise {
  from { transform: translateY(0); }
  to { transform: translateY(-3200px); }
}

#candy-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.cc-board-panel {
  position: absolute;
  border-radius: 54px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.16));
  border: 6px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 18px 0 rgba(75, 29, 120, 0.28), inset 0 0 40px rgba(255, 255, 255, 0.35), 0 30px 60px rgba(40, 10, 90, 0.35);
  pointer-events: none;
}

.cc-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.cc-pop {
  position: absolute;
  transform: translate(-50%, -50%);
  font-weight: 900;
  font-size: 64px;
  color: #fff;
  -webkit-text-stroke: 7px #b3237a;
  paint-order: stroke fill;
  text-shadow: 0 6px 0 rgba(75, 29, 120, 0.45);
  white-space: nowrap;
  animation: cc-pop 1s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
.cc-pop.big {
  font-size: 92px;
  color: var(--cc-gold);
  -webkit-text-stroke: 9px #b34b00;
}
.cc-pop.label {
  font-size: 84px;
  -webkit-text-stroke: 9px #5b2bd6;
  animation-duration: 1.3s;
}
@keyframes cc-pop {
  0% { transform: translate(-50%, -30%) scale(0.4); opacity: 0; }
  18% { transform: translate(-50%, -70%) scale(1.15); opacity: 1; }
  100% { transform: translate(-50%, -190%) scale(1); opacity: 0; }
}

/* ------------------------------------------------------------ buttons */
.cc-icon-btn {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 28px);
  left: 28px;
  z-index: 6;
  width: 125px;
  height: 125px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}
.cc-icon-btn img {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.3));
  transition: transform 0.08s;
}
.cc-icon-btn:active img {
  transform: translateY(3px) scale(0.97);
}

.cc-round-btn {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 42px);
  right: 173px;
  z-index: 6;
  width: 96px;
  height: 96px;
  padding: 0;
  border: 5px solid rgba(255, 255, 255, 0.85);
  border-radius: 34px;
  background: linear-gradient(180deg, #ffb347, #ff6aa8);
  box-shadow: 0 8px 0 #b33a7c, 0 16px 24px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.cc-round-btn svg {
  width: 52px;
  height: 52px;
  fill: #fff;
}
.cc-round-btn:active {
  transform: translateY(5px);
  box-shadow: 0 3px 0 #b33a7c, 0 8px 14px rgba(0, 0, 0, 0.3);
}

.cc-btn {
  font: inherit;
  font-size: 46px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 24px 70px;
  min-width: 520px;
  cursor: pointer;
  -webkit-text-stroke: 0.5px rgba(0, 0, 0, 0.25);
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
  transition: transform 0.08s, box-shadow 0.08s;
}
.cc-btn:active {
  transform: translateY(6px);
}
.cc-btn-primary {
  background: linear-gradient(180deg, #ffbf4a, #ff7a1f);
  box-shadow: 0 10px 0 #b3560a, 0 18px 28px rgba(0, 0, 0, 0.3);
}
.cc-btn-primary:active { box-shadow: 0 4px 0 #b3560a, 0 8px 14px rgba(0, 0, 0, 0.3); }
.cc-btn-secondary {
  background: linear-gradient(180deg, #a98bff, #6a4cf0);
  box-shadow: 0 10px 0 #3b25a5, 0 18px 28px rgba(0, 0, 0, 0.3);
}
.cc-btn-secondary:active { box-shadow: 0 4px 0 #3b25a5, 0 8px 14px rgba(0, 0, 0, 0.3); }
.cc-btn-ghost {
  font-size: 38px;
  padding: 18px 60px;
  background: rgba(75, 29, 120, 0.12);
  color: var(--cc-ink);
  text-shadow: none;
  -webkit-text-stroke: 0;
  box-shadow: inset 0 0 0 4px rgba(75, 29, 120, 0.3);
}

/* ------------------------------------------------------------ level map */
.cc-map {
  position: absolute;
  inset: 0;
  padding-top: calc(env(safe-area-inset-top, 0px) + 150px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 34px;
}
.cc-heading {
  margin: 0;
  display: flex;
  gap: 24px;
  font-size: 128px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 3px;
  text-transform: uppercase;
  -webkit-text-stroke: 10px #b3237a;
  paint-order: stroke fill;
  text-shadow: 0 10px 0 rgba(75, 29, 120, 0.35);
}
.cc-heading span:first-child { color: #fff; }
.cc-heading span:last-child { color: var(--cc-gold); -webkit-text-stroke-color: #b34b00; }
.cc-map-stats {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 36px;
  border-radius: 999px;
  background: rgba(75, 29, 120, 0.32);
  font-size: 50px;
  font-weight: 900;
}
.cc-map-sep { opacity: 0.6; }
.cc-star-icon { width: 58px; height: 58px; fill: var(--cc-gold); filter: drop-shadow(0 4px 0 rgba(179, 75, 0, 0.5)); }
.cc-level-grid {
  display: grid;
  grid-template-columns: repeat(5, 176px);
  gap: 22px;
}
.cc-level {
  position: relative;
  width: 176px;
  height: 176px;
  border: 5px solid rgba(255, 255, 255, 0.9);
  border-radius: 46px;
  padding: 0;
  font: inherit;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, #ffbf4a 0%, #ff7aa8 100%);
  box-shadow: 0 10px 0 #b33a7c, 0 18px 24px rgba(40, 10, 90, 0.35), inset 0 6px 0 rgba(255, 255, 255, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.08s;
}
.cc-level:active { transform: translateY(6px); }
.cc-level-num {
  font-size: 74px;
  line-height: 1;
  font-weight: 900;
  -webkit-text-stroke: 8px rgba(120, 30, 90, 0.85);
  paint-order: stroke fill;
}
.cc-level-stars { display: flex; gap: 2px; margin-top: 6px; height: 40px; }
.cc-level-stars svg { width: 40px; height: 40px; fill: rgba(75, 29, 120, 0.35); }
.cc-level-stars svg.on { fill: var(--cc-gold); filter: drop-shadow(0 3px 0 rgba(179, 75, 0, 0.6)); }
.cc-level.done { background: linear-gradient(180deg, #7df0b0 0%, #1fc9a3 100%); box-shadow: 0 10px 0 #0e8a73, 0 18px 24px rgba(40, 10, 90, 0.35), inset 0 6px 0 rgba(255, 255, 255, 0.45); }
.cc-level.done .cc-level-num { -webkit-text-stroke-color: rgba(10, 100, 80, 0.85); }
.cc-level.current { animation: cc-level-pulse 1.1s ease-in-out infinite; }
@keyframes cc-level-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.09); }
}
.cc-level.locked {
  cursor: default;
  background: linear-gradient(180deg, #a9a3c9 0%, #7a74a6 100%);
  box-shadow: 0 10px 0 #4d4876, 0 18px 24px rgba(40, 10, 90, 0.25), inset 0 6px 0 rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.45);
}
.cc-level.locked .cc-level-num { opacity: 0.55; -webkit-text-stroke-color: rgba(50, 40, 90, 0.7); font-size: 62px; }
.cc-lock { width: 52px; height: 52px; fill: rgba(255, 255, 255, 0.85); margin-top: 4px; }
.cc-pager { display: flex; align-items: center; gap: 36px; }
.cc-pager-btn {
  width: 120px;
  height: 100px;
  border: 5px solid rgba(255, 255, 255, 0.85);
  border-radius: 34px;
  font-size: 46px;
  color: #fff;
  background: linear-gradient(180deg, #a98bff, #6a4cf0);
  box-shadow: 0 8px 0 #3b25a5;
  cursor: pointer;
}
.cc-pager-btn:active { transform: translateY(5px); box-shadow: 0 3px 0 #3b25a5; }
.cc-pager-btn:disabled { opacity: 0.4; cursor: default; }
.cc-page-label { font-size: 46px; font-weight: 900; min-width: 160px; text-align: center; }

/* ------------------------------------------------------------ HUD */
.cc-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.cc-level-title {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 56px);
  left: 0;
  right: 0;
  text-align: center;
  font-size: 76px;
  font-weight: 900;
  letter-spacing: 4px;
  text-transform: uppercase;
  -webkit-text-stroke: 9px #b3237a;
  paint-order: stroke fill;
  text-shadow: 0 8px 0 rgba(75, 29, 120, 0.35);
}
.cc-card {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 190px);
  height: 160px;
  border-radius: 40px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.14));
  border: 5px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 0 rgba(75, 29, 120, 0.28), inset 0 0 26px rgba(255, 255, 255, 0.25);
  padding: 14px 28px;
}
.cc-moves { left: 40px; width: 270px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.cc-score { left: 330px; right: 40px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.cc-card-label { font-size: 26px; font-weight: 900; letter-spacing: 3px; text-transform: uppercase; opacity: 0.92; }
.cc-card-value {
  font-size: 84px;
  line-height: 1;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  -webkit-text-stroke: 7px rgba(120, 30, 110, 0.75);
  paint-order: stroke fill;
}
.cc-moves.low .cc-card-value { color: #ffe066; animation: cc-low 0.8s ease-in-out infinite; }
@keyframes cc-low { 50% { transform: scale(1.12); } }
.cc-score-row { display: flex; align-items: baseline; justify-content: space-between; }
.cc-score .cc-card-value { font-size: 68px; }
.cc-progress {
  height: 30px;
  border-radius: 999px;
  background: rgba(60, 20, 110, 0.4);
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.cc-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff09a 0%, #ffb02e 55%, #ff7a1f 100%);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.55);
  transition: width 0.45s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.cc-progress-fill.full { background: linear-gradient(180deg, #b5ffd9, #2fd68a 55%, #12b36d); }
.cc-target { font-size: 26px; font-weight: 800; text-align: right; opacity: 0.95; }
.cc-target b { font-size: 30px; }

.cc-objectives {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 372px);
  left: 40px;
  right: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.cc-goal {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 24px 8px 14px;
  border-radius: 999px;
  background: rgba(60, 20, 110, 0.42);
  border: 4px solid rgba(255, 255, 255, 0.55);
  font-size: 38px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.cc-goal svg { width: 54px; height: 54px; flex: none; }
.cc-glass-ico { display: inline-block; flex: none; background-repeat: no-repeat; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35)); }
.cc-goal.done { background: rgba(31, 190, 120, 0.7); border-color: #d4ffe9; }
.cc-goal.done::after { content: "\2713"; font-size: 40px; color: #fff; }
.cc-goal-ico { width: 54px; height: 54px; border-radius: 16px; flex: none; }
.cc-goal-ico.jelly { background: radial-gradient(circle at 35% 30%, #ffffff, #8fe3ff 55%, #3fb6ff); box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.7); }
.cc-goal-ico.crate { background: repeating-linear-gradient(90deg, #c98a4b 0 12px, #a96b32 12px 15px); box-shadow: inset 0 0 0 5px #6b3f17; }

/* ------------------------------------------------------------ boosters */
.cc-boosters {
  position: absolute;
  left: 40px;
  right: 40px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 34px);
  display: flex;
  justify-content: center;
  gap: 20px;
  z-index: 3;
}
.cc-booster {
  position: relative;
  width: 224px;
  height: 188px;
  border: 5px solid rgba(255, 255, 255, 0.85);
  border-radius: 40px;
  font: inherit;
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(180deg, #ffb347, #ff6aa8);
  box-shadow: 0 10px 0 #b33a7c, 0 18px 24px rgba(40, 10, 90, 0.35), inset 0 5px 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.08s, filter 0.2s;
}
.cc-booster[data-booster="row"] { background: linear-gradient(180deg, #6fe0ff, #4a7dff); box-shadow: 0 10px 0 #2447b3, 0 18px 24px rgba(40, 10, 90, 0.35), inset 0 5px 0 rgba(255, 255, 255, 0.4); }
.cc-booster[data-booster="col"] { background: linear-gradient(180deg, #8af0b0, #1fbf93); box-shadow: 0 10px 0 #0b7e63, 0 18px 24px rgba(40, 10, 90, 0.35), inset 0 5px 0 rgba(255, 255, 255, 0.4); }
.cc-booster[data-booster="shuffle"] { background: linear-gradient(180deg, #c9a4ff, #8b5cff); box-shadow: 0 10px 0 #4a28b3, 0 18px 24px rgba(40, 10, 90, 0.35), inset 0 5px 0 rgba(255, 255, 255, 0.4); }
.cc-booster:active { transform: translateY(6px); }
.cc-booster svg { width: 76px; height: 76px; fill: #fff; color: #fff; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.25)); }
.cc-booster-name { font-size: 28px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.25); }
.cc-booster-qty {
  position: absolute;
  top: -18px;
  right: -12px;
  min-width: 58px;
  height: 58px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff;
  color: #d6277f;
  border: 4px solid #d6277f;
  font-size: 36px;
  font-weight: 900;
  display: grid;
  place-items: center;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.25);
}
.cc-booster.empty { filter: grayscale(1) brightness(0.8); opacity: 0.6; cursor: not-allowed; }
.cc-booster.empty .cc-booster-qty { color: #888; border-color: #888; }
.cc-booster.active {
  transform: translateY(-14px) scale(1.06);
  animation: cc-booster-glow 0.9s ease-in-out infinite;
}
@keyframes cc-booster-glow {
  0%, 100% { box-shadow: 0 10px 0 #b33a7c, 0 0 0 0 rgba(255, 255, 255, 0.9), 0 18px 24px rgba(40, 10, 90, 0.35); }
  50% { box-shadow: 0 10px 0 #b33a7c, 0 0 0 18px rgba(255, 255, 255, 0), 0 18px 24px rgba(40, 10, 90, 0.35); }
}

/* ------------------------------------------------------------ toast + tutorial */
.cc-toast {
  position: absolute;
  left: 50%;
  top: calc(env(safe-area-inset-top, 0px) + 480px);
  transform: translate(-50%, -20px);
  padding: 14px 44px;
  border-radius: 999px;
  background: rgba(60, 20, 110, 0.78);
  border: 4px solid rgba(255, 255, 255, 0.7);
  font-size: 40px;
  font-weight: 900;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 5;
}
.cc-toast.show { opacity: 1; transform: translate(-50%, 0); }

.cc-tutorial {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}
.cc-tutorial-bubble {
  position: absolute;
  left: 90px;
  right: 90px;
  padding: 26px 36px;
  border-radius: 40px;
  background: #fff;
  color: var(--cc-ink);
  font-size: 42px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  box-shadow: 0 10px 0 rgba(75, 29, 120, 0.3), 0 20px 30px rgba(0, 0, 0, 0.3);
  animation: cc-bubble 1.6s ease-in-out infinite;
}
@keyframes cc-bubble { 50% { transform: translateY(-8px); } }
.cc-finger {
  position: absolute;
  left: 0;
  top: 0;
  width: 92px;
  height: 92px;
  margin: -46px 0 0 -46px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #ffe4f4 60%, #ffb3dc);
  border: 6px solid #fff;
  box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.35), 0 10px 24px rgba(0, 0, 0, 0.35);
  animation: cc-finger 1.7s ease-in-out infinite;
}
@keyframes cc-finger {
  0% { transform: translate(var(--fx, 0), var(--fy, 0)) scale(1.1); opacity: 0; }
  12% { transform: translate(var(--fx, 0), var(--fy, 0)) scale(0.9); opacity: 1; }
  25% { transform: translate(var(--fx, 0), var(--fy, 0)) scale(0.9); }
  70% { transform: translate(var(--tx, 0), var(--ty, 0)) scale(0.9); opacity: 1; }
  100% { transform: translate(var(--tx, 0), var(--ty, 0)) scale(1.1); opacity: 0; }
}

/* ------------------------------------------------------------ modals */
.cc-modal {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(38, 12, 80, 0.62);
  animation: cc-fade 0.25s ease-out;
}
@keyframes cc-fade { from { opacity: 0; } }
.cc-dialog {
  position: relative;
  width: 900px;
  max-width: calc(100% - 60px);
  padding: 120px 50px 56px;
  border-radius: 70px;
  background: linear-gradient(180deg, #ffffff 0%, #ffe6f6 100%);
  border: 8px solid #fff;
  box-shadow: 0 16px 0 rgba(75, 29, 120, 0.4), 0 40px 80px rgba(20, 0, 60, 0.5);
  color: var(--cc-ink);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  animation: cc-dialog-in 0.45s cubic-bezier(0.2, 1.3, 0.4, 1);
}
@keyframes cc-dialog-in { from { transform: scale(0.7); opacity: 0; } }
.cc-dialog-ribbon {
  position: absolute;
  top: -58px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 600px;
  padding: 22px 64px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff9ad0, #ff4f9a);
  border: 7px solid #fff;
  box-shadow: 0 10px 0 #b3237a, 0 20px 30px rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 66px;
  font-weight: 900;
  letter-spacing: 3px;
  text-transform: uppercase;
  white-space: nowrap;
  -webkit-text-stroke: 8px #b3237a;
  paint-order: stroke fill;
}
.cc-ribbon-win { background: linear-gradient(180deg, #ffe26a, #ffa53b); box-shadow: 0 10px 0 #b34b00, 0 20px 30px rgba(0, 0, 0, 0.3); -webkit-text-stroke-color: #b34b00; }
.cc-ribbon-lose { background: linear-gradient(180deg, #a98bff, #6a4cf0); box-shadow: 0 10px 0 #3b25a5, 0 20px 30px rgba(0, 0, 0, 0.3); -webkit-text-stroke-color: #3b25a5; }
.cc-dialog-tip { margin: 0; font-size: 40px; font-weight: 800; line-height: 1.25; max-width: 720px; }
.cc-dialog-tip:empty { display: none; }
.cc-dialog-actions { display: flex; flex-direction: column; align-items: center; gap: 22px; margin-top: 8px; }
.cc-intro-goals { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.cc-intro-goals .cc-goal { background: rgba(139, 92, 255, 0.16); border-color: rgba(75, 29, 120, 0.35); color: var(--cc-ink); }
.cc-intro-goals .cc-goal.done { background: rgba(31, 190, 120, 0.25); }
.cc-intro-goals .cc-goal.done::after { color: #12b36d; }
.cc-intro-meta { font-size: 40px; font-weight: 800; }
.cc-intro-stars, .cc-win-stars { display: flex; gap: 18px; justify-content: center; }
.cc-intro-stars svg { width: 70px; height: 70px; fill: rgba(75, 29, 120, 0.18); }
.cc-intro-stars svg.on { fill: var(--cc-gold); filter: drop-shadow(0 3px 0 rgba(179, 75, 0, 0.6)); }
.cc-win-stars svg {
  width: 190px;
  height: 190px;
  fill: rgba(75, 29, 120, 0.18);
  transform: scale(0.2);
  opacity: 0;
}
.cc-win-stars svg:nth-child(2) { margin-top: -34px; width: 220px; height: 220px; }
.cc-win-stars svg.on {
  fill: var(--cc-gold);
  filter: drop-shadow(0 8px 0 rgba(179, 75, 0, 0.6));
  animation: cc-star-pop 0.6s cubic-bezier(0.2, 1.6, 0.4, 1) forwards;
  animation-delay: var(--delay, 0s);
}
.cc-win-stars svg.off { animation: cc-star-off 0.4s ease-out forwards; animation-delay: var(--delay, 0s); }
@keyframes cc-star-pop { 0% { transform: scale(0.1) rotate(-40deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes cc-star-off { to { transform: scale(1); opacity: 1; } }
.cc-result-score { display: flex; align-items: baseline; gap: 16px; justify-content: center; }
.cc-result-score .cc-card-label { color: var(--cc-ink); }
.cc-result-score b { font-size: 96px; font-weight: 900; font-variant-numeric: tabular-nums; color: #d6277f; }
.cc-result-of { font-size: 44px; font-weight: 800; opacity: 0.7; }
.cc-result-best { font-size: 40px; font-weight: 900; color: #fff; background: linear-gradient(180deg, #ffb347, #ff6a3f); padding: 8px 36px; border-radius: 999px; animation: cc-bubble 1s ease-in-out infinite; }
.cc-result-reward { font-size: 38px; font-weight: 800; min-height: 46px; }
.cc-result-reward:empty { display: none; }

/* ------------------------------------------------------------ world transition */
.world-transition {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #ff7fbf 0%, #b56dff 50%, #5d6dff 100%);
  pointer-events: all;
  overflow: hidden;
}
.wt-stripes {
  position: absolute;
  inset: -50%;
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.16) 0 70px, transparent 70px 140px);
  animation: wt-slide 1.2s linear infinite;
}
@keyframes wt-slide { to { transform: translateX(197px); } }
.wt-label { position: relative; display: flex; flex-direction: column; align-items: center; gap: 30px; }
.wt-title {
  font-size: 116px;
  white-space: nowrap;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  -webkit-text-stroke: 12px #b3237a;
  paint-order: stroke fill;
  text-shadow: 0 12px 0 rgba(75, 29, 120, 0.4);
}
.wt-dots { display: flex; gap: 22px; }
.wt-dots i { width: 38px; height: 38px; border-radius: 50%; background: #fff; box-shadow: 0 6px 0 rgba(75, 29, 120, 0.4); animation: wt-bounce 0.8s ease-in-out infinite; }
.wt-dots i:nth-child(2) { animation-delay: 0.15s; background: var(--cc-gold, #ffd23f); }
.wt-dots i:nth-child(3) { animation-delay: 0.3s; background: #7df0b0; }
@keyframes wt-bounce { 50% { transform: translateY(-30px); } }

@media (prefers-reduced-motion: reduce) {
  .cc-bg i, .cc-level.current, .cc-booster.active, .cc-finger, .cc-tutorial-bubble, .wt-stripes, .wt-dots i { animation: none; }
}


/* ------------------------------------------------------------ splash notice (e.g. World 2 failed to load) */
.splash-message {
  position: absolute;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 150px);
  transform: translate(-50%, 20px);
  padding: 16px 44px;
  border-radius: 999px;
  background: rgba(40, 20, 80, 0.85);
  color: #fff;
  font-size: 38px;
  font-weight: 800;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.splash-message.show { opacity: 1; transform: translate(-50%, 0); }

