/* =========================================================
   Shell: page background, game window, HUD, screens,
   dialog box, overlays, effects.
   ========================================================= */

body {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* ---------- dreamy page background ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: linear-gradient(160deg, #ffe3f0 0%, #f3e6ff 45%, #dff3ff 100%); }
.bg__glow {
  position: absolute; inset: -20%;
  background:
    radial-gradient(40% 35% at 15% 20%, rgba(255, 150, 200, .55), transparent 70%),
    radial-gradient(35% 30% at 85% 25%, rgba(190, 160, 255, .5), transparent 70%),
    radial-gradient(45% 40% at 70% 90%, rgba(150, 215, 255, .5), transparent 70%);
  animation: bg-drift 18s ease-in-out infinite alternate;
}
.bg__pattern {
  position: absolute; inset: 0;
  opacity: .5;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cpath d='M16 10l1.6 4.4L22 16l-4.4 1.6L16 22l-1.6-4.4L10 16l4.4-1.6z' fill='%23ffffff'/%3E%3Cpath d='M48 42l1 2.8 2.8 1-2.8 1-1 2.8-1-2.8-2.8-1 2.8-1z' fill='%23ffffff' opacity='.8'/%3E%3C/svg%3E");
}
.bg__bubbles i {
  position: absolute;
  bottom: -80px;
  width: var(--s, 40px); height: var(--s, 40px);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .95) 0 10%, rgba(255, 255, 255, .25) 30%, rgba(255, 180, 220, .15) 60%, rgba(255, 255, 255, .35) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6);
  animation: bubble-rise var(--d, 16s) linear infinite;
  animation-delay: var(--dl, 0s);
}
.bg__bubbles i:nth-child(1) { left: 6%; --s: 46px; --d: 17s; }
.bg__bubbles i:nth-child(2) { left: 18%; --s: 22px; --d: 12s; --dl: -4s; }
.bg__bubbles i:nth-child(3) { left: 33%; --s: 60px; --d: 21s; --dl: -9s; }
.bg__bubbles i:nth-child(4) { left: 52%; --s: 28px; --d: 14s; --dl: -2s; }
.bg__bubbles i:nth-child(5) { left: 67%; --s: 52px; --d: 19s; --dl: -12s; }
.bg__bubbles i:nth-child(6) { left: 80%; --s: 20px; --d: 11s; --dl: -6s; }
.bg__bubbles i:nth-child(7) { left: 90%; --s: 38px; --d: 16s; --dl: -1s; }
.bg__bubbles i:nth-child(8) { left: 44%; --s: 16px; --d: 10s; --dl: -7s; }
@keyframes bubble-rise {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 1; }
  50% { transform: translate(24px, -55vh); }
  100% { transform: translate(-10px, -115vh); opacity: 0; }
}
@keyframes bg-drift { to { transform: translate(3%, -2%) rotate(3deg); } }

/* ---------- the game window ---------- */
.window {
  position: relative;
  width: min(1100px, calc(100vw - 32px));
  height: min(780px, calc(100dvh - 32px));
  display: flex;
  flex-direction: column;
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(255, 246, 251, .6));
  border: 3px solid #fff;
  box-shadow:
    0 0 0 1px rgba(255, 120, 190, .35),
    0 0 0 8px rgba(255, 255, 255, .35),
    0 30px 80px rgba(150, 40, 110, .28);
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  isolation: isolate;
}

/* ---------- title bar / HUD ---------- */
.titlebar {
  flex: none;
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98) 0%, rgba(255, 232, 243, .95) 50%, rgba(255, 220, 238, .95) 100%);
  border-bottom: 2px solid #fff;
  box-shadow: 0 2px 0 rgba(255, 140, 196, .25);
}
.titlebar__logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 0;
  border-radius: 12px;
  background: none;
  cursor: pointer;
  white-space: nowrap;
}
.titlebar__flower { color: var(--pink); font-size: 1.2rem; transition: transform .5s var(--ease-pop); }
.titlebar__logo:hover .titlebar__flower { transform: rotate(180deg) scale(1.2); }
.titlebar__name { font: italic 800 1.15rem var(--font-display); color: var(--ink); }
.titlebar__tools { display: flex; gap: 8px; margin-left: auto; }

