/* Tiệm Bánh Tiểu Tiên — v1 (NP-04). Phong cách: hồng + bóng mượt, viền nâu #4a2f1d. */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Hiragino Maru Gothic ProN", "Hiragino Sans", "M PLUS Rounded 1c", sans-serif;
  background: #ffe9f2; color: #4a2f1d; overflow-x: hidden;
}
#app { max-width: 820px; margin: 0 auto; position: relative; min-height: 100vh; }
.screen { position: relative; min-height: 100vh; }
[hidden] { display: none !important; }

/* Nền tiệm bánh phủ kín màn */
.title-bg, .bake-bg, .gift-bg { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.title-bg img, .bake-bg img, .gift-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.title-wrap, .bake-wrap, .gift-wrap { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; padding: 16px 12px 24px; min-height: 100vh; }
.album-wrap { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; padding: 20px 12px 24px; min-height: 100vh; background: linear-gradient(#ffe9f2, #fff6ec); }

.game-title { font-size: 40px; line-height: 1.25; text-align: center; margin: 10px 0 2px; color: #fff; text-shadow: 0 2px 0 #c93324, 0 4px 12px rgba(0,0,0,.35); }
.game-sub { font-size: 18px; font-weight: 700; margin: 0 0 8px; color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.4); }
#title-momo { width: min(78vw, 340px); border-radius: 24px; }
.bubble {
  background: rgba(255,255,255,.95); border: 3px solid #4a2f1d; border-radius: 18px;
  padding: 10px 16px; font-size: 19px; font-weight: 700; text-align: center; max-width: 92%;
  margin: 12px 0; box-shadow: 0 3px 0 #4a2f1d;
}
.stars-line { font-size: 20px; font-weight: 800; margin: 4px 0; color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.4); }
.bigbtn {
  font-family: inherit; font-size: 22px; font-weight: 800; color: #fff; cursor: pointer;
  background: linear-gradient(180deg, #ff9a3d, #f2553d); border: 3px solid #4a2f1d; border-radius: 999px;
  padding: 14px 28px; margin: 10px 0; box-shadow: 0 4px 0 #4a2f1d;
  min-height: 64px; display: inline-flex; align-items: center; justify-content: center;
}
.bigbtn:active { transform: translateY(3px); box-shadow: 0 1px 0 #4a2f1d; }
.bigbtn:disabled { opacity: .45; }
.pill-btn {
  font-family: inherit; font-size: 17px; font-weight: 700; color: #4a2f1d; cursor: pointer;
  background: #fff; border: 3px solid #4a2f1d; border-radius: 999px; padding: 8px 18px;
  min-height: 64px; display: inline-flex; align-items: center; justify-content: center;
}
.round-btn {
  font-family: inherit; font-size: 20px; cursor: pointer; width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,.95); border: 3px solid #4a2f1d; display: inline-flex; align-items: center; justify-content: center;
}
.topbar { display: flex; gap: 10px; align-items: center; width: 100%; max-width: 560px; }
.topbar .stars-line { flex: 1; text-align: center; }
.step-dots { display: flex; gap: 10px; list-style: none; padding: 0; margin: 12px 0 0; }
.step-dots li {
  width: 40px; height: 40px; border-radius: 50%; border: 3px solid #4a2f1d; background: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 800;
}
.step-dots li.on { background: #ffd94d; }
.step-dots li.done { background: #b8e986; }
.counter { position: relative; width: min(92vw, 520px); height: 300px; margin-top: 6px; }
.cake-stage { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 300px; height: 260px; }
.cake-stage svg { width: 100%; height: 100%; }
#bake-momo { position: absolute; right: -6px; bottom: 0; width: 120px; border-radius: 16px; }
.action-area { width: 100%; max-width: 560px; margin-top: 10px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.choice {
  font-family: inherit; font-size: 18px; font-weight: 700; color: #4a2f1d; cursor: pointer;
  background: #fff; border: 3px solid #4a2f1d; border-radius: 16px; padding: 10px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 96px;
}
.choice.sel { background: #ffd94d; box-shadow: 0 3px 0 #4a2f1d; }
.choice svg { width: 64px; height: 64px; }
.choice .swatch { width: 44px; height: 44px; border-radius: 50%; border: 3px solid #4a2f1d; }
.cream-bar { width: 100%; max-width: 420px; height: 22px; border: 3px solid #4a2f1d; border-radius: 999px; background: #fff; overflow: hidden; }
.cream-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #ffb3c7, #f2553d); transition: width .2s; }
.cream-hint { font-size: 15px; font-weight: 700; text-align: center; width: 100%; margin: 2px 0; }
.next-row { margin: 6px 0 0; }
.gift-friend { font-size: 110px; line-height: 1; margin: 8px 0; }
.gift-cake { margin: 4px 0; }
.gift-cake svg { width: 200px; height: 170px; }
.album-grid { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; width: 100%; }
.album-card { background: #fff; border: 3px solid #4a2f1d; border-radius: 16px; padding: 10px; text-align: center; width: 160px; }
.album-card svg { width: 130px; height: 110px; }
.album-card .lbl { font-size: 14px; font-weight: 700; margin-top: 4px; }
.album-empty { font-size: 17px; font-weight: 700; }
.fly { transition: transform .45s ease; }
@keyframes sparkle { 0% { transform: scale(1) rotate(0deg); opacity: 1; } 100% { transform: scale(1.6) rotate(20deg); opacity: 0; } }
.spark { animation: sparkle .6s ease forwards; position: absolute; pointer-events: none; font-size: 22px; }
@keyframes wiggle { 0%,100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
.wiggle { animation: wiggle .5s ease infinite; }
@media (max-width: 500px) {
  .game-title { font-size: 32px; }
  #title-momo { width: 86vw; }
  .counter { height: 260px; }
  .cake-stage { width: 260px; height: 225px; }
  #bake-momo { width: 92px; }
  .bigbtn { font-size: 19px; padding: 12px 22px; }
  .bubble { font-size: 17px; }
}
