/* 모바일 최적화: 터치 영역, 안전 영역(노치·홈 바), 작은 화면 글자 크기, 눌림 반응 */
:root{--pad:clamp(14px,4.6vw,20px);--safe-b:env(safe-area-inset-bottom,0px);--safe-t:env(safe-area-inset-top,0px)}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{overscroll-behavior-y:none;-webkit-font-smoothing:antialiased}
a,button,.chk,.opt,.tab,.offer,.card,.hero-card{touch-action:manipulation}
img{-webkit-user-drag:none;user-select:none}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.hero,.row,.tabs{overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}

/* 화면 전환 */
#app>*{animation:ss-in .18s ease-out}
@keyframes ss-in{from{opacity:.35}to{opacity:1}}
#app>.tabbar,#app>.topbar{animation:none}

/* 눌림 반응 */
.card,.hero-card,.opt,.btn,.cta,.buybar button,.offer,.free a,.tab,.seg button,.rd-nav button,.olist a{transition:transform .12s ease,opacity .12s ease}
.card:active,.hero-card:active,.opt:active,.btn:active,.cta:not([disabled]):active,.buybar button:active,.offer:active,.free a:active,.seg button:active,.rd-nav button:active,.olist a:active{transform:scale(.975);opacity:.88}

/* 안전 영역 */
.topbar{height:calc(var(--topbar) + var(--safe-t));padding-top:var(--safe-t)}
.tabs{top:calc(var(--topbar) + var(--safe-t))}
.back{top:calc(8px + var(--safe-t));left:8px;width:44px;height:44px}
.page-head{height:calc(var(--topbar) + var(--safe-t));padding-top:var(--safe-t)}
.tabbar{height:calc(var(--tabbar) + var(--safe-b))}
.footer{padding-bottom:calc(var(--tabbar) + var(--safe-b) + 30px)}
.cta{bottom:calc(20px + var(--safe-b))}
.intro-text{bottom:calc(100px + var(--safe-b))}
.talk{bottom:calc(20px + var(--safe-b))}
.toast{bottom:calc(96px + var(--safe-b))}
.rd-sheet-in{padding-bottom:calc(22px + var(--safe-b))}
.result{padding-bottom:calc(110px + var(--safe-b))}
.page{padding-bottom:calc(110px + var(--safe-b))}

/* 터치 영역: 44px 기준 */
.icon-btn{width:44px;height:44px;margin-left:-10px}
.tab{position:relative;height:40px;padding:0 15px}
.tab::after{content:"";position:absolute;inset:-4px 0}
.tabbar a{font-size:12px;gap:5px}.tabbar svg{width:24px;height:24px}
.footer a{display:inline-block;padding:10px 0;margin-right:16px;font-size:13px}
.footer>div{margin:-10px 0 4px}
.rd-toc{height:40px;padding:0 14px}
.seg button{height:50px;font-size:16px}
.opt{min-height:52px;height:auto;padding:12px 14px;line-height:1.35}
.buybar .p{white-space:nowrap}
.buybar button{height:52px}

/* 입력 폼: 양력·음력·시간 모름을 눌러 고르는 알약 버튼으로 */
.field>label{flex-wrap:wrap;gap:8px;font-size:14px}
.field [data-cal]{display:inline-flex;gap:6px}
.field .chk{position:relative;min-height:36px;padding:0 12px 0 9px;border-radius:18px;border:1px solid rgba(255,255,255,.24);font-size:14px;cursor:pointer}
.field .chk::after{content:"";position:absolute;inset:-4px -2px}
.field .chk.on{border-color:var(--accent);background:rgba(233,196,106,.14);color:var(--ink)}
.plain .field .chk{border-color:var(--line)}
.input{height:52px;font-size:17px;border-radius:13px}
.input::placeholder{color:rgba(255,255,255,.38)}
.form{padding-top:calc(72px + var(--safe-t));padding-bottom:calc(28px + var(--safe-b))}
.form .cta.static{position:sticky;bottom:calc(14px + var(--safe-b));margin-top:6px;box-shadow:0 8px 24px rgba(0,0,0,.45)}
.form .cta.static[disabled]{background:rgba(60,58,70,.92);box-shadow:none}

/* 결제 화면 동의: 한 줄 전체를 누를 수 있게 */
.agree{gap:8px}
.agree .chk{align-items:flex-start;gap:10px;min-height:48px;padding:12px;border:1px solid var(--line);border-radius:13px;background:var(--bg2);font-size:14px;line-height:1.5;cursor:pointer}
.agree .chk i{flex:0 0 22px;width:22px;height:22px;margin-top:-1px;font-size:13px}
.agree .chk.on{border-color:rgba(233,196,106,.6)}
.agree .chk a{display:inline-block;padding:2px 0}

/* 작은 화면 글자·그림 크기 */
.hero-card{flex-basis:82%}
.hero-text h2{font-size:clamp(23px,7.2vw,28px)}
.intro-text h1{font-size:clamp(30px,9.6vw,38px)}
.bubble{font-size:clamp(15px,4.4vw,17px);padding:14px 16px}
.price s{font-size:max(12px,.82em)}
.card{flex-basis:clamp(150px,44%,190px)}
.result-hero{height:min(340px,46dvh)}
.pillar .h{font-size:clamp(24px,7.6vw,30px)}
.pricebox .won{font-size:clamp(24px,7.4vw,30px)}
.block{padding:18px 16px}
.legal table{display:block;overflow-x:auto}
.center{min-height:calc(100dvh - var(--topbar) - var(--tabbar) - 40px)}

@media (max-width:359px){
  .tab{padding:0 12px;font-size:14px}
  .hero-text{left:14px;right:14px;bottom:14px}
  .offer{padding:12px 10px;gap:9px}.offer .o-r b{font-size:16px}
  .buybar{gap:10px}.buybar .p b{font-size:16px}
  .seg button,.opt{font-size:15px}
}
@media (max-height:640px){
  .intro-text{bottom:calc(88px + var(--safe-b))}
  .result-hero{height:240px}
}
@media (prefers-reduced-motion:reduce){
  .full .bg{animation:none}#app>*{animation:none}*{transition:none!important}
}