/* progress indicator */
.progress {
  --p: 0%;
  position: relative;
  flex: 1;
  max-width: 420px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  padding-bottom: 14px;
  transition: opacity .3s;
}
.progress__track {
  grid-area: 1 / 1;
  height: 10px;
  margin: 0 14px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .9);
  box-shadow: inset 0 1px 3px rgba(120, 40, 110, .2);
  overflow: hidden;
}
.progress__fill {
  width: var(--p);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pink-2), var(--pink), var(--lilac));
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
  transition: width .9s var(--ease-out);
}
@keyframes shimmer { to { background-position: -200% 0; } }
.progress__nodes {
  grid-area: 1 / 1;
  display: flex;
  justify-content: space-between;
  margin: 0; padding: 0;
  list-style: none;
}
.progress__node {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--chrome);
  box-shadow: 0 2px 0 #b3a8c6, 0 4px 10px rgba(120, 40, 110, .15);
  font: 400 .72rem var(--font-pixel);
  color: var(--ink-2);
  cursor: pointer;
  transition: transform .2s var(--ease-pop);
}
.progress__node:hover { transform: scale(1.12); }
.progress__tick { position: absolute; inset: 0; display: none; place-items: center; }
.progress__tick svg { width: 16px; height: 16px; }
.progress__node.is-done { background: linear-gradient(180deg, #ffb3d6, var(--pink)); color: #fff; box-shadow: 0 2px 0 var(--pink-deep), 0 4px 12px rgba(255, 95, 168, .45); }
.progress__node.is-done .progress__num { display: none; }
.progress__node.is-done .progress__tick { display: grid; }
.progress__node.is-current { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--pink-2), 0 0 18px rgba(255, 95, 168, .6); animation: node-pulse 1.6s ease-in-out infinite; }
.progress__node.is-locked { opacity: .55; }
@keyframes node-pulse { 50% { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--lilac), 0 0 24px rgba(183, 156, 255, .8); } }
.progress__label {
  position: absolute;
  left: 50%; bottom: -3px;
  transform: translateX(-50%);
  font-size: .56rem;
  color: var(--ink-3);
  white-space: nowrap;
}

.window.hud-hidden .progress,
.window.hud-hidden .bottombar { visibility: hidden; opacity: 0; }

/* ---------- stage + screens ---------- */
.stage {
  position: relative;
  flex: 1;
  min-height: 0;
  container-type: size;
  container-name: stage;
  overflow: hidden;
}
.screen-host { position: absolute; inset: 0; }
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  animation: screen-in .5s var(--ease-out) both;
}
.screen.is-leaving { animation: screen-out .2s ease-in forwards; }
@keyframes screen-in { from { opacity: 0; transform: scale(.985) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes screen-out { to { opacity: 0; transform: scale(.985); } }

/* ---------- bottom bar ---------- */
.bottombar {
  flex: none;
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(80px, auto) 1fr minmax(80px, auto);
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 4px 12px;
  padding-bottom: max(4px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(255, 240, 248, .95), rgba(255, 255, 255, .95));
  border-top: 2px solid #fff;
}
.bottombar__back { justify-self: start; text-decoration: none; }
.bottombar__skip { justify-self: end; grid-column: 3; opacity: .75; }
.bottombar__hint {
  grid-column: 2;
  justify-self: center;
  text-align: center;
  font-size: .85rem;
  font-weight: 700;
  color: var(--ink-2);
  line-height: 1.25;
}
.bottombar__hint.is-new { animation: spa-fade-up .4s var(--ease-out); }
.bottombar__hint:not(.is-empty)::before { content: '✦ '; color: var(--pink); }

/* ---------- toasts ---------- */
.toasts {
  position: absolute;
  top: 66px; left: 50%;
  z-index: 70;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(92%, 440px);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .96);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--pink-2), 0 10px 26px rgba(150, 40, 110, .25);
  font-size: .9rem;
  line-height: 1.3;
  animation: toast-in .45s var(--ease-pop) both;
}
.toast--out { animation: toast-out .35s ease-in forwards; }
.toast__icon { font-size: 1.2rem; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-16px) scale(.9); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-10px) scale(.95); } }

