/* Onboarding: 4 trang vuốt ngang (scroll-snap như UIPageViewController) */
.app:has(.onboarding) .scroll { padding-bottom: 0; }
.onboarding { flex: 1; display: flex; flex-direction: column; min-height: 0; margin: 0 -20px; }

.ob-top { display: flex; justify-content: flex-end; padding: 0 20px; min-height: 44px; align-items: center; }
.ob-skip { min-height: 44px; padding: 0 8px; font-weight: 800; color: var(--muted); }

.slides {
  flex: 1; display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
}
.slides::-webkit-scrollbar { display: none; }
.slide {
  flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 8px 28px 24px; text-align: center;
}
.slide h1 { font-size: 30px; line-height: 1.15; font-weight: 800; max-width: 320px; }
.slide p { font-size: calc(16rem / 17); font-weight: 600; line-height: 1.45; color: var(--muted); max-width: 300px; }

/* Vùng minh họa: blob màu phía sau, nội dung động phía trước */
.art { position: relative; width: 300px; height: 300px; display: grid; place-items: center; margin-bottom: 8px; }
.art::before {
  content: ""; position: absolute; inset: 22px; border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%;
  background: var(--blob); border: var(--line); box-shadow: 0 6px 0 var(--ink);
  animation: morph 9s ease-in-out infinite;
}
@keyframes morph { 50% { border-radius: 58% 42% 45% 55% / 42% 56% 44% 58%; } }
.art > * { position: relative; }
.slide:not(.on) .art * { animation-play-state: paused; }

/* 1 — Capy chào, xu bay vòng quanh */
.orbit { position: absolute; inset: 0; animation: spin 7s linear infinite; }
.orbit i {
  position: absolute; width: 30px; height: 30px; border-radius: 50%;
  background: var(--drink); border: 2.5px solid var(--ink); box-shadow: inset -3px -3px 0 #E8B400;
}
.orbit i:nth-child(1) { top: 18px; left: 50%; }
.orbit i:nth-child(2) { bottom: 40px; left: 16px; }
.orbit i:nth-child(3) { bottom: 60px; right: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
.orbit i { animation: spin 7s linear infinite reverse; }
.wave { animation: wave 1.6s ease-in-out infinite; transform-origin: 50% 85%; }
@keyframes wave { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg) translateY(-6px); } }

/* 2 — sticker xòe ra */
.fan { position: relative; width: 220px; height: 190px; }
.fan .polaroid { position: absolute; left: 58px; top: 20px; width: 112px; animation: fan 3.2s var(--spring) infinite; }
.fan .polaroid:nth-child(1) { --r: -16deg; --x: -62px; }
.fan .polaroid:nth-child(2) { --r: 2deg; --x: 0px; z-index: 1; animation-delay: .08s; }
.fan .polaroid:nth-child(3) { --r: 16deg; --x: 62px; animation-delay: .16s; }
@keyframes fan {
  0%, 12% { transform: translateX(0) rotate(0); }
  35%, 85% { transform: translateX(var(--x)) rotate(var(--r)); }
  100% { transform: translateX(0) rotate(0); }
}

/* 3 — lịch ảnh tự lấp đầy */
.mini-cal { display: grid; grid-template-columns: repeat(5, 36px); gap: 7px; padding: 14px; border-radius: 20px; background: var(--card); border: var(--line); box-shadow: var(--lift); }
.mini-cal i { width: 36px; height: 36px; border-radius: 10px; border: 2px solid var(--ink); background: var(--c); animation: fill-in 4s var(--spring) infinite; animation-delay: var(--d); }
@keyframes fill-in { 0%, 8% { transform: scale(0); } 22%, 88% { transform: scale(1); } 100% { transform: scale(0); } }

/* 4 — ngân sách */
.budget-input { display: flex; align-items: baseline; justify-content: center; gap: 4px; padding: 14px 20px; width: 100%; max-width: 300px; border-radius: 22px; }
.budget-input input {
  width: 100%; min-width: 0; border: 0; outline: none; background: none; padding: 0; text-align: right;
  font-family: "Baloo 2", system-ui, sans-serif; font-size: 40px; font-weight: 800; color: var(--ink);
}
.budget-input span { font-family: "Baloo 2", system-ui, sans-serif; font-size: 28px; font-weight: 800; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chips button {
  min-height: 44px; padding: 0 14px; border-radius: 12px; font-weight: 800;
  background: var(--card); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink);
}
.chips button[aria-pressed="true"] { background: var(--orange); transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.a2hs { display: flex; gap: 10px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 16px; background: var(--soft); font-size: calc(13rem / 17); font-weight: 700; max-width: 320px; }
.a2hs .i { color: var(--orange-ink); }

.ob-bottom { padding: 12px 20px calc(env(safe-area-inset-bottom) + 20px); display: flex; flex-direction: column; align-items: center; gap: 18px; }
.dots { display: flex; gap: 8px; }
.dots i { width: 8px; height: 8px; border-radius: 999px; background: #948C7A; transition: width .4s var(--spring), background .3s; }
.dots i.on { width: 26px; background: var(--ink); }
.ob-bottom .btn { width: 100%; }
