/* 사용법 탭 — 앱 온보딩 모양(태그 알약·굵은 제목) + 웹용 모션 */
.g-hero { text-align: center; padding: 34px 0 10px; }
.g-logo { width: 96px; height: 96px; grid-template-rows: 1fr 1fr; margin: 0 auto 14px; border-radius: 22px; background: #fff; box-shadow: 0 10px 28px rgba(27,39,51,.2); display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 7px; animation: pop .6s cubic-bezier(.2,1.4,.4,1) both; }
.g-logo i { font-style: normal; font-weight: 800; font-size: 28px; line-height: 1; min-height: 0; overflow: hidden; display: grid; place-items: center; border-radius: 9px; background: var(--mint); }
.g-logo i.y { background: #D98000; color: #fff; animation: wiggle 2.6s ease-in-out 1s infinite; }
.g-slogan { color: var(--brand-text); font-weight: 800; font-size: 16px; margin: 0 0 18px; animation: rise .6s .15s ease-out both; }
.g-hero h1 { font-size: clamp(28px, 7.6vw, 38px); line-height: 1.3; letter-spacing: -0.6px; font-weight: 800; margin: 0 0 12px; animation: rise .6s .25s ease-out both; }
.g-hero h1 em { font-style: normal; color: var(--brand-text); background: linear-gradient(transparent 62%, var(--brand-tint) 62%); }
.g-lead { color: #5B6470; font-size: 15px; line-height: 1.6; margin: 0; animation: rise .6s .35s ease-out both; }
.g-lead b { color: var(--ink); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-8deg); } 90% { transform: rotate(8deg); } 95% { transform: rotate(-4deg); } }

.g-steps { list-style: none; padding: 0; margin: 26px 0 22px; display: grid; gap: 14px; }
.g-step { display: grid; gap: 18px; padding: 24px 20px; border-radius: 24px; background: #fff; border: 1px solid var(--card-line); box-shadow: 0 2px 12px rgba(27,39,51,.04); overflow: hidden; }
@media (min-width: 640px) { .g-step { grid-template-columns: 1fr 1fr; align-items: center; } .g-step:nth-child(even) .g-vis { order: -1; } }
.g-tag { display: inline-block; background: var(--brand-tint); color: var(--primary-dark); font-weight: 800; font-size: 12.5px; padding: 4px 10px; border-radius: 20px; }
.g-copy h2 { font-size: 24px; font-weight: 800; line-height: 1.3; letter-spacing: -0.6px; margin: 10px 0 10px; }
.g-copy p { color: #5B6470; font-size: 15px; line-height: 1.5; margin: 0 0 6px; text-wrap: pretty; }
.g-copy p b { color: var(--ink); }
.g-vis { min-height: 200px; display: grid; place-items: center; }
.g-disc { margin-top: 16px; }

/* 장면이 화면에 들어오면 .play — 반복 애니메이션 */
.g-step:not(.play) .g-vis * { animation-play-state: paused !important; }

/* 1) 사람 — 하·엄을 차례로 눌러 각자 생년월일·표시가 바뀜 (6초 반복) */
.v-people { width: 100%; max-width: 300px; padding: 18px; }
.vp-row { display: flex; gap: 10px; margin-bottom: 14px; }
.vp-av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; padding: 2.5px; border: 2.5px solid transparent; }
.vp-av b { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 16px; }
.vp-av.a1 b { background: #FFE9B8; color: #8A4B00; }
.vp-av.a2 b { background: #DDF4EF; color: #0F6E62; }
.vp-av.a3 b { background: #FFE0E6; color: #A8324F; }
.vp-av.add { border: 1.5px solid var(--line); color: var(--sub); }
.vp-av.a1, .vp-av.a3 { animation: pick 6s infinite; }
.vp-av.a3 { animation-delay: 3s; }
@keyframes pick { 0%, 47% { border-color: var(--primary-dark); transform: scale(1); } 4% { transform: scale(.9); } 50%, 100% { border-color: transparent; } }
.vp-stack { position: relative; height: 96px; }
.vp-ph { position: absolute; inset: 0; opacity: 0; animation: phase 6s infinite; }
.vp-ph.p2 { animation-delay: 3s; }
@keyframes phase { 0% { opacity: 0; transform: translateY(6px); } 6%, 45% { opacity: 1; transform: none; } 50%, 100% { opacity: 0; } }
.vp-ymd { display: flex; gap: 6px; margin-bottom: 12px; }
.vp-sel { border: 1px solid var(--line); border-radius: 10px; height: 38px; padding: 0 12px; line-height: 36px; font-weight: 700; font-size: 14px; }
.vp-sel:first-child { min-width: 86px; }
.vp-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.vt { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 10px; }
.vt .ms { font-size: 16px; }
.vt.t1 { background: var(--primary-soft); color: var(--primary-dark); }
.vt.t2 { background: #FFE0E6; color: #A8324F; }
.vt.t3 { background: #FDECEC; color: #C62828; }

/* 2) 이름으로 찾아 식약처 등록 약 고르기 */
.v-find { position: relative; width: 100%; max-width: 320px; padding: 14px; font-size: 12.5px; }
.vs-box { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 10px; border: 1.5px solid var(--primary-dark); border-radius: 10px; background: #fff; font-weight: 700; }
.vs-box .ms { color: var(--sub); font-size: 19px; }
.vs-typed { display: inline-block; overflow: hidden; white-space: nowrap; width: 0; animation: vtype 7s steps(4) infinite; }
.vs-caret { width: 2px; height: 16px; background: var(--primary-dark); animation: blink .8s step-end infinite; }
@keyframes vtype { 0% { width: 0; } 18%, 92% { width: 4.2em; } 100% { width: 0; } }
@keyframes blink { 50% { opacity: 0; } }
.vs-h { margin: 10px 0 6px; font-size: 11.5px; font-weight: 800; color: var(--sub); opacity: 0; animation: vsr 7s infinite; animation-delay: .1s; }
.vs-r { display: flex; align-items: center; gap: 6px; margin: 0 0 5px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-weight: 700; white-space: nowrap; opacity: 0; animation: vsr 7s infinite both; }
.vs-r > span:not(.ms) { display: flex; flex-direction: column; line-height: 1.25; }
.vs-r small { font-size: 10.5px; color: var(--sub); font-weight: 600; }
.vs-r .ms { font-size: 18px; color: var(--primary-dark); }
.vs-r .vs-ok { margin-left: auto; color: #12A37A; opacity: 0; animation: vsok 7s infinite; }
.vs-r.r2 { animation: vsr 7s infinite both, vspick 7s infinite; }
.vs-done { display: flex; align-items: center; gap: 4px; margin: 8px 0 0; font-weight: 800; color: #12805C; opacity: 0; animation: vsok 7s infinite; }
.vs-done .ms { font-size: 18px; color: #12A37A; }
@keyframes vsr { 0%, 22% { opacity: 0; transform: translateY(6px); } 27%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes vspick { 0%, 50% { border-color: var(--line); background: #fff; } 53% { transform: scale(.96); } 56%, 92% { border-color: var(--primary-dark); background: var(--primary-soft); transform: none; } 100% { background: #fff; } }
@keyframes vsok { 0%, 56% { opacity: 0; } 60%, 92% { opacity: 1; } 100% { opacity: 0; } }
.vs-h { animation-name: vsr; }

/* 3) 안전 점검 */
.v-check { width: 100%; max-width: 320px; padding: 16px; }
.vc-h { color: var(--sub); font-weight: 700; font-size: 13px; margin: 0 0 6px; }
.vc-st { display: flex; align-items: center; gap: 6px; font-size: 18px; font-weight: 800; color: #12805C; margin: 0 0 12px; }
.vc-st .ms { color: #12A37A; font-size: 26px; animation: beat 4.8s infinite; }
@keyframes beat { 0%, 60%, 100% { transform: scale(1); } 66% { transform: scale(1.25); } 72% { transform: scale(1); } }
.vc-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 6px; }
.vc-tiles.sm { grid-template-columns: repeat(2, 1fr); margin: 0; }
.vc-tile { position: relative; background: #F3F6F5; border-radius: 14px; padding: 9px 10px; min-height: 70px; animation: tile 4.8s infinite both; }
.vc-tile small { display: block; color: var(--sub); font-size: 11px; font-weight: 600; line-height: 1.25; }
.vc-tile b { position: absolute; left: 10px; bottom: 8px; font-size: 15px; font-weight: 800; }
.vc-tile b.na { color: #9AA3AD; font-size: 12px; }
.vc-tile .ms { position: absolute; right: 8px; bottom: 8px; color: #12A37A; font-size: 18px; }
.vc-tile .ms.na { color: #B8C0C8; }
.vc-tile.d2 { background: #F5F6F8; }
.vc-tile.d1 { animation-delay: .3s; } .vc-tile.d2 { animation-delay: .55s; } .vc-tile.d3 { animation-delay: .8s; } .vc-tile.d4 { animation-delay: 1.05s; } .vc-tile.d5 { animation-delay: 1.3s; }
@keyframes tile { 0% { opacity: 0; transform: scale(.85); } 8%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* 4) 지도 */
.v-map { position: relative; width: 100%; max-width: 320px; aspect-ratio: 4 / 3; overflow: hidden; padding: 0; border-radius: 24px; }
.vm-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.vm-ring { position: absolute; left: 50%; top: 52%; width: 70px; height: 70px; margin: -35px 0 0 -35px; border-radius: 50%; background: rgba(247,165,0,.1); border: 2px solid rgba(217,131,0,.66); animation: ring 6s ease-in-out infinite; }
@keyframes ring { 0%, 18% { transform: scale(1); } 40%, 85% { transform: scale(3.6); } 100% { transform: scale(1); } }
.vm-me { position: absolute; left: 50%; top: 52%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: #2F5FBF; border: 3px solid #fff; box-shadow: 0 0 0 13px rgba(47,95,191,.2); }
.vm-pin { position: absolute; width: 28px; height: 28px; margin: -34px 0 0 -14px; border-radius: 50%; background: var(--open); border: 2.5px solid #fff; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.25); animation: drop 6s infinite both; }
.vm-pin::after { content: ''; position: absolute; bottom: -7px; left: 50%; margin-left: -5px; border: 5px solid transparent; border-top-color: inherit; border-top: 6px solid var(--open); }
.vm-pin .ms { color: #fff; font-size: 15px; }
.vm-pin.g { background: var(--gray-pin); } .vm-pin.g::after { border-top-color: var(--gray-pin); }
.vm-pin.p1 { left: 40%; top: 44%; animation-delay: .2s; }
.vm-pin.p2 { left: 62%; top: 40%; animation-delay: .4s; }
.vm-pin.p3 { left: 57%; top: 70%; animation-delay: .6s; }
.vm-pin.p4 { left: 22%; top: 30%; animation-name: dropfar; animation-delay: 0s; }
.vm-pin.p5 { left: 84%; top: 80%; animation-name: dropfar; animation-delay: 0s; }
@keyframes drop { 0% { transform: translateY(-30px); opacity: 0; } 6%, 92% { transform: none; opacity: 1; } 100% { opacity: 0; } }
@keyframes dropfar { 0%, 38% { transform: translateY(-30px); opacity: 0; } 46%, 92% { transform: none; opacity: 1; } 100% { opacity: 0; } }
.vm-chip { position: absolute; left: 10px; top: 10px; background: #fff; border-radius: 12px; padding: 5px 10px; font-size: 12.5px; font-weight: 800; color: var(--accent); display: flex; align-items: center; gap: 4px; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.vm-chip .ms { font-size: 16px; }
.vm-km::after { content: '반경 2km'; animation: km 6s steps(1) infinite; }
@keyframes km { 0%, 30% { content: '반경 2km'; } 30.01%, 92% { content: '반경 20km'; } }
.vm-legend { position: absolute; right: 10px; bottom: 10px; background: #fff; border-radius: 10px; padding: 4px 9px; font-size: 11.5px; font-weight: 700; display: flex; align-items: center; gap: 5px; }
.vm-legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--open); }

/* 5) 안심 */
.v-safe { position: relative; width: 150px; height: 150px; border-radius: 50%; background: var(--brand-tint); display: grid; place-items: center; }
.v-safe > .ms { font-size: 72px; color: var(--primary-dark); }
.vs-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--brand); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { from { transform: scale(1); opacity: .7; } to { transform: scale(1.35); opacity: 0; } }
.vs-lock { position: absolute; right: 22px; bottom: 26px; width: 40px; height: 40px; border-radius: 50%; background: #fff; color: #12A37A; font-size: 24px !important; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.12); animation: beat 2.4s infinite; }

@media (prefers-reduced-motion: reduce) { .g-vis *, .g-hero * { animation: none !important; } }

/* 4) 가족과 공유 — 링크가 건너가고, 엄마가 아침에 누르면 아빠 폰에도, 아빠가 저녁에 누르면 엄마 폰에도 (8초 반복) */
.v-share { position: relative; width: 100%; max-width: 320px; height: 230px; display: flex; justify-content: space-between; align-items: center; }
.vsh-phone { position: relative; width: 46%; border: 2px solid #E5E7EB; border-radius: 22px; padding: 10px 8px 12px; background: #fff; box-shadow: 0 6px 18px rgba(27,39,51,.08); }
.vsh-who { display: flex; align-items: center; gap: 2px; margin: 0 0 6px; font-size: 12px; font-weight: 800; color: var(--accent); }
.vsh-who .ms { font-size: 15px; }
.vsh-card { border: 1px solid var(--card-line); border-radius: 12px; padding: 8px; }
.vsh-card > b { font-size: 12.5px; font-weight: 800; }
.vsh-st { display: inline-flex; align-items: center; gap: 1px; margin-left: 4px; font-size: 9.5px; font-weight: 800; color: var(--primary-dark); background: var(--primary-soft); border-radius: 6px; padding: 1px 4px; vertical-align: 1px; }
.vsh-st .ms { font-size: 11px; }
.vsh-slot { position: relative; height: 26px; margin-top: 5px; border: 1px solid var(--line); border-radius: 8px; display: flex; align-items: center; padding: 0 6px; font-size: 10.5px; overflow: hidden; }
.vsh-slot i { font-style: normal; font-weight: 800; width: 26px; flex: none; }
.vsh-slot .off, .vsh-slot .on { position: absolute; left: 34px; right: 4px; display: flex; align-items: center; gap: 2px; white-space: nowrap; }
.vsh-slot .off { color: var(--sub); }
.vsh-slot .on { color: #1E7B3A; font-weight: 800; opacity: 0; }
.vsh-slot .ms { font-size: 13px; }
/* 엄마 폰: 아침은 23%에 엄마가 눌러 켜지고, 저녁은 63%에 아빠 기록이 들어온다 */
.mom .s1 { animation: slotbg 8s infinite; --at: 23%; }
.mom .s1 .on { animation: on1 8s infinite; } .mom .s1 .off { animation: off1 8s infinite; }
.dad .s1 { animation: slotbg2 8s infinite; }
.dad .s1 .on { animation: on2 8s infinite; } .dad .s1 .off { animation: off2 8s infinite; }
.dad .s2 { animation: slotbg3 8s infinite; }
.dad .s2 .on { animation: on3 8s infinite; } .dad .s2 .off { animation: off3 8s infinite; }
.mom .s2 { animation: slotbg4 8s infinite; }
.mom .s2 .on { animation: on4 8s infinite; } .mom .s2 .off { animation: off4 8s infinite; }
@keyframes on1 { 0%, 23% { opacity: 0; } 25%, 94% { opacity: 1; } 100% { opacity: 0; } }
@keyframes off1 { 0%, 23% { opacity: 1; } 25%, 94% { opacity: 0; } 100% { opacity: 1; } }
@keyframes slotbg { 0%, 23% { background: #fff; border-color: var(--line); } 25%, 94% { background: #E6F4EA; border-color: #BFE3C9; } 100% { background: #fff; } }
@keyframes on2 { 0%, 36% { opacity: 0; } 38%, 94% { opacity: 1; } 100% { opacity: 0; } }
@keyframes off2 { 0%, 36% { opacity: 1; } 38%, 94% { opacity: 0; } 100% { opacity: 1; } }
@keyframes slotbg2 { 0%, 36% { background: #fff; border-color: var(--line); } 38% { background: #C8EBD3; } 40%, 94% { background: #E6F4EA; border-color: #BFE3C9; } 100% { background: #fff; } }
@keyframes on3 { 0%, 58% { opacity: 0; } 60%, 94% { opacity: 1; } 100% { opacity: 0; } }
@keyframes off3 { 0%, 58% { opacity: 1; } 60%, 94% { opacity: 0; } 100% { opacity: 1; } }
@keyframes slotbg3 { 0%, 58% { background: #fff; border-color: var(--line); } 60%, 94% { background: #E6F4EA; border-color: #BFE3C9; } 100% { background: #fff; } }
@keyframes on4 { 0%, 71% { opacity: 0; } 73%, 94% { opacity: 1; } 100% { opacity: 0; } }
@keyframes off4 { 0%, 71% { opacity: 1; } 73%, 94% { opacity: 0; } 100% { opacity: 1; } }
@keyframes slotbg4 { 0%, 71% { background: #fff; border-color: var(--line); } 73% { background: #C8EBD3; } 75%, 94% { background: #E6F4EA; border-color: #BFE3C9; } 100% { background: #fff; } }
/* 누르는 손가락 표시 */
.vsh-tap { position: absolute; width: 22px; height: 22px; border-radius: 50%; background: rgba(247,165,0,.45); opacity: 0; pointer-events: none; }
.vsh-tap.t1 { left: 58%; top: 86px; animation: tap1 8s infinite; }
.vsh-tap.t2 { left: 58%; top: 117px; animation: tap2 8s infinite; }
@keyframes tap1 { 0%, 18% { opacity: 0; transform: scale(.4); } 21% { opacity: 1; transform: scale(1); } 26%, 100% { opacity: 0; transform: scale(1.6); } }
@keyframes tap2 { 0%, 53% { opacity: 0; transform: scale(.4); } 56% { opacity: 1; transform: scale(1); } 61%, 100% { opacity: 0; transform: scale(1.6); } }
/* 링크가 엄마 폰에서 아빠 폰으로 */
.vsh-link { position: absolute; left: 30%; top: 4px; display: inline-flex; align-items: center; gap: 3px; background: #FEE500; color: #191F28; font-size: 10.5px; font-weight: 800; padding: 4px 8px; border-radius: 12px; box-shadow: 0 2px 6px rgba(0,0,0,.15); animation: linkfly 8s infinite; }
.vsh-link .ms { font-size: 13px; }
@keyframes linkfly { 0% { transform: translateX(-60px); opacity: 0; } 4% { opacity: 1; } 14% { transform: translateX(60px); opacity: 1; } 18%, 100% { transform: translateX(60px); opacity: 0; } }

/* 한 장면씩 위아래로 넘기기 (화면 높이 한 장 = 장면 하나) */
html.snap { scroll-snap-type: y mandatory; scroll-padding-top: var(--navh); }
html.snap .g-hero, html.snap .g-step, html.snap .g-end { scroll-snap-align: start; scroll-snap-stop: always; }
html.snap .g-hero { min-height: calc(100svh - var(--navh)); display: flex; flex-direction: column; justify-content: center; padding: 20px 0; position: relative; }
html.snap .g-steps { margin: 0; gap: 0; }
html.snap .g-step { min-height: calc(100svh - var(--navh) - 24px); margin: 12px 0; align-content: center; scroll-margin-top: 12px; }
html.snap .g-end { min-height: calc(100svh - var(--navh)); display: flex; flex-direction: column; justify-content: center; padding: 20px 0 40px; }
html.snap main { padding-bottom: 0; }
.g-next { display: inline-flex; flex-direction: column; align-items: center; gap: 0; margin: 28px auto 0; font-size: 12px; color: var(--sub); animation: nudge 1.8s ease-in-out infinite; }
.g-next .ms { font-size: 26px; color: var(--brand); }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@media (min-width: 640px) { html.snap .g-step { align-items: center; } }
.g-next { appearance: none; border: 0; background: none; cursor: pointer; font: inherit; font-size: 12px; padding: 6px 12px; }