/* ---------- effects layer ---------- */
.fx-layer { position: absolute; inset: 0; z-index: 80; pointer-events: none; overflow: hidden; }
.fx-spark, .fx-trail {
  position: absolute;
  line-height: 1;
  pointer-events: none;
  text-shadow: 0 0 6px rgba(255, 255, 255, .9);
  will-change: transform, opacity;
}
.fx-trail { font-size: 12px; }
.fx-confetti {
  position: absolute;
  width: 9px; height: 13px;
  border-radius: 2px;
  will-change: transform;
}
.fx-confetti--glyph { width: auto; height: auto; font-size: 16px; background: none !important; }

/* sparkly curtain transition */
.wipe {
  position: absolute;
  inset: 0;
  z-index: 75;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .6), transparent 40%),
    linear-gradient(120deg, #ff9ccb 0%, #ffc7e1 35%, #d5c6ff 70%, #b6e4ff 100%);
  transform: translateX(-102%);
  pointer-events: none;
}
.wipe__stars { color: #fff; font-size: 2rem; letter-spacing: .4em; text-shadow: 0 0 12px rgba(255, 255, 255, .9); }
.wipe--in { animation: wipe-in .42s var(--ease-in-out) forwards; pointer-events: auto; }
.wipe--out { animation: wipe-out .46s var(--ease-in-out) forwards; }
@keyframes wipe-in { from { transform: translateX(-102%); } to { transform: translateX(0); } }
@keyframes wipe-out { from { transform: translateX(0); } to { transform: translateX(102%); } }

/* ---------- avatar ---------- */
.avatar { overflow: visible; }
.avatar .av-pop { animation: av-pop .5s var(--ease-pop); transform-box: fill-box; transform-origin: 50% 50%; }
@keyframes av-pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }

/* ---------- dialog box (GirlsGoGames style) ---------- */
.dlg {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 30;
  width: min(calc(100% - 24px), 720px);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 14px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .97);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--pink-2), 0 14px 34px rgba(150, 40, 110, .28);
  text-align: left;
  cursor: pointer;
  animation: dlg-in .4s var(--ease-pop) both;
}
.dlg--top { top: 14px; bottom: auto; }
.dlg--center { top: 50%; bottom: auto; transform: translate(-50%, -50%); }
.dlg--out { animation: dlg-out .25s ease-in forwards; }
@keyframes dlg-in { from { opacity: 0; translate: 0 16px; scale: .96; } }
@keyframes dlg-out { to { opacity: 0; translate: 0 10px; } }
.dlg__face {
  width: 58px; height: 58px;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #fff, var(--blush-2));
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--pink-2);
}
.dlg__face svg { width: 100%; height: 100%; }
.dlg__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dlg__name {
  align-self: flex-start;
  padding: 2px 10px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--pink-2), var(--pink));
  color: #fff;
  font: 400 .66rem var(--font-pixel);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.dlg__text { font-size: clamp(.95rem, 2.4cqw, 1.12rem); line-height: 1.4; font-weight: 700; color: var(--ink); min-height: 1.4em; }
.dlg__next { color: var(--pink); font-size: .8rem; animation: spa-blink 1s steps(2) infinite; align-self: end; }

