/* 배웅하는 날 (시안) · 차분하고 따뜻하게: 종이색·연필 선·옅은 수채. 검정·촛불·국화 없음 */
.bye{--bye-paper:#FBF7F0;--bye-ink:#4A3E39;--bye-sub:#85766F;--bye-line:#E8DCD0}
.bye-note{margin:0;padding:10px 12px;border-radius:12px;background:#FFF8EC;border:1px dashed #EBD7B8;color:var(--bye-sub);font-size:13.5px}
.bye-switch{display:flex;gap:6px}
.bye-switch{justify-content:center}
.bye-switch{flex-wrap:wrap}
.bye-switch button{flex:0 1 auto;padding:0 13px;font-size:14px;white-space:nowrap;min-height:44px;border-radius:999px;border:1px solid var(--bye-line);background:#fff;color:var(--bye-sub);font-weight:600;cursor:pointer}
.bye-switch button.on{background:#F3EBE2;color:var(--bye-ink);border-color:#D9C8B8}

.bye-phone{max-width:min(100%,540px);width:100%;margin:0 auto;border-radius:26px;background:var(--bye-paper);border:1px solid var(--bye-line);box-shadow:0 2px 4px rgba(42,33,30,.04),0 18px 44px rgba(42,33,30,.10);overflow:hidden;display:flex;flex-direction:column}

.bye-stage{position:relative;background:var(--bye-paper)}
.bye-band{padding:10px 14px 4px;text-align:center;min-height:70px}
.bye-cap{margin:0;font-family:var(--font-cap);font-size:25px;color:var(--bye-ink);opacity:0}
.bye-cap2{margin:2px 0 0;font-size:12.5px;color:var(--bye-sub);opacity:0}
.bye-tag{position:absolute;right:10px;top:10px;padding:3px 8px;border-radius:999px;background:rgba(255,255,255,.85);color:var(--bye-sub);font-size:11px}

.bye-door,.bye-form,.bye-after,.bye-talk{padding:18px 18px 20px;display:flex;flex-direction:column;gap:12px;color:var(--bye-ink)}
.bye-door{text-align:center}
.bye-door h3{margin:0;font-family:var(--font-title);font-weight:400;font-size:21px;letter-spacing:-.02em}
.bye-door p{margin:0;color:var(--bye-sub)}
.bye-after{align-items:center;min-height:86px;justify-content:center}
.bye-after .fine{margin:0;color:var(--bye-sub);font-size:13px}

.bye-lab{display:flex;flex-direction:column;gap:6px;margin:0;font-weight:700;font-size:15px}
.bye-lab small{font-weight:400;color:var(--bye-sub);font-size:12.5px}
.bye-lab input,.bye-lab textarea{min-height:46px;padding:10px 12px;border-radius:12px;border:1px solid var(--bye-line);background:#fff;font-weight:400;resize:vertical}
.bye-row{display:flex;gap:6px;flex-wrap:wrap}
.bye-chip{flex:1 1 0;min-width:70px;min-height:46px;border-radius:12px;border:1px solid var(--bye-line);background:#fff;color:var(--bye-ink);cursor:pointer}
.bye-chip.on{background:#F3EBE2;border-color:#BFA996;font-weight:700}
.bye-skip{align-self:flex-start;min-height:40px;padding:0 4px;border:0;background:none;color:var(--bye-sub);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.bye-skip.on{color:var(--bye-ink);font-weight:700}
.bye .btn[disabled]{opacity:.45;cursor:default}
.bye .fine{margin:0;font-size:12.5px;color:var(--bye-sub)}

/* 대화처럼 보이기 */
.bt-row{display:flex}
.bt-row.me{justify-content:flex-end}
.bt-b{max-width:84%;padding:10px 13px;border-radius:16px;background:#fff;border:1px solid var(--bye-line);display:flex;flex-direction:column;gap:2px}
.bt-row.me .bt-b{background:#FFF1F3;border-color:#F6D5DC;border-bottom-right-radius:6px}
.bt-row.own .bt-b{border-bottom-left-radius:6px}
.bt-b b{font-size:12.5px;color:var(--bye-sub)}
.bt-b p{margin:0;font-family:var(--font-letter);font-size:17px;line-height:1.5}
.bt-tag{align-self:flex-start;margin-top:4px;padding:1px 7px;border-radius:999px;background:#F3EBE2;color:var(--bye-sub);font-size:11px}
.bt-row.later .bt-b{background:transparent;border-style:dashed}
.bt-row.later .bt-b p{font-family:inherit;font-size:13px;color:var(--bye-sub)}
.bye-end{margin-top:6px;padding:14px;border-radius:14px;background:linear-gradient(180deg,#EAF2FC,#FFF3E6);text-align:center}
.bye-end p{margin:0;font-family:var(--font-letter);font-size:18px}

/* 초대장 */
.bye-invite{max-width:340px;margin:0 auto;display:flex;gap:12px;align-items:center;padding:14px;border-radius:16px;background:#FEE500;box-shadow:0 8px 22px rgba(42,33,30,.10)}
.bye-invite img{width:72px;height:72px;border-radius:12px;object-fit:cover;flex:none}
.bye-invite b{display:block;font-size:15.5px}
.bye-invite p{margin:2px 0 4px;font-size:13.5px}
.bye-invite span{font-size:11.5px;opacity:.7}

/* 그림·영상 한 칸 + 진짜 아이 사진 (창가 가운데 빈자리에 세움) */
.bye-frame{position:relative;aspect-ratio:1/1;overflow:hidden;background:var(--bye-paper)}
.bye-frame img,.bye-frame video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.bye-stage.still .bye-frame{aspect-ratio:1/1}
.bye-stage.still .bye-frame>img{object-position:50% 70%}
.bye-snap{position:absolute;bottom:35.6%;padding:3px 3px 10px;background:#fff;box-shadow:0 2px 6px rgba(80,60,50,.18);transform-origin:50% 100%;pointer-events:none}
.bye-snap img{position:static!important;width:100%;height:auto!important;aspect-ratio:1/1;object-fit:cover}
.bye-snap.s1{left:50%;width:15%;transform:rotate(-5deg)}
.bye-snap.s2{left:66%;width:12.5%;transform:rotate(4deg)}
.bye-stage.still .bye-snap{bottom:35.6%}


/* 10초 장면: 자막은 고개 숙이는 때 (4.5초쯤) 나타남 */
.bye-stage.play .bye-cap{animation:byeFade 10s ease both}
.bye-stage.play .bye-cap2{animation:byeFade2 10s ease both}
@keyframes byeFade{0%,42%{opacity:0}54%,100%{opacity:1}}
@keyframes byeFade2{0%,56%{opacity:0}66%,100%{opacity:1}}
.bye-stage.calm .bye-cap,.bye-stage.calm .bye-cap2{animation:none;opacity:1}
@media (prefers-reduced-motion:reduce){.bye-stage.play .bye-cap,.bye-stage.play .bye-cap2{animation:none;opacity:1}}

/* 시험 영상 비교 */
.bye-tests h3{margin:0 0 10px;font-size:17px}.bye-tests h3 small{font-weight:400;color:var(--bye-sub);font-size:12.5px;margin-left:6px}
.bye-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.bye-grid figure{margin:0;display:flex;flex-direction:column;gap:6px;padding:8px;border-radius:16px;background:#fff;border:1px solid var(--bye-line)}
.bye-grid .bye-frame{border-radius:10px}
.bye-grid figcaption{font-size:14px;color:var(--bye-ink)}.bye-grid figcaption b{display:inline-grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#F3EBE2;font-size:12px;margin-right:4px}
.bye-use{min-height:38px;border-radius:10px;border:1px solid var(--bye-line);background:#FBF7F0;color:var(--bye-sub);font-size:13px;cursor:pointer}
.bye-use.on{background:#F3EBE2;color:var(--bye-ink);font-weight:700}
@media (max-width:520px){.bye-grid{grid-template-columns:1fr}}

/* 선물 꼬리표: 크라프트 종이 + 손글씨 + 노끈 (그림 결에 맞춤). 글은 화면 글자라 또렷함 */
.gtw{position:absolute;transform:translate(-50%,0) rotate(var(--r,-4deg));transform-origin:12% 0;pointer-events:none;font-size:clamp(14px,1.75vw,22px)}
.gtw::before{content:"";position:absolute;left:.6em;bottom:62%;width:1.2px;height:1.3em;background:#A9875F;transform:rotate(14deg);transform-origin:50% 100%}
.gtag{position:relative;display:block;padding:.28em .8em .32em 1.25em;
  background:radial-gradient(120% 90% at 30% 20%,#F6EAD6 0%,#EFDDC1 70%,#E8D2B2 100%);
  clip-path:polygon(.7em 0,100% 0,100% 100%,.7em 100%,0 72%,0 28%);
  filter:drop-shadow(0 1.5px 1.5px rgba(110,80,50,.22));
  font-family:var(--font-cap);font-weight:700;font-size:1em;line-height:1.15;color:#6A4A35;letter-spacing:.01em;white-space:nowrap;pointer-events:none}
.gtag::before{content:"";position:absolute;left:.42em;top:50%;width:.34em;height:.34em;margin-top:-.17em;border-radius:50%;background:#FBF4E8;box-shadow:inset 0 0 0 1.5px #C9AE8C}

/* 아이 사진 놓는 법 B: 그림 톤에 맞추고 종이테이프로 붙임 */
.snapB .bye-snap{filter:sepia(.16) saturate(.86) brightness(1.04) contrast(.96);background:#FFFDF8;box-shadow:1px 2px 0 rgba(120,90,60,.10),3px 7px 14px rgba(120,90,60,.16)}
.snapB .bye-snap.s1{width:13%}.snapB .bye-snap.s2{width:11%}
.snapB .bye-snap::before{content:"";position:absolute;left:50%;top:-7%;width:52%;height:14%;transform:translateX(-50%) rotate(-3deg);background:repeating-linear-gradient(90deg,rgba(240,176,192,.8) 0 7px,rgba(244,190,204,.8) 7px 14px);clip-path:polygon(0 8%,4% 0,8% 10%,12% 0,16% 8%,84% 4%,88% 0,92% 10%,96% 0,100% 8%,100% 92%,96% 100%,92% 90%,88% 100%,84% 94%,16% 96%,12% 100%,8% 90%,4% 100%,0 92%);box-shadow:0 1px 1px rgba(120,60,80,.12)}
/* C: 창에 줄을 걸고 나무 집게로 */
.snapC .bye-snap{bottom:auto;top:31%;filter:sepia(.14) saturate(.88) brightness(1.04);box-shadow:2px 5px 10px rgba(120,90,60,.16);transform-origin:50% 0}
.snapC .bye-snap.s1{left:54%;width:12%;transform:rotate(-4deg)}.snapC .bye-snap.s2{left:69%;width:11%;top:32%;transform:rotate(5deg)}
.snapC .bye-snap::before{content:"";position:absolute;left:50%;top:-9%;width:10%;height:18%;transform:translateX(-50%);background:#C9A27A;border-radius:2px;box-shadow:inset 0 0 0 1px rgba(90,60,30,.25)}
.bye-twine{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}

/* 선물 이름: 그림 위에 상자를 얹지 않는다 */
.gpop{position:absolute;transform:translate(-50%,-100%);padding:.55em .9em;border-radius:14px;background:rgba(255,252,246,.96);box-shadow:0 6px 18px rgba(110,80,50,.18);font-family:var(--font-letter);font-size:clamp(13px,1.5vw,18px);color:#5B4232;white-space:nowrap;pointer-events:none}
.gpop::after{content:"";position:absolute;left:50%;top:100%;margin-left:-7px;border:7px solid transparent;border-top-color:rgba(255,252,246,.96)}
.gring{position:absolute;width:5.5%;aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%;border:2px solid rgba(255,255,255,.95);box-shadow:0 0 0 3px rgba(232,150,170,.35);pointer-events:none}
.gfrom{margin:10px 4px 0;font-family:var(--font-letter);font-size:clamp(16px,1.6vw,20px);color:#6A4A35;line-height:1.6}
.gfrom small{display:block;font-family:var(--font-body,inherit);font-size:13px;color:#85766F}

/* 선물 이름: 처음부터 늘 보임. 말풍선을 작고 옅게 */
.gname{position:absolute;transform:translate(-50%,-100%);padding:.32em .75em .36em;border-radius:999px;background:rgba(255,251,244,.9);box-shadow:0 3px 10px rgba(110,80,50,.14);font-family:var(--font-letter);font-size:clamp(13px,1.45vw,18px);line-height:1.2;color:#5B4232;white-space:nowrap;pointer-events:none}
.gname::after{content:"";position:absolute;left:50%;top:100%;margin-left:-5px;border:5px solid transparent;border-top-color:rgba(255,251,244,.9)}

.gname{transition:opacity .9s ease}
.gname.off{opacity:0}

/* 상주와 인사 나누기 (대화처럼) */
.bye-chat{display:flex;flex-direction:column}
.bye-mini .bye-frame{aspect-ratio:16/7}
.bye-mini .bye-frame>img{object-position:50% 66%}
.bye-mini .bye-snap{display:none}
.bt-day{margin:0;text-align:center;font-size:12.5px;color:var(--bye-sub)}
.bye-talk{gap:10px}
.bt-in{animation:btIn .7s ease both;animation-delay:var(--d,0s)}
@keyframes btIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.bt-compose{display:flex;gap:8px;align-items:flex-end}
.bt-compose textarea{flex:1;min-height:70px;padding:10px 12px;border-radius:14px;border:1px solid var(--bye-line);background:#fff;font:inherit;resize:vertical}
.bt-compose .btn{flex:none}
.bt-quiet{margin:4px 0 0;text-align:center;font-size:13px;color:var(--bye-sub)}
.bt-quiet small{display:block;font-size:11.5px;opacity:.8}
@media (prefers-reduced-motion:reduce){.bt-in{animation:none}}
/* 보호자 화면 */
.bye-owner{display:flex;flex-direction:column;gap:10px;max-width:520px;margin:0 auto;width:100%}
.bye-owner h3{margin:10px 0 0;font-size:17px}
.bo-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px}
.bo-item{padding:12px;border-radius:16px;background:#FBF7F0;border:1px solid var(--bye-line);display:flex;flex-direction:column;gap:8px}
.bo-act{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.bo-heart{min-width:44px;min-height:40px;border-radius:999px;border:1px solid #F3C9D3;background:#fff;color:#E07894;font-size:16px;cursor:pointer}
span.bo-heart{display:inline-flex;align-items:center;padding:0 12px;font-size:13px;cursor:default}
.bo-heart.on{background:#FFF1F3}
.bo-reply{display:flex;gap:6px;flex:1;min-width:220px}
.bo-reply input{flex:1;min-height:40px;padding:0 10px;border-radius:10px;border:1px solid var(--bye-line)}

/* 첫 화면 글씨 조금 크게 */
.bye-door h3{font-size:clamp(21px,2.4vw,26px)}
.bye-door p{font-size:clamp(15px,1.6vw,17px)}
.bye-mini .bye-frame{aspect-ratio:16/7}

/* 보호자 화면: 한 분씩 보기 */
.bo-head{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;flex-wrap:wrap}
.bo-head h3{margin:0}
.bo-top{display:flex;gap:12px;align-items:flex-start}
.bo-thumb{position:relative;flex:none;width:96px;aspect-ratio:1;padding:0;border:0;border-radius:12px;overflow:hidden;cursor:pointer;background:#EFE5D8}
.bo-thumb img{width:100%;height:100%;object-fit:cover}
.bo-thumb i{position:absolute;inset:auto 6px 6px auto;width:30px;height:30px;display:grid;place-items:center;border-radius:50%;background:rgba(255,255,255,.9);color:#C04A6A;font-style:normal;font-size:12px;box-shadow:0 2px 6px rgba(0,0,0,.12)}
.bo-meta{display:flex;flex-direction:column;gap:2px;min-width:0}
.bo-meta b{font-size:16px}.bo-meta small{color:var(--bye-sub);font-size:12.5px}
.bo-meta p{margin:4px 0 0;font-family:var(--font-letter);font-size:17px;line-height:1.5}
.bo-viewer{display:flex;flex-direction:column;gap:10px;max-width:540px;width:100%;margin:0 auto;border-radius:22px;overflow:hidden;background:var(--bye-paper);border:1px solid var(--bye-line);box-shadow:0 18px 44px rgba(42,33,30,.10)}
.bo-viewer .bye-stage{position:relative}
.bo-cap{padding:12px 18px 4px;text-align:center;display:flex;flex-direction:column;gap:2px}
.bo-cap b{font-size:17px}.bo-cap span{font-size:13px;color:var(--bye-sub)}
.bo-msg{margin-top:6px!important;font-family:var(--font-letter)!important;font-size:clamp(18px,2vw,22px)!important;line-height:1.5}
.bo-nav{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 14px}
.bo-who{font-size:13px;color:var(--bye-sub)}
.bo-close{align-self:center;margin:0 0 14px;min-height:40px;padding:0 14px;border:0;background:none;color:var(--bye-sub);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.bo-hello{margin-top:8px;padding:12px 14px;border-radius:14px;background:#FBF7F0;border:1px solid var(--bye-line)}
.bo-hello summary{cursor:pointer;font-weight:700;min-height:32px}
.bo-hello[open]{display:flex;flex-direction:column;gap:10px}

/* 시험 비교: 고른 것 표시 */
.bye-grid figure.picked{border-color:#E8A0B4;box-shadow:0 0 0 3px rgba(232,160,180,.25)}
.bye-grid figcaption em{font-style:normal;font-size:12px;padding:1px 8px;border-radius:999px;background:#FFE4EA;color:#C04A6A;margin-left:4px}

/* 카톡 초대장 */
.bye-inv{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:18px;align-items:start}
.bi-send{display:flex;flex-direction:column;gap:12px}
.bi-send h3{margin:0;font-size:18px}
.bi-send textarea{min-height:84px}
.bi-btns{display:flex;flex-wrap:wrap;gap:8px}
.bi-kakao{background:#FEE500!important;color:#191600!important;border-color:#FEE500!important;box-shadow:none!important}
.bi-phone{padding:14px;border-radius:24px;background:#B2C7DA}
.bi-label{margin:0 0 10px;text-align:center;font-size:12.5px;color:#41566B}
.bi-chat{display:flex;flex-direction:column;gap:6px;align-items:flex-start}
.bi-from{font-size:12.5px;color:#41566B;margin-left:4px}
.bi-bubble{max-width:88%;padding:9px 12px;border-radius:4px 14px 14px 14px;background:#fff;font-size:14.5px;line-height:1.5;color:#222}
.bi-card{display:block;width:88%;max-width:300px;border-radius:12px;overflow:hidden;background:#fff;text-decoration:none;color:#222}
.bi-og{aspect-ratio:1.6/1!important}
.bi-og>img{object-position:50% 62%}
.bi-og .bye-snap{bottom:27%}
.bi-txt{display:flex;flex-direction:column;gap:2px;padding:10px 12px}
.bi-txt b{font-size:14.5px}.bi-txt span{font-size:13px;color:#555}.bi-txt small{font-size:11.5px;color:#999}

/* 초대장: 기기별 */
.bi-dev{display:inline-flex;padding:3px;border-radius:999px;background:#F3EBE2}
.bi-dev button{min-height:34px;padding:0 12px;border:0;border-radius:999px;background:none;color:var(--bye-sub);font-size:13px;font-weight:600;cursor:pointer}
.bi-dev button.on{background:#fff;color:var(--bye-ink);box-shadow:0 1px 3px rgba(0,0,0,.08)}
.bi-btns.col{flex-direction:column;align-items:stretch}
.bi-btns.col .btn{width:100%;justify-content:center;text-align:center;text-decoration:none}
.bi-how{margin:0;padding:0 0 0 2px;list-style:none;display:flex;flex-direction:column;gap:6px;font-size:13.5px;color:var(--bye-sub)}
.bi-how b{color:var(--bye-ink);margin-right:6px}
.bi-pc{display:grid;grid-template-columns:minmax(0,1fr) 170px;gap:16px;align-items:start}
.bi-qr{display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px;border-radius:16px;background:#fff;border:1px solid var(--bye-line);text-align:center}
.bi-qr-img{width:140px;height:140px}
.bi-qr-img svg{width:100%;height:100%;display:block}
.bi-qr b{font-size:13.5px}.bi-qr span{font-size:12px;color:var(--bye-sub);line-height:1.45}
@media (max-width:640px){.bi-pc{grid-template-columns:1fr}.bi-qr{flex-direction:row;text-align:left}.bi-qr-img{flex:none;width:110px;height:110px}}
.bye-inv{grid-template-columns:1fr;max-width:600px;margin:0 auto;width:100%}
.bi-pc{grid-template-columns:minmax(0,1fr) 180px}
.bi-kakao{padding-left:18px!important;padding-right:18px!important;white-space:nowrap}
.bi-phone{max-width:420px;margin:0 auto;width:100%}
