/* 개업 안내: 넘기는 카드 (public/js/ui/onboarding.js) — 다음 버튼 · 스와이프 · 점 누르기
   종이 카드 + 노란 테이프는 전단지와 같은 모양, 넘길 때 읽기 쉽게 기울이지 않는다 */
.onb {
  position: relative; width: min(380px, 100%); max-height: calc(100dvh - 32px); display: grid; grid-template-rows: auto 1fr auto auto;
  background: var(--paper); color: var(--ink); border-radius: 18px; padding: 14px 0 16px; box-shadow: var(--shadow);
  animation: onb-in .4s var(--ease-back);
}
.onb::before { content: ''; position: absolute; top: -10px; left: 50%; width: 96px; height: 24px; margin-left: -48px; background: rgba(245, 184, 0, .6); transform: rotate(-2deg); }
@keyframes onb-in { from { transform: translateY(24px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.onb-skip { justify-self: end; margin-right: 8px; min-height: var(--tap); padding: 0 12px; border: 0; background: none; color: #6B6358; font: 700 14px/1 var(--f-body); cursor: pointer; }
.onb-viewport { overflow: hidden; touch-action: pan-y; cursor: grab; }
.onb-viewport:active { cursor: grabbing; }
.onb-track { display: flex; transition: transform .38s var(--ease-out); will-change: transform; }
.onb-slide { flex: 0 0 100%; padding: 0 22px; user-select: none; -webkit-user-select: none; }
.onb-kicker { display: flex; align-items: center; gap: 8px; margin-top: 14px; font: 400 14px/1 var(--f-sign); color: var(--sign-red); }
.onb-kicker img { width: 30px; height: 40px; image-rendering: pixelated; }
.onb h2 { margin: 8px 0 8px; font: 400 26px/1.22 var(--f-sign); color: var(--ink); word-break: keep-all; }
.onb p { font-size: 15px; line-height: 1.6; color: #3A3A3A; word-break: keep-all; }
.onb mark { background: linear-gradient(transparent 55%, rgba(245, 184, 0, .55) 55%); color: inherit; font-weight: 800; padding: 0 1px; }
.onb-dots { display: flex; justify-content: center; gap: 2px; margin-top: 10px; }
.onb-dots button { width: var(--tap); height: var(--tap); display: grid; place-items: center; border: 0; background: none; cursor: pointer; }
.onb-dots i { width: 8px; height: 8px; border-radius: 4px; background: #CFC6B6; transition: width .25s, background .25s; }
.onb-dots [aria-selected="true"] i { width: 22px; background: var(--sign-red); }
.onb-acts { display: flex; gap: 8px; padding: 6px 22px 0; }
.onb-acts [data-next] { flex: 1; }
.onb-acts .btn.ghost { --c: #E9E2D4; --d: #C9C0AE; --fg: var(--ink); border-color: #D8CFC0; }

/* 슬라이드 그림: 지금 보이는 장에서만 살짝 튀어나온다 */
.art { position: relative; height: 150px; margin: 4px 0 0; border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 12px;
  background: radial-gradient(80% 90% at 50% 100%, #2A3247, #141927); overflow: hidden; }
.onb-slide.on .art > * { animation: art-pop .5s var(--ease-back) both; }
.onb-slide.on .art > *:nth-child(2) { animation-delay: .12s; }
.onb-slide.on .art > *:nth-child(3) { animation-delay: .24s; }
@keyframes art-pop { from { transform: translateY(12px) scale(.9); opacity: 0; } }
.art-arrow { color: var(--sign-yellow); font: 400 26px/1 var(--f-sign); }
.art-typed { padding: 10px 12px; border-radius: 10px; background: #fff; color: var(--ink); font: 700 15px/1 var(--f-body); box-shadow: 0 0 0 3px rgba(245, 184, 0, .5); }
.art-typed i { display: inline-block; width: 2px; height: 16px; margin-left: 2px; vertical-align: -3px; background: var(--ink); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.art-shop { position: relative; width: 112px; height: 104px; border-radius: 6px 6px 0 0; background: #E9EEF2; box-shadow: 0 0 26px rgba(255, 224, 138, .45); display: grid; justify-items: center; align-content: start; padding-top: 22px; }
.art-shop.small { width: 96px; height: 92px; }
.art-shop .awn { position: absolute; top: 0; left: -4px; right: -4px; height: 16px; background: repeating-linear-gradient(90deg, var(--sign-blue) 0 12px, #fff 12px 24px); border-radius: 3px; }
.art-shop b { padding: 4px 6px; border-radius: 3px; background: #2F6FB2; color: #fff; font: 400 13px/1 var(--f-sign); white-space: nowrap; }
.art-shop .door { position: absolute; bottom: 0; left: 18%; right: 18%; height: 44px; background: #FFE9A8; border-radius: 2px 2px 0 0; box-shadow: inset 0 0 0 2px #2F6FB2; }
.art-shop em { position: absolute; top: -14px; right: -14px; padding: 5px 8px; border-radius: 999px; background: var(--sign-yellow); color: var(--ink); font: 400 15px/1 var(--f-sign); font-style: normal; box-shadow: 0 3px 0 var(--sign-yellow-d); }
.ticket { position: relative; display: grid; gap: 2px; padding: 12px 16px; border-radius: 8px; background: var(--sign-yellow); color: var(--ink); text-align: center;
  -webkit-mask: radial-gradient(circle 7px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 7px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 7px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 7px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat; }
.ticket small { font: 700 12px/1 var(--f-body); }
.ticket b { font: 400 30px/1 var(--f-sign); }
.art-level { align-items: flex-end; padding-bottom: 34px; gap: 10px; }
.mini { position: relative; width: 62px; border-radius: 4px 4px 0 0; display: grid; place-items: start center; padding-top: 6px; }
.mini b { font: 400 13px/1 var(--f-sign); color: var(--ink); background: #fff; padding: 2px 5px; border-radius: 4px; }
.mini.lv1 { height: 56px; background: repeating-linear-gradient(#9AA0A6 0 6px, #7C828A 6px 8px); }
.mini.lv3 { height: 64px; background: #FFE08A; box-shadow: 0 0 22px rgba(255, 224, 138, .7); }
.mini.lv9 { height: 92px; background: linear-gradient(#C9D6F0 0 40%, #FFE08A 40%); box-shadow: 0 0 22px rgba(255, 224, 138, .6); }
.lvbar { position: absolute; left: 14%; right: 14%; bottom: 14px; height: 8px; border-radius: 4px; background: #3A4460; overflow: hidden; }
.lvbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--sign-yellow), #FFD84D); }
.onb-slide.on .lvbar i { animation: lvfill 1.4s .3s var(--ease-out) forwards; }
@keyframes lvfill { to { width: 72%; } }
.wish-card { display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; background: #fff; color: var(--ink); box-shadow: 0 0 0 2px #E2D9C6; }
.wish-card b { font: 400 18px/1 var(--f-sign); }
.wish-card small { font: 700 13px/1 var(--f-body); color: #8A6A1E; }
.art-medal { display: grid; justify-items: center; gap: 4px; font-size: 44px; line-height: 1; }
.art-medal small { padding: 4px 8px; border-radius: 999px; background: var(--sign-yellow); color: var(--ink); font: 400 13px/1 var(--f-sign); }
@media (prefers-reduced-motion: reduce) { .onb, .onb-track, .onb-slide.on .art > *, .onb-slide.on .lvbar i { animation: none; transition: none; } .onb-slide.on .lvbar i { width: 72%; } }

/* 1장: 처음 온 사람에게 인사하는 사장님 */
.art-welcome { gap: 14px; }
.art-welcome .boss-big { width: 66px; height: 90px; image-rendering: pixelated; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .45)); }
.art-welcome .say { position: relative; padding: 12px 14px; border-radius: 12px; background: #fff; color: var(--ink); font: 400 20px/1.15 var(--f-sign); }
.art-welcome .say small { font: 700 13px/1 var(--f-body); color: #6B6358; }
.art-welcome .say::before { content: ''; position: absolute; left: -9px; top: 50%; margin-top: -8px; border: 8px solid transparent; border-left: 0; border-right-color: #fff; }
.onb-slide:first-child .onb-kicker img { display: none; }      /* 1장은 그림에 사장님이 크게 있어서 */

/* 1장: 살아 있는 3D 광장 (결정 80) */
.art-live { height: 210px; padding: 0; display: block; }
.art-live canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.art-live .map-tag { display: none; }
.live-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 14px; transition: opacity .6s; }
.art-live.ready .live-fallback { opacity: 0; }
.live-badge { position: absolute; left: 10px; top: 10px; z-index: 2; display: none; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font: 700 12px/1 var(--f-body); }
.art-live.ready .live-badge { display: inline-flex; }
.live-badge i { width: 8px; height: 8px; border-radius: 50%; background: #FF4D4D; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.art-live .boss-big { width: 66px; height: 90px; image-rendering: pixelated; }
.art-live .say { padding: 12px 14px; border-radius: 12px; background: #fff; color: var(--ink); font: 400 20px/1.15 var(--f-sign); }

/* 2장: 가게가 자란다 */
.art-grow { height: 190px; display: block; }
.grow-stage { position: absolute; inset: 0 0 26px; display: flex; align-items: flex-end; justify-content: center; gap: 10px; padding-bottom: 8px; }
.art-grow.ready .grow-stage img { position: absolute; left: 50%; bottom: 0; height: 100%; transform: translateX(-50%) scale(.96); opacity: 0; transition: opacity .45s, transform .45s; }
.art-grow.ready .grow-stage img.on { opacity: 1; transform: translateX(-50%) scale(1); }
.grow-lv { position: absolute; right: 12px; top: 10px; padding: 4px 9px; border-radius: 999px; background: var(--sign-yellow); color: var(--ink); font: 400 16px/1 var(--f-sign); }
.grow-lv:empty { display: none; }
.art-grow.ready .lvbar i { transition: width .6s var(--ease-out); animation: none; }

/* 4장: 고르면 바로 개업 */
.art-ask { height: auto; min-height: 150px; padding: 14px; }
.ask-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ask-chips .chip { background: #fff; color: var(--ink); border: 2px solid #1A1A1A; font-weight: 800; }