/* ---------- loader ---------- */
.screen--loader { align-items: center; justify-content: center; gap: 22px; padding: 24px; }
.loader__logo { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.loader__logo h1 { font-size: clamp(2.6rem, 10cqw, 5rem); font-style: italic; }
.loader__spark { font-size: 2rem; color: var(--pink); animation: spa-spin 2.4s linear infinite; }
.loader__bar {
  width: min(360px, 80%);
  height: 22px;
  padding: 3px;
  border-radius: 99px;
  background: #fff;
  box-shadow: 0 0 0 2px var(--pink-2), inset 0 1px 4px rgba(120, 40, 110, .2);
}
.loader__fill {
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: repeating-linear-gradient(-45deg, var(--pink) 0 10px, var(--pink-2) 10px 20px);
  animation: load-fill 1.6s var(--ease-in-out) forwards, stripes .6s linear infinite;
}
@keyframes load-fill { to { width: 100%; } }
@keyframes stripes { to { background-position: 28px 0; } }
.loader__line { color: var(--ink-2); min-height: 1em; }

/* ---------- start screen ---------- */
.screen--start {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 12px;
  padding: 24px clamp(20px, 5cqw, 56px);
}
.start__art { position: relative; height: 100%; display: grid; place-items: center; min-height: 0; }
.start__dollbtn {
  position: relative;
  height: min(88cqh, 560px);
  aspect-ratio: 200 / 364;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  animation: spa-float 4s ease-in-out infinite;
}
.start__dollbtn .avatar { width: 100%; height: 100%; filter: drop-shadow(0 16px 20px rgba(150, 40, 110, .25)); }
.start__bubbles i {
  position: absolute;
  width: 18px; height: 18px;
  border-radius: 50%;
  left: calc(15% + var(--i) * 11%);
  bottom: 10%;
  background: radial-gradient(circle at 30% 30%, #fff 0 15%, rgba(255, 190, 225, .4) 60%, rgba(255, 255, 255, .6));
  animation: bubble-rise-sm calc(4s + var(--i) * .6s) ease-in infinite;
  animation-delay: calc(var(--i) * -.7s);
  pointer-events: none;
}
@keyframes bubble-rise-sm { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-60cqh) scale(1.1); opacity: 0; } }
.start__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.start__kicker { color: var(--pink-deep); background: rgba(255, 255, 255, .8); padding: 6px 12px; border-radius: 99px; box-shadow: 0 0 0 2px #fff; }
.start__title { font-size: clamp(3rem, 11cqw, 6.6rem); font-style: italic; line-height: .95; padding: 0 .08em .08em 0; }
.start__tagline { font-size: clamp(1rem, 2.4cqw, 1.3rem); line-height: 1.45; color: var(--ink-2); max-width: 30ch; }
.start__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 6px; }
.start__note { font-size: .82rem; color: var(--ink-3); }

@container stage (max-width: 700px) {
  .screen--start { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; text-align: center; padding: 12px 20px 20px; gap: 4px; }
  .start__copy { align-items: center; gap: 10px; }
  .start__dollbtn { height: min(44cqh, 360px); }
  .start__tagline { margin: 0 auto; }
  .start__actions { justify-content: center; }
}

