/* 홈페이지 r16 — 한 화면에 한 이야기.
   칸마다 화면을 꽉 채우고(100% 배율 기준), 스크롤 한 번에 다음 칸으로 넘어가요(scroll-snap).
   색·글꼴·버튼은 903 그대로 두고 배치만 바꿔요. 휴대폰은 칸마다 핵심만 남겨 짧게 보여요. */
:root{--hh:72px}
@media (max-width:640px){:root{--hh:64px}}

/* ── 한 칸 = 한 화면 ───────────────────────────── */
@media (min-height:540px){
 html{scroll-snap-type:y mandatory;scroll-padding-top:0}
 body.hp main>section{scroll-snap-align:start;scroll-snap-stop:always}
 body.hp .foot{scroll-snap-align:end}
 body.hp main>section{box-sizing:border-box;min-height:100vh;min-height:100svh;display:flex;flex-direction:column;justify-content:center;padding:calc(var(--hh) + clamp(16px,3.2vh,40px)) 0 clamp(18px,3.6vh,44px)}
 body.hp main>section>.wrap{width:min(100% - 48px,var(--wrap))}
}
body.hp .anchor{top:0}

/* ── 첫 화면: 왼쪽 글 · 오른쪽 장면 ───────────────── */
.hero16{position:relative}
.hero16-stage{position:relative;min-width:0}
.hero .stage-bar{flex-direction:column;gap:8px;margin-top:10px}
.hero .beat-live{min-height:2.9em;max-width:34em;font-size:14.5px;line-height:1.45;text-wrap:balance}
.hero .stage-note{margin-top:6px;padding-bottom:0;text-align:center}
@media (min-width:1024px){
 .hero16{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);align-items:center;gap:clamp(24px,3.4vw,56px)}
 .hero .hero-copy{align-items:flex-start;text-align:left}
 .hero h1{font-size:clamp(34px,min(3.5vw,6.6vh),54px)}
 .hero .lead{max-width:30em}
 .hero .cta{justify-content:flex-start}
 .hero .stage{--stage-h:min(600px,calc(100svh - var(--hh) - 200px));--fade:110px;margin-top:0}
 .hero .stage-inner{--sp:.62;--chip-w:min(236px,calc((100% - 414px * var(--sp)) / 2 + 26px));--chip-top:0px;width:100%}
 .hero .chip-in{top:44px;right:auto;left:0}
 .hero .chip-col{top:min(212px,calc(var(--stage-h) - 190px));right:0;left:auto}
 .hero .chip-teacher{display:none}
}
@media (min-width:1024px) and (max-height:760px){
 .hero .stage-inner{--sp:.54}
 .hero .lead{font-size:16.5px}
 .hero .cta{margin-top:24px}
}