/* ---------- spa menu (level map) ---------- */
.screen--map { align-items: center; justify-content: center; gap: clamp(12px, 3cqh, 28px); padding: 20px; overflow-y: auto; }
.map__head { text-align: center; }
.map__kicker { color: var(--pink-deep); }
.map__title-main { font-size: clamp(2.2rem, 7cqw, 3.6rem); font-style: italic; }
.map__list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  width: min(100%, 980px);
  margin: 0; padding: 0;
  list-style: none;
}
.map__card {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 12px 16px;
  border-radius: 22px;
  border: 3px solid #fff;
  background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(255, 236, 246, .95));
  box-shadow: 0 6px 0 rgba(255, 140, 196, .35), 0 14px 26px rgba(150, 40, 110, .15);
  text-align: center;
  cursor: pointer;
  transition: transform .2s var(--ease-pop), box-shadow .2s;
}
.map__card:hover { transform: translateY(-4px) rotate(-1deg); }
.map__card.is-done { background: linear-gradient(180deg, #fff, #ffe0ef); }
.map__card.is-locked { filter: grayscale(.7); opacity: .6; cursor: not-allowed; }
.map__num { color: var(--ink-3); }
.map__icon { width: 54px; height: 54px; color: var(--pink); }
.map__icon svg { width: 100%; height: 100%; }
.map__cat { font-size: .58rem; color: var(--pink-deep); }
.map__title { font-size: 1.1rem; line-height: 1.15; }
.map__status { display: grid; place-items: center; width: 30px; height: 30px; margin-top: auto; border-radius: 50%; background: var(--blush); color: var(--pink-deep); font-size: .8rem; }
.map__status svg { width: 16px; height: 16px; }
.map__card.is-done .map__status { background: var(--pink); color: #fff; }
.map__foot { display: flex; justify-content: center; }
@container stage (max-width: 760px) {
  .screen--map { justify-content: flex-start; }
  .map__list { grid-template-columns: 1fr; gap: 10px; max-width: 460px; }
  .map__card { flex-direction: row; padding: 10px 14px; gap: 12px; text-align: left; }
  .map__icon { width: 36px; height: 36px; flex: none; }
  .map__num { order: -1; }
  .map__cat { display: none; }
  .map__title { flex: 1; font-size: 1rem; }
  .map__status { margin: 0; }
}

/* ---------- level intro card ---------- */
.screen--intro { align-items: center; justify-content: center; padding: 20px; }
.intro__sparkles { position: absolute; top: 12%; left: 50%; transform: translateX(-50%); color: #fff; font-size: 2rem; letter-spacing: 1em; text-shadow: 0 0 10px var(--pink-2); animation: spa-float 3s ease-in-out infinite; }
.intro__card { width: min(100%, 460px); }
.intro__station { margin-left: auto; opacity: .75; }
.intro__body { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 24px 28px; text-align: center; }
.intro__icon {
  width: 88px; height: 88px;
  padding: 16px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(180deg, var(--pink-2), var(--pink));
  box-shadow: 0 0 0 5px #fff, 0 0 0 8px var(--blush-2), 0 12px 24px rgba(255, 95, 168, .35);
  animation: spa-wiggle 3s ease-in-out infinite;
}
.intro__icon svg { width: 100%; height: 100%; }
.intro__cat { color: var(--pink-deep); margin-top: 8px; }
.intro__title { font-size: clamp(2rem, 7cqw, 3rem); font-style: italic; padding-bottom: .05em; }
.intro__text { font-size: 1.05rem; line-height: 1.45; color: var(--ink-2); max-width: 32ch; }
.intro__actions { margin-top: 10px; }

/* ---------- level screens ---------- */
.screen--level { overflow: hidden; }
.lvl-placeholder { flex: 1; display: grid; place-items: center; padding: 24px; text-align: center; }
.lvl-placeholder .card { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 420px; }
.lvl-error { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* ---------- level-complete overlay ---------- */
.overlay-layer { position: absolute; inset: 0; z-index: 40; pointer-events: none; }
.overlay-layer.is-open { pointer-events: auto; }
.complete {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .5), rgba(255, 190, 222, .55) 60%, rgba(200, 170, 255, .55));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade .3s ease both;
  overflow-y: auto;
}
@keyframes fade { from { opacity: 0; } }
.complete__card {
  position: relative;
  width: min(100%, 480px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 26px 24px 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, .96);
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px var(--pink-2), 0 24px 60px rgba(150, 40, 110, .35);
  text-align: center;
  animation: spa-pop-in .6s var(--ease-pop) both;
  isolation: isolate;
  overflow: hidden;
}
.complete__rays {
  position: absolute;
  inset: -50%;
  z-index: -1;
  background: repeating-conic-gradient(from 0deg, rgba(255, 180, 215, .22) 0 10deg, transparent 10deg 20deg);
  animation: spa-spin 24s linear infinite;
}
.complete__kicker { color: var(--pink-deep); }
.complete__title { font-size: clamp(2rem, 7cqw, 2.8rem); font-style: italic; }
.complete__stars { display: flex; gap: 6px; font-size: 2rem; color: #ffc93c; text-shadow: 0 2px 0 #e0a100, 0 0 12px rgba(255, 201, 60, .6); }
.complete__stars span { animation: spa-pop-in .5s var(--ease-pop) both; }
.complete__stars span:nth-child(1) { animation-delay: .25s; }
.complete__stars span:nth-child(2) { animation-delay: .4s; font-size: 2.5rem; margin-top: -6px; }
.complete__stars span:nth-child(3) { animation-delay: .55s; }
.complete__unlock { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 16px; border-radius: 18px; background: var(--pearl-sheen); box-shadow: inset 0 0 0 2px #fff; width: 100%; }
.complete__badge { font: italic 800 1.3rem var(--font-display); color: var(--ink); }
.complete__takeaway { font-size: 1rem; line-height: 1.45; color: var(--ink-2); }
.meter { width: 100%; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.meter__label { color: var(--ink-2); font-size: .66rem; }
.meter__track { width: 100%; height: 14px; border-radius: 99px; background: #fff; box-shadow: 0 0 0 2px var(--blush-2), inset 0 1px 3px rgba(120, 40, 110, .2); overflow: hidden; }
.meter__fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--pink-2), var(--pink), var(--lilac)); transition: width 1.1s var(--ease-out); }
.complete__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 6px; }
.complete__menu { font-size: .8rem; }

/* ---------- default finale ---------- */
.screen--finale { align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; overflow-y: auto; }
.finale__title { font-size: clamp(2.4rem, 8cqw, 4rem); font-style: italic; }
.finale__list { display: grid; gap: 8px; list-style: none; padding: 0; margin: 0; max-width: 560px; }
.finale__list li { padding: 10px 14px; border-radius: 16px; background: rgba(255, 255, 255, .9); box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 2px; }
.finale__list .pixel { color: var(--pink-deep); font-size: .6rem; }
.finale__why { max-width: 48ch; line-height: 1.5; }
.finale__actions { display: flex; gap: 12px; justify-content: center; }

/* ---------- responsive window ---------- */
@media (max-width: 640px), (max-height: 560px) {
  .window {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    border: 0;
    box-shadow: none;
  }
  .titlebar { gap: 6px; padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top)); }
  .titlebar__dots { display: none; }
  .titlebar__name { font-size: 1rem; }
  .icon-btn { width: 36px; height: 36px; }
  .progress__node { width: 24px; height: 24px; font-size: .62rem; }
  .progress__track { margin: 0 10px; height: 8px; }
  .bottombar { min-height: 38px; padding-left: 8px; padding-right: 8px; }
  .bottombar__hint { font-size: .78rem; }
  .toasts { top: 58px; }
}
@media (max-width: 420px) {
  .titlebar__name { display: none; }
  .titlebar__flower { font-size: 1.5rem; }
  .progress { padding-bottom: 12px; }
  .progress__label { font-size: .5rem; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .titlebar { padding-top: 4px; padding-bottom: 4px; }
  .progress__label { display: none; }
  .progress { padding-bottom: 0; }
}

/* =========================================================
   Hair Spa v2 — start screen product lineup, step product
   cards, icon progress nodes, reward card extras
   ========================================================= */

/* progress nodes carry the product icons */
.progress__num { display: grid; place-items: center; width: 100%; height: 100%; color: var(--lilac); }
.progress__num svg { width: 62%; height: 62%; }
.progress__node.is-current .progress__num { color: var(--pink-deep); }

/* ---- start screen ---- */
.start__art--products { position: relative; display: grid; place-items: center; align-content: center; }
.start__halo {
  position: absolute;
  width: min(92%, 70cqh);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .95) 0%, rgba(233, 220, 255, .8) 38%, rgba(255, 200, 230, .35) 62%, transparent 72%);
  animation: halo-breathe 5s ease-in-out infinite;
}
@keyframes halo-breathe { 50% { transform: scale(1.05); opacity: .85; } }
.start__shelf {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(4px, 1.4cqw, 18px);
  height: min(52cqh, 380px);
  width: 100%;
}
.start__pack {
  height: calc(100% - var(--i) * 0%);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  animation: pack-bob 3.6s ease-in-out infinite;
  animation-delay: calc(var(--i) * -.6s);
  transition: transform .25s var(--ease-pop);
  filter: drop-shadow(0 14px 16px rgba(110, 60, 150, .22));
}
.start__pack:nth-child(1) { height: 100%; }
.start__pack:nth-child(2) { height: 84%; }
.start__pack:nth-child(3) { height: 70%; }
.start__pack:nth-child(4) { height: 80%; }
.start__pack svg { height: 100%; width: auto; max-width: none; }
.start__pack:hover { transform: translateY(-8px) rotate(-2deg); }
.start__pack.is-wiggle { animation: spa-wiggle .5s ease-in-out 2; }
@keyframes pack-bob { 50% { translate: 0 -6px; } }
.start__shelfline {
  position: relative;
  width: min(100%, 520px);
  height: 14px;
  margin-top: -2px;
  border-radius: 99px;
  background: linear-gradient(180deg, #fff, #e7dcf7 60%, #cbbde6);
  box-shadow: 0 8px 18px rgba(110, 60, 150, .2);
}
.start__steps {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .78);
  box-shadow: inset 0 0 0 2px #fff, 0 8px 20px rgba(150, 40, 110, .1);
}
.start__dots { display: flex; gap: 6px; margin-bottom: 4px; }
.start__dots i { width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(180deg, var(--pink-2), var(--pink)); box-shadow: 0 0 0 2px #fff; animation: spa-pulse 2.4s ease-in-out infinite; }
.start__dots i:nth-child(2) { animation-delay: .15s; background: linear-gradient(180deg, #d8c7ff, var(--lilac)); }
.start__dots i:nth-child(3) { animation-delay: .3s; }
.start__dots i:nth-child(4) { animation-delay: .45s; background: linear-gradient(180deg, #d8c7ff, var(--lilac)); }
.start__dots i:nth-child(5) { animation-delay: .6s; }
.start__step { font-weight: 700; color: var(--ink); line-height: 1.3; }
.start__step--0 { font: italic 800 1.25rem var(--font-display); }
.start__step--1 { color: var(--ink-2); }
.start__title { text-transform: none; }

@container stage (max-width: 700px) {
  .start__shelf { height: min(30cqh, 260px); }
  .start__halo { width: min(80%, 42cqh); }
  .start__steps { align-items: center; text-align: center; }
  .start__step--0 { font-size: 1.1rem; }
}
@container stage (max-height: 460px) {
  .screen--start { padding-top: 10px; padding-bottom: 10px; }
  .start__copy { gap: 8px; }
  .start__title { font-size: clamp(2rem, 9cqh, 3.2rem); }
  .start__tagline { font-size: .95rem; }
  .start__steps { padding: 6px 12px; }
  .start__dots { display: none; }
  .start__note { display: none; }
}

/* ---- step product card ---- */
.intro__card { width: min(100%, 700px); }
.intro__body {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 18px;
  padding: 22px 26px 24px;
  text-align: left;
}
.intro__visual { position: relative; display: grid; place-items: center; min-height: 0; height: min(46cqh, 340px); }
.intro__halo { position: absolute; inset: 6%; border-radius: 50%; background: radial-gradient(circle, #fff 0%, #efe6ff 45%, rgba(255, 210, 235, .5) 65%, transparent 72%); animation: halo-breathe 5s ease-in-out infinite; }
.intro__product { position: relative; height: 92%; width: auto; max-width: 100%; animation: spa-float 3.6s ease-in-out infinite; filter: drop-shadow(0 18px 18px rgba(110, 60, 150, .25)); }
.intro__visual .intro__icon { position: relative; }
.intro__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.intro__cat { margin-top: 0; }
.intro__title { font-size: clamp(2rem, 6cqw, 3rem); }
.intro__product-name { font-size: .92rem; line-height: 1.35; color: var(--ink-2); font-weight: 700; }
.intro__benefit { font: italic 600 1rem var(--font-display); color: #8a5bd6; }
.intro__benefit::before { content: '✦ '; color: var(--pink); font-style: normal; }
.intro__unlocks { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; font-size: 1rem; }
.intro__unlocks strong { font: italic 800 1.1rem var(--font-display); color: var(--ink); }
.intro__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; }
@container stage (max-width: 640px) {
  .intro__body { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 16px 18px 20px; gap: 8px; }
  .intro__visual { height: min(30cqh, 220px); width: 100%; }
  .intro__copy { align-items: center; }
  .intro__unlocks, .intro__actions { justify-content: center; }
}
@container stage (max-height: 460px) {
  .intro__body { grid-template-columns: .7fr 1.3fr; padding: 10px 18px 14px; text-align: left; justify-items: stretch; }
  .intro__visual { height: 62cqh; }
  .intro__copy { align-items: flex-start; gap: 4px; }
  .intro__title { font-size: 1.7rem; }
  .intro__sparkles { display: none; }
}

/* ---- reward card extras ---- */
.complete__used {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 6px;
  border-radius: 99px;
  background: linear-gradient(180deg, #f3edff, #e4d8ff);
  box-shadow: inset 0 0 0 2px #fff;
  font: 400 .66rem var(--font-pixel);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #5b3fb0;
}
.complete__used-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #fff; color: var(--lilac); }
.complete__used-icon svg { width: 16px; height: 16px; }
.complete__stars span { color: var(--pink); text-shadow: 0 2px 0 var(--pink-deep), 0 0 12px rgba(255, 95, 168, .5); }
.complete__stars span:nth-child(2) { color: #ff4f8f; }

/* ---- fallback finale ---- */
.finale__name { font-size: .9rem; letter-spacing: .3em; color: var(--ink); }
.finale__next { font-size: clamp(1.4rem, 4cqw, 2rem); font-style: italic; color: var(--pink-deep); }

/* ---------- easy mode: "tap anywhere" cue ---------- */
.screen--level, .screen--start, .screen--intro { cursor: pointer; }
.tapcue {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 36;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px 7px 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 0 0 2px var(--pink-2), 0 8px 20px rgba(150, 40, 110, .22);
  font: 400 .66rem var(--font-pixel);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--pink-deep);
  pointer-events: none;
  animation: tapcue-bob 1.6s ease-in-out infinite;
}
.tapcue[hidden] { display: none; }
.tapcue__hand { font-size: 1.05rem; animation: tapcue-tap 1.6s ease-in-out infinite; }
@keyframes tapcue-bob { 50% { transform: translateY(-3px); } }
@keyframes tapcue-tap { 0%, 60%, 100% { transform: translateY(0) scale(1); } 30% { transform: translateY(3px) scale(.9); } }
.stage:has(.dlg--bottom) .tapcue { bottom: 150px; }
@container stage (max-width: 520px) {
  .tapcue { right: 50%; transform: translateX(50%); bottom: 10px; animation: none; }
  .stage:has(.dlg--bottom) .tapcue { bottom: 170px; }
}

/* start screen: Shruti's portrait with the product lineup in front */
.start__art--products { grid-template-rows: auto auto; }
.start__portrait { position: relative; z-index: 1; height: min(64cqh, 480px); aspect-ratio: 4 / 5; animation: spa-float 5s ease-in-out infinite; }
.start__portrait .salon-client { width: 100%; height: 100%; filter: drop-shadow(0 18px 22px rgba(120, 50, 130, .22)); }
.start__shelfwrap { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; width: 100%; margin-top: calc(min(64cqh, 480px) * -.22); }
.start__art--products .start__shelf { height: min(22cqh, 170px); }
@container stage (max-width: 700px) {
  .start__portrait { height: min(34cqh, 300px); }
  .start__shelfwrap { margin-top: calc(min(34cqh, 300px) * -.2); }
  .start__art--products .start__shelf { height: min(12cqh, 96px); }
}
@container stage (max-height: 460px) {
  .start__portrait { height: 64cqh; }
  .start__art--products .start__shelf { height: 20cqh; }
}

/* CV link in the title bar */
.cvpill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 14px;
  border-radius: 99px; border: 2px solid #fff;
  background: linear-gradient(180deg, #ffa6d0, var(--pink) 60%, #e33b8a);
  box-shadow: 0 3px 0 #b8246b, 0 6px 14px rgba(160, 30, 100, .25);
  color: #fff; text-decoration: none;
  font: 400 .72rem var(--font-pixel); letter-spacing: .08em; text-transform: uppercase;
  transition: transform .15s var(--ease-pop);
}
.cvpill:hover { transform: translateY(-2px) scale(1.04); }
.cvpill:active { transform: scale(.95); }
@media (max-width: 640px), (max-height: 560px) { .cvpill { height: 36px; padding: 0 10px; } }
@media (max-width: 420px) { .cvpill span { display: none; } }
.start__cv { text-decoration-style: solid; }