/* ── 같은 출석: 누른 사람의 화면 하나만 ───────────── */
body.hp .persp{padding-bottom:clamp(18px,3.6vh,44px)}
.pick button[aria-selected="true"]::after{border-color:var(--blue);box-shadow:inset 0 0 0 4px #fff,inset 0 0 0 9px var(--blue)}
.pick button[aria-selected="true"]{background:#F7FAFE}
.pick button[aria-selected="true"] b{color:var(--blue-d)}
.persp-copy{position:static}
.frags{display:block;min-width:0}
.frag[hidden]{display:none}
.frags .frag{transform:none;animation:hp16-in .45s var(--ease-out)}
.frags .frag :is(.ow,.tw){box-shadow:var(--sh-dev);border-color:transparent}
.frags .frag figcaption{color:var(--blue-d)}
.frag-teacher .tw{max-width:560px}
.frag-parent .pf{max-width:440px}
.frag-parent .pa-item{box-shadow:var(--sh-dev);border-color:transparent}
.frag-parent .pf{zoom:1.25}
@keyframes hp16-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.frags .frag{animation:none}}
@media (min-width:1024px){
 .persp-grid{grid-template-columns:minmax(0,4fr) minmax(0,7fr);align-items:center}
 .frags{display:flex;align-items:center;justify-content:center;min-height:400px}
 .frags .frag{width:100%}
 .frags .frag-teacher,.frags .frag-parent{display:flex;flex-direction:column;align-items:center}
 .frags .frag[hidden]{display:none}
 .frag-teacher .tw{zoom:1.3;width:440px;max-width:none}
 .frag-parent .pf{zoom:1.7}
}

@media (min-width:1024px) and (max-height:760px){.pick{margin-top:24px}.pick button{padding:13px 52px 13px 20px}.persp .sub{margin-top:16px}}

/* ── 명단 이전: 왼쪽 글·순서 · 오른쪽 확인서 ──────── */
@media (min-width:1024px){
 .mig-wrap{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto auto 1fr;align-items:start;column-gap:clamp(32px,6vw,96px)}
 .mig-head{grid-column:1;grid-row:1;text-align:left}
 .mig-head .sub{margin-inline:0}
 .mig .receipt{grid-column:2;grid-row:1/4;align-self:center;margin-top:0}
 .mig .flow{grid-column:1;grid-row:2;grid-template-columns:minmax(0,1fr);gap:18px;width:100%;margin:36px 0 28px}
 .mig .flow li{padding:0 0 0 44px}
 .mig .flow li:not(:last-child)::after{top:32px;right:auto;bottom:-14px;left:13px;width:1px;height:auto}
 .mig-wrap>.btn{grid-column:1;grid-row:3;justify-self:start}
}
@media (min-width:1024px) and (max-height:700px){.mig .receipt{zoom:.76!important}}
@media (min-width:1024px) and (max-height:820px){
 .mig .receipt{zoom:.84}
 .mig .rc-mark{margin:20px auto 12px}
 .mig .flow{margin:24px 0 20px;gap:12px}
}

/* ── 수업 기록: 왼쪽 글 · 오른쪽 폰과 주간지 ──────── */
@media (min-width:1024px){
 .rec-wrap{display:grid;grid-template-columns:minmax(0,3.6fr) minmax(0,8.4fr);align-items:center;gap:clamp(28px,4vw,64px)}
 .rec-copy{text-align:left}
 .rec-copy .sub{margin-inline:0}
 .rec-stage{width:100%;margin-top:0;gap:clamp(18px,2.4vw,32px)}
 .dev-rec-phone{--s:.56}
}
@media (min-width:1024px) and (max-height:820px){
 .dev-rec-phone{--s:.48}
 .rec-stage .frag-inbox{zoom:.92}
}

/* ── 학원 소식: 이미 두 칸, 화면 높이에 맞춰 폰 크기만 ─ */
body.hp .night-note{margin-top:20px}
@media (min-width:1024px) and (max-height:900px){.dev-night-phone{--s:.64}}
@media (min-width:1024px) and (max-height:780px){.dev-night-phone{--s:.56}.ticks{margin-top:24px;gap:10px}}

/* ── 포스터·블로그: 제목 줄 + 카드 둘 + 예시 포스터 ── */
@media (min-width:1024px){
 .posters .posters-head{grid-template-columns:minmax(0,7fr) minmax(0,5fr);align-items:end}
 .posters h2{font-size:clamp(30px,min(3vw,5.4vh),46px)}
 .posters .req15{grid-template-columns:minmax(0,5.2fr) minmax(0,4fr) minmax(0,2.8fr);align-items:stretch;margin-top:clamp(24px,4vh,48px)}
 .posters .req15-card{gap:14px;padding:clamp(20px,2.2vw,30px)}
 .posters .req15-types a{min-height:36px;padding:0 12px;font-size:14px}
 .posters .req15-types{gap:6px}
 .posters .req15+.req15-new{margin-top:16px}
 .posters .req15+.req15-new+.wall{display:none}
 .posters .wall16{display:block}
}
.wall16{display:none;position:relative;margin:0;min-height:300px}
.wall16 img{position:absolute;width:62%;height:auto;border-radius:10px;box-shadow:var(--sh-dev)}
.wall16 img:nth-child(1){top:0;left:0;transform:rotate(-4deg)}
.wall16 img:nth-child(2){top:12%;right:0;transform:rotate(3deg)}
.wall16 figcaption{position:absolute;right:0;bottom:0;color:var(--ink-4);font-size:12.5px}
@media (min-width:1024px) and (max-height:800px){
 .posters .req15-steps{display:none}
 .posters h2{font-size:clamp(28px,3vw,42px)}
}

/* ── 0원: 이미 두 칸 ─────────────────────────────── */
@media (min-width:1024px) and (max-height:760px){.free-list div{padding:14px 0 16px}}

/* ── 자주 묻는 것: 질문 줄 간격을 화면 높이에 맞춰 ─── */
@media (min-width:1024px) and (max-height:860px){.faq-list summary{padding:18px 4px}}

/* ── 상담 신청: 한 화면에 들어가게 칸을 촘촘히 ─────── */
@media (min-width:1024px){
 .contact .apply{padding:clamp(20px,2.4vw,32px)}
 .contact .svc{margin-bottom:16px}
 .contact .fields{gap:12px 14px}
 .contact .fields label{gap:6px}
 .contact .fields input,.contact .fields select{height:46px}
 .contact .fields textarea{min-height:76px}
 .contact .consent{margin-top:14px}
 .contact .apply>.btn{margin-top:14px;height:52px}
 .contact .fields label.full:not(:has(textarea)){grid-column:auto}
 .contact h3{font-size:20px}
 .contact .svc legend{margin-bottom:8px}
 .contact .svc label>span{padding:11px 14px 12px}
}
@media (min-width:1024px) and (max-height:740px){
 .contact .apply>h3{display:none}
 .contact .apply{padding:18px 22px}
 .contact .fields{gap:8px 12px}
 .contact .fields input,.contact .fields select{height:40px}
 .contact .consent{margin-top:10px}
 .contact .apply>.btn{height:46px;margin-top:10px}
}
@media (min-width:1024px) and (max-height:800px){
 .contact .fields textarea{min-height:48px;height:48px}
 .contact .svc-opts small{display:none}
 .contact .fields input,.contact .fields select{height:42px}
 .contact .consent-more{margin-top:4px}
}

/* ── 태블릿·휴대폰 공통: 칸마다 위아래로, 화면 안에 들어가게 ── */
@media (max-width:1023px){
 .hero .hero-copy{align-items:center;text-align:center}
 .hero .stage{--stage-h:clamp(200px,calc(100svh - var(--hh) - 520px),460px)}
 .persp-grid{grid-template-columns:minmax(0,1fr);gap:20px}
 .mig .receipt{margin-top:20px}
 .rec-stage{margin-top:24px}
}

/* ── 휴대폰·태블릿: 핵심만 ───────────────────────── */
@media (max-width:1023px){
 body.hp h2{font-size:clamp(26px,7.4vw,31px)}
 body.hp .sub{margin-top:12px;font-size:15.5px;line-height:1.6}
 body.hp main>section{justify-content:flex-start}
 /* 첫 화면 */
 .hero .lead{margin-top:14px;font-size:15.5px}
 .hero .lead .ln+.ln{display:none}
 .hero .cta{margin-top:20px}
 .hero .cta .btn{height:50px}
 .hero-note{font-size:13.5px}
 .hero .stage{margin-top:16px}
 .hero .stage-note{display:none}
 /* 같은 출석: 역할 고르기를 가로 세 칸으로 */
 .persp .sub{display:none}
 .pick{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin-top:18px;border-radius:14px}
 .pick button{padding:12px 6px;border-bottom:0;border-right:1px solid #EDF0F3;text-align:center}
 .pick button:last-child{border-right:0}
 .pick button::after{display:none}
 .pick span{display:none}
 .pick b{font-size:16px}
 .pick button[aria-selected="true"]{background:var(--blue);}
 .pick button[aria-selected="true"] b{color:#fff}
 .frag-parent .pf{zoom:1.05}
 /* 명단 이전 */
 .mig-head .sub{font-size:15px}
 .mig .rc-mark{display:none}
 .mig .rc{padding:18px 20px}
 .mig .rc-title{margin-top:12px;font-size:20px}
 .mig .rc-rows{margin-top:14px}
 .mig .flow,.mig-wrap>.btn{display:none}
 .mig .receipt figcaption{margin-top:8px}
 .mig .rc-sub{display:none}
 .mig .rc-rows>div{padding-top:10px;padding-bottom:10px}
 .mig .rc-total{padding-top:10px}
 .mig .rc-btn{height:48px;margin-top:12px}
 /* 수업 기록: 원장님이 받는 주간지만 */
 .rec-stage .dev-rec-phone{display:none}
 .rec-copy .link{margin-top:14px}
 .rec-reset{margin-top:0}
 /* 학원 소식 */
 .ticks{display:none}
 .night-grid{gap:18px}
 .dev-night-phone{--s:.46}
 .readcard{margin-top:-120px;width:min(100%,300px);padding:14px 16px 8px}
 body.hp .night-note{display:none}
 /* 포스터·블로그 */
 .posters .posters-text{display:none}
 .posters .req15{margin-top:18px;gap:12px}
 .posters .req15-card{gap:12px;padding:18px 18px 16px;border-radius:16px}
 .posters .req15-lead{font-size:14.5px;line-height:1.55}
 .posters .req15-types{flex-wrap:nowrap;overflow-x:auto;margin:0 -18px;padding:0 18px 4px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
 .posters .req15-types::-webkit-scrollbar{display:none}
 .posters .req15-types li{flex:none}
 .posters .req15-types a{min-height:38px;padding:0 13px;font-size:14px;white-space:nowrap}
 .posters .req15-steps,.posters .req15-note,.posters .req15-new,.posters .wall{display:none}
 .posters .req15-act{gap:10px 14px}
 .posters .req15-act .btn{width:auto;height:46px;padding:0 18px;font-size:15.5px}
 .posters .req15-act small{font-size:13px}
 /* 0원 */
 .free-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px;margin-top:8px}
 .free-list div{padding:12px 0 13px}
 .free-list dt{font-size:15.5px}
 .free-list dd{font-size:13px;line-height:1.5}
 .free .link{margin-top:14px}
 .free-foot{font-size:12.5px}
 /* 앱 설치: 두 줄 두 칸 */
 .app15-roles{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .app15-roles a{gap:4px;padding:14px 14px 13px;border-radius:14px}
 .app15-roles strong{font-size:17px}
 .app15-roles small{font-size:13px;line-height:1.45}
 .app15-dev{font-size:12px}
 .app15-go{padding-top:8px;font-size:14px}
 .app15-note{font-size:12.5px}
 /* 자주 묻는 것 */
 .faq-head .sub{display:none}
 .faq-list summary{padding:16px 2px;font-size:16px}
 /* 상담 신청 */
 .contact-copy .sub{display:none}
 .contact .apply{padding:18px 16px;border-radius:20px}
 .contact .fields input,.contact .fields select{height:46px}
 .contact .fields textarea{min-height:64px;height:64px}
 .contact .svc-opts{grid-template-columns:repeat(2,minmax(0,1fr))}
 .contact .svc-opts small{display:none}
 .contact .svc label>span{padding:11px 12px}
 .contact .fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 10px}
 .contact .fields label.full{grid-column:1/-1}
 .contact .consent{margin-top:14px}
 .contact .apply>.btn{margin-top:12px}
 .contact-alt{margin-top:8px}
}
@media (max-width:1023px) and (max-height:780px){
 body.hp main>section{padding-top:calc(var(--hh) + 14px);padding-bottom:14px}
 .frags figcaption,.receipt figcaption,.rec-stage figcaption{display:none}
 .frags .ow-stats{margin-bottom:4px}
 .frag-owner .ow-tr:not(.ow-th){min-height:44px}
 .frags .ow-stats{display:none}
 .mig .rc-app{display:none}
 .mig .rc-title{margin-top:0}
 .rec-copy .sub{display:none}
 .rec-state{display:none}
 .dev-night-phone{--s:.42}
 .night .readcard{display:none}
 .night .sub{font-size:14.5px}
}
@media (max-width:1023px) and (max-height:700px){
 .hero .hero-note{display:none}
 .free-foot{display:none}
 .mig-head .sub{display:none}
 .posters .req15-lead{display:none}
}

/* ── r30: 첫 화면 장면 정리 ─────────────────────────────
   넓은 화면: 카드가 좁아져 글자가 여러 줄로 꺾이고 폰 화면을 가리던 것을 고쳐요.
     카드 두 장을 폰 왼쪽에 세로로 두고(폰 테두리만 살짝 덮음), 카드 너비는 항상 같아요.
   좁은 화면: 장면 높이를 남는 공간에 꼭 맞춰(위아래 빈칸·잘림 없이), 카드는 폰을 기준으로 놓아
     창 너비가 달라져도 가장자리에서 잘리지 않아요.
   선생님 카드는 어느 너비에서도 자리가 모자라 빼요(같은 내용이 아래 '같은 출석, 각자의 화면'에 있어요).
   --sh: 장면의 실제 높이(px). homepage-r16.js가 재서 넣어요. 없으면 예전 계산값(--stage-h)을 써요. */
.hero .chip-teacher{display:none}
.hero .chip :is(.ch-cap,.ch-name small,.ch-foot,.ch-ok span,.ch-top){white-space:nowrap}
.hero .dev-hero-phone{-webkit-mask-image:linear-gradient(#000 calc(var(--sh,var(--stage-h)) - var(--fade)),transparent calc(var(--sh,var(--stage-h)) - 6px));mask-image:linear-gradient(#000 calc(var(--sh,var(--stage-h)) - var(--fade)),transparent calc(var(--sh,var(--stage-h)) - 6px))}
@media (min-width:1024px){
 .hero16{grid-template-columns:minmax(0,1fr) minmax(0,1.06fr)}
 .hero .stage-inner{--sp:.62;--chip-w:236px;--ov:12px;--pw:calc(414px * var(--sp));--x0:calc(50% - (var(--chip-w) + var(--pw) - var(--ov)) / 2);width:100%}
 .hero .dev-hero-phone{left:calc(var(--x0) + var(--chip-w) - var(--ov));transform:none}
 .hero .chip{padding:14px 15px}
 .hero .ch-row{gap:8px;padding:9px 10px}
 .hero .chip-in{top:36px;right:auto;left:var(--x0)}
 .hero .chip-col{top:226px;right:auto;left:var(--x0);width:var(--chip-w)}
}
@media (min-width:1024px) and (max-height:760px){
 .hero .stage-inner{--sp:.54}
 .hero .chip-in{top:10px}
 .hero .chip-col{top:196px}
}
@media (min-width:1024px) and (max-height:660px){
 .hero .ch-cap{display:none}
 .hero .chip-col{top:166px}
}
/* 위아래로 쌓이는 화면: 장면이 남는 높이를 채워요 */
@media (max-width:1023px) and (min-height:540px){
 .hero>.hero16{flex:1 1 auto;display:flex;flex-direction:column;min-height:0}
 .hero .hero16-stage{flex:1 1 auto;display:flex;flex-direction:column;min-height:0}
 .hero .stage{flex:1 1 auto;height:auto;min-height:200px;max-height:520px}
 .hero .stage-inner{position:absolute;top:0;right:0;bottom:0;left:0;height:auto}
}
@media (min-width:760px) and (max-width:1023px){
 .hero .stage-inner{--sp:.64;--chip-w:236px;--ov:12px;--pw:calc(414px * var(--sp))}
 .hero .chip{padding:14px 15px}
 .hero .ch-row{gap:8px;padding:9px 10px}
 .hero .chip-in{top:20px;left:auto;right:calc(50% + var(--pw) / 2 - var(--ov))}
 .hero .chip-col{top:min(84px,calc(var(--sh,400px) - 166px));right:auto;left:calc(50% + var(--pw) / 2 - var(--ov));width:var(--chip-w)}
}
@media (max-width:759px){
 .hero .stage-inner{--sp:.58}
 .hero .chip{padding:10px 12px;border-radius:16px;font-size:13px}
 .hero .chip-in{--chip-w:172px;top:10px;right:auto;left:max(-20px,calc(50% - 183px))}
 .hero .chip-col{--chip-w:min(280px,calc(100% + 24px));top:auto;bottom:10px;right:auto;left:min(calc(100% + 20px - var(--chip-w)),calc(50% - 97px));width:var(--chip-w)}
 .hero .chip-owner{display:block;min-height:0;padding:12px 14px}
 .hero .ch-dots{gap:6px;margin-top:8px}
 .hero .ch-dots i{height:32px;border-radius:8px}
 .hero .ch-cap{display:none}
 .hero .ch-ok{margin-top:8px;font-size:14px}
 .hero .ch-row{margin-top:8px;padding:8px 10px}
 .hero .ch-foot{margin-top:8px}
 /* 장면이 낮으면 카드를 줄여 서로 겹치지 않게(높이는 homepage-r16.js가 알려 줘요) */
 .hero .stage[data-short] .ch-foot{display:none}
 .hero .stage[data-tiny] .chip-in{display:none}
}
