.kb-home{display:inline-block;margin:8px 12px 0;padding:8px 12px;min-height:44px;color:#6B5A4A;font-weight:700;text-decoration:none;border-radius:12px}
.kb{max-width:720px;margin:0 auto;padding:8px 12px 16px;position:relative;touch-action:pan-y}
.kb-top{display:flex;justify-content:space-between;align-items:center;min-height:56px;gap:8px}
.kb-top h1{font-size:20px;margin:0;text-align:left;color:#3E2E22}
.kb-pouch{position:relative;width:60px;height:60px;flex:none;border:0;background:none;padding:0}
.kb-pouch svg{width:100%;height:100%;transform-origin:50% 90%;transition:transform .35s cubic-bezier(.3,1.6,.5,1)}
.kb-pouch.bump svg{animation:kbBump .45s}
.kb-pouch.full::after{content:"";position:absolute;inset:-6px;border-radius:50%;box-shadow:0 0 18px 6px #F6C15B;animation:kbGlow 1.6s ease-in-out infinite}
@keyframes kbBump{40%{transform:scale(var(--s)) translateY(-4px) rotate(-6deg)}}
@keyframes kbGlow{50%{opacity:.35}}
.kb-pic{position:relative;width:100%;aspect-ratio:4/3;background:#FAF1E4;border-radius:18px;overflow:hidden;border:2px solid #E6C9A8}
.kb-pic img{width:100%;height:100%;object-fit:cover;display:block}
.kb-wide .kb-pic{border-radius:6px;margin:0 -12px;width:calc(100% + 24px);border-left:0;border-right:0}
.kb-bean{position:absolute;transform:translate(-50%,-50%);min-width:44px;min-height:44px;border:0;background:transparent;border-radius:50%;padding:0;-webkit-tap-highlight-color:transparent}
.kb-bean.got{pointer-events:none}
.kb-bean.got.fresh::after{content:"";position:absolute;inset:6px;border-radius:50%;box-shadow:0 0 0 3px #F6C15Baa;animation:kbSpark .6s ease-out forwards}
@keyframes kbSpark{from{transform:scale(.4);opacity:1}to{transform:scale(1.6);opacity:0}}
.kb-fly{position:fixed;width:18px;height:14px;border-radius:50%;background:#B0763E;border:2px solid #784C24;z-index:50;pointer-events:none;transition:transform .6s cubic-bezier(.4,-.3,.6,1),opacity .12s .48s}
.kb-text{font-size:19px;line-height:1.75;margin:14px 6px 8px;white-space:pre-wrap}
.kb-title{font-size:17px;color:#B5653F;margin:14px 6px 0;font-weight:700}
.kb-nav{display:flex;justify-content:space-between;gap:12px;margin:10px 0 4px}
.kb-nav button,.kb-btn{min-height:52px;min-width:88px;border:2px solid #E6C9A8;background:#fff;border-radius:26px;font-size:20px;font-weight:700;color:#3E2E22;padding:0 18px}
.kb-nav button[disabled]{visibility:hidden}
.kb-btn.main{background:#B5552A;border-color:#B5552A;color:#fff}
.kb-dots{display:flex;justify-content:center;gap:5px;flex-wrap:wrap;margin:6px 0}
.kb-dots i{width:8px;height:8px;border-radius:50%;background:#E6C9A8}.kb-dots i.on{background:#C8714A}
.kb-cover{text-align:center}.kb-cover h1{font-size:28px;margin:18px 0 8px}
.kb-end{text-align:center}.kb-end h2{font-size:22px;margin:16px 0 8px}
.kb-say{display:flex;align-items:center;gap:10px;justify-content:center;margin:12px 0}
.kb-say img{width:84px;height:84px;object-fit:contain}
.kb-say p{background:#fff;border:2px solid #E6C9A8;border-radius:18px;padding:10px 14px;font-size:19px;font-weight:700;margin:0;text-align:left}
.kb-miss{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin:10px 0}
.kb-miss button{width:104px;border:2px solid #E6C9A8;border-radius:14px;background:#fff;padding:4px;font-size:13px;line-height:1.3}
.kb-miss button span{display:block;aspect-ratio:4/3;background:#FAF1E4;border-radius:10px;margin-bottom:4px;overflow:hidden;position:relative}
.kb-miss button span i{position:absolute;inset:-12px;background:#FAF1E4 center/cover;filter:blur(8px);transform:scale(1.1)}
.kb-miss button span::after{content:"";position:absolute;inset:0;background:rgba(250,241,228,.55)}
.kb-card{background:#fff;border:2px solid #E6C9A8;border-radius:18px;padding:12px 16px;margin:12px 0;text-align:left;font-size:17px;line-height:1.7}
.kb-card b{color:#B5653F}
.kintro{max-width:520px;margin:24px auto 0;padding:0 16px 28px;font-size:15px;line-height:1.7;color:#4a3b2c}.kintro h2{font-size:17px;margin:18px 0 6px}
@media (min-width:900px){.kb-wide .kb-pic{margin:0;width:100%}}

.kb-pouch img{width:100%;height:100%;object-fit:contain;transform-origin:50% 90%}
.kb-pouch.bump img{animation:kbBump2 .45s}@keyframes kbBump2{40%{transform:translateY(-4px) rotate(-6deg) scale(1.08)}}
.kb-pouch.full::after{display:none}
.kb-fly{background:url(img/bean.webp) center/contain no-repeat;border:0;width:22px;height:22px;border-radius:0}
.kb-miss button{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch}
.kb-miss button>em{font-style:normal;display:flex;align-items:flex-start;justify-content:center;min-height:2.6em;line-height:1.3;overflow:hidden}
.kb-hint{position:absolute;width:15%;aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%;border:0;background:radial-gradient(circle closest-side,rgba(255,243,207,1) 0,rgba(255,243,207,.55) 45%,rgba(255,243,207,0) 100%);mix-blend-mode:screen;pointer-events:none;opacity:0;animation:kbHint 2s ease-in-out 1 forwards}
@keyframes kbHint{0%{opacity:0}30%{opacity:.75}70%{opacity:.75}100%{opacity:0}}
.kb-bz{position:absolute;overflow:hidden;border-radius:50%;pointer-events:none;background-repeat:no-repeat;-webkit-mask-image:radial-gradient(circle closest-side,#000 55%,transparent 75%);mask-image:radial-gradient(circle closest-side,#000 55%,transparent 75%);animation:kbBz 2s ease-in-out 1 forwards}
@keyframes kbBz{0%,100%{transform:scale(1)}30%,70%{transform:scale(1.12)}}
@media (prefers-reduced-motion:reduce){.kb-hint{animation:none!important;opacity:.75}.kb-bz{display:none}}
/* r6: 빛(1) 위에 콩 확대(2), 그 위에 누르는 영역(3) */
.kb-hint{z-index:1}.kb-bz{z-index:2}.kb-bean{z-index:3}
/* r9: ?coverhint=1 샘플 전용 표지 안내 문장 + 주머니 한 번 흔들기 */
.kb-invite{text-align:center;max-width:22em;margin:12px auto 14px}
.kb-pouch.wiggle img{animation:kbWiggle .9s ease-in-out 1}
@keyframes kbWiggle{0%,100%{transform:rotate(0)}20%{transform:rotate(-9deg)}40%{transform:rotate(7deg)}60%{transform:rotate(-4deg)}80%{transform:rotate(2deg)}}
@media (prefers-reduced-motion:reduce){.kb-pouch.wiggle img{animation:none!important}}
.kb-invite span{display:inline-block}

/* r13: 찾은 콩 자리 덮개 */
.kb-gone{position:absolute;max-width:none;pointer-events:none;z-index:1}

/* r17/r4: 찾은 장면은 덮개 다 받을 때까지 크림색 자리 표시 */
/* 100ms 안에 오면 자리 표시 없이 바로, 넘으면 #FAF1E4 자리 표시(테두리·모서리는 .kb-pic 그대로) 뒤 0.2초 서서히 */
.kb-pic.kb-hold{background:transparent}
.kb-pic.kb-wait{background:#FAF1E4}
.kb-pic.kb-hold img,.kb-pic.kb-wait img{opacity:0}
.kb-pic.kb-fade img{transition:opacity .2s ease}
@media (prefers-reduced-motion:reduce){.kb-pic.kb-fade img{transition:none}}

/* 10/25 콩 찾기는 다 읽은 뒤 */
.kb-title-s{font-size:14px;opacity:.8;margin:6px 0}
.kb-guide{text-align:center;font-weight:700;margin:6px 0 10px}
.kb-ask{text-align:center}
.kb-btn.kb-later{font-size:15px;min-height:44px;margin-top:10px;background:transparent}
.kb-cheer-go{text-align:center;margin:8px 0}
.kintro details>summary,.kb-parent>summary{cursor:pointer;font-weight:700;list-style:revert;min-height:44px;display:flex;align-items:center}.kintro details>summary h2{display:inline;margin:0;font-size:inherit}.kb-parent{max-width:520px;margin:4px auto 2px;padding:0 14px;font-size:13px;line-height:1.6;color:#6B5A4A}.kb-parent>summary{min-height:32px;font-size:13px}.kb-parent p{margin:4px 0 8px}body.kb-scene .kintro{display:none}
.kintro details>summary,.kb-parent>summary{list-style:none}.kintro details>summary::-webkit-details-marker,.kb-parent>summary::-webkit-details-marker{display:none}.kintro details>summary::before,.kb-parent>summary::before{content:"▸";display:inline-block;margin-right:6px;transition:transform .15s}.kintro details[open]>summary::before,.kb-parent[open]>summary::before{transform:rotate(90deg)}@media(prefers-reduced-motion:reduce){.kintro details>summary::before,.kb-parent>summary::before{transition:none}}
/* navfix-1031 합침 + home1an: 첫 장면 접힌 「부모님께」 줄(약 38px)만큼 더 빼서 모든 장면 그림 크기를 같게. 휴대폰(600px 미만) 변경 없음 */
@media (min-width:600px){.kb .kb-pic,.kb-wide .kb-pic{width:min(100%,calc((100vh - var(--kb-rest,400px))*4/3));margin-left:auto;margin-right:auto;border-left:2px solid #E6C9A8;border-right:2px solid #E6C9A8}}
/* home1an v4: 작은 폰(폭 600 미만·높이 700 이하)만 그림을 화면 높이에 맞춰 줄여 ◀ ▶가 스크롤 없이 보이게. 4:3 유지, 콩 위치(%) 그대로 */
@media (max-width:599px) and (max-height:700px){.kb .kb-pic,.kb-wide .kb-pic{width:min(100%,calc((100vh - var(--kb-rest-s,440px))*4/3));margin-left:auto;margin-right:auto}}
@media (max-width:599px) and (max-height:700px){.kb-home{margin-top:2px!important}.kb-top{padding-top:0;padding-bottom:0;min-height:0}.kb-title{margin-top:8px}.kb-text{margin-top:6px}.kb .kb-pic,.kb-wide .kb-pic{width:min(100%,calc((100vh - var(--kb-rest-s,442px))*4/3))}}
/* home1an v5: 넓은 화면에서 「▸ 부모님께」를 제목 줄 오른쪽에 */
@media (min-width:600px){.kb-top{flex-wrap:wrap}.kb-top .kb-parent{margin:0;padding:0;flex:0 1 auto;max-width:none}.kb-top .kb-parent[open]{flex-basis:100%;order:2}}
/* home1an v6: 높이 860 이하 화면에서 끝 화면 배치를 줄여 ◀가 화면 안에. 글자 크기는 그대로 */
@media (max-height:860px){.kb-end h2{margin:6px 0 4px}.kb-say{margin:6px 0}.kb-say img{width:60px;height:60px}.kb-miss{gap:6px;margin:6px 0}.kb-miss button{width:86px}.kb-miss button>em{min-height:2.4em}.kb-card{margin:8px 0;padding:8px 14px;line-height:1.55}.kb-end .kb-nav{margin-top:6px}}
@media (max-width:599px) and (max-height:860px){.kb-end h2{font-size:20px}.kb-say p{font-size:16px;padding:6px 10px}.kb-say img{width:48px;height:48px}.kb-miss{gap:5px}.kb-miss button{width:calc((100% - 20px)/5);font-size:11.5px;padding:3px;border-radius:10px}.kb-miss button span{margin-bottom:2px;border-radius:7px}.kb-card{font-size:15px;padding:6px 12px}}
@media (max-width:599px) and (max-height:700px){.kb-say{margin:3px 0}.kb-card{margin:5px 0;line-height:1.45}.kb-end h2{margin:3px 0}.kb-end .kb-nav{margin-top:4px}}
@media (max-width:599px){.kb-miss button{width:calc((100% - 15px)/4)}.kb-miss button>em{word-break:keep-all;overflow-wrap:anywhere}}
@media (max-width:599px) and (max-height:760px){.kb-miss button span{aspect-ratio:16/10}}
@media (max-width:599px) and (max-height:760px){.kb-miss{gap:4px 5px;margin:4px 0}.kb-card{font-size:14px;line-height:1.4;padding:5px 10px;margin:4px 0}.kb-end .kb-nav{margin-top:2px}.kb-end .kb-nav button{min-height:44px;padding-top:6px;padding-bottom:6px}.kb-end h2{font-size:18px;margin:2px 0}}
@media (max-width:599px) and (max-height:760px){.kb-say p{font-size:14.5px;padding:5px 9px}.kb-say img{width:40px;height:40px}.kb-tip{padding-top:0;padding-bottom:0}.kb-tip summary{min-height:40px;line-height:40px}}
@media (min-height:761px){.kb-miss button>em{font-size:14px}.kb-end .kb-nav button,.kb-end .kb-nav .kb-btn{min-height:52px}}
.kb-miss{justify-content:center}
@media (min-height:761px) and (min-width:600px){.kb-miss button{padding-left:2px;padding-right:2px}.kb-miss button>em{word-break:keep-all;overflow-wrap:anywhere}}

/* endbean-1031: 숨은 콩 다시 보기 */
.kb-revisit{font-size:.9em;font-weight:700;color:#6B4226;white-space:nowrap}
.kb-praise{font-size:.95em;color:#8a4b2a}
.kb-miss.kb-tilt button:first-child{animation:kbTilt .6s ease-in-out .4s 1 both;transform-origin:50% 100%}
@keyframes kbTilt{0%,100%{transform:rotate(0)}25%{transform:rotate(-4deg)}55%{transform:rotate(3deg)}80%{transform:rotate(-1.5deg)}}
.kb-miss button span i{filter:blur(1.5px)}
.kb-miss button span::after{background:rgba(250,241,228,.12)}
.kb-miss button{border-color:#D9A27F}
.kb-big{position:relative;display:block;width:clamp(96px,17vh,180px);aspect-ratio:1;margin:4px auto;transform-origin:50% 90%}
.kb-big.anim{animation:kbSack 1.2s ease-out 1 both}
.kb-big img{width:100%;height:100%;object-fit:contain}
@keyframes kbSack{0%{transform:scale(.9)}25%{transform:scale(1.08,.94)}45%{transform:scale(.97,1.04)}65%,100%{transform:scale(1)}}
.kb-big .hop{position:absolute;left:43%;top:20%;width:14%;aspect-ratio:1;background:url(img/bean.webp) center/contain no-repeat;opacity:0}
.kb-big.anim .hop{animation:kbHop .7s ease-out 1 forwards}
.kb-big .hop:nth-of-type(2){animation-delay:.15s;margin-left:-18%}.kb-big .hop:nth-of-type(3){animation-delay:.3s;margin-left:14%}
@keyframes kbHop{0%{opacity:0;transform:translateY(0)}20%{opacity:1}50%{transform:translateY(-38px)}100%{opacity:0;transform:translateY(0)}}
.kb-done-btns{display:flex;flex-direction:column;align-items:center;gap:8px;margin:6px 0}
.kb-done-btns .kb-btn,.kb-btn.kb-other{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;box-sizing:border-box;width:min(100%,320px);min-height:48px;font-size:17px;border-radius:24px}
.kb-done-btns .kb-btn.main,.kb-btn.kb-other{background:#B5552A;border:2px solid #B5552A;color:#fff;box-shadow:0 3px 0 #A8502D}
.kb-done-btns .kb-btn.sub{background:transparent;border:2px solid #B5552A;color:#8a4b2a;box-shadow:none}
.kb-end .kb-nav .kb-btn.kb-other{width:auto;padding:0 18px}
@media (prefers-reduced-motion:reduce){.kb-miss.kb-tilt button:first-child,.kb-big,.kb-big .hop{animation:none!important}.kb-big .hop{display:none}}
@media (max-width:599px) and (max-height:700px){.kb-revisit{font-size:.86em;letter-spacing:-.02em}}
/* endbean-1031b: 마지막 콩 축하 화면 높이 맞춤(디자이너 결정) */
@media (max-height:760px){.kb-hunt:has(.kb-cheer) .kb-pic,.kb-hunt.kb-wide:has(.kb-cheer) .kb-pic{max-height:calc(100vh - 430px);width:min(100%,calc((100vh - 430px)*4/3));margin-left:auto;margin-right:auto}.kb-hunt .kb-say.kb-cheer{margin:8px 0}.kb-cheer-go{margin:8px 0}.kb-cheer-go .kb-done-btns{margin:8px 0;gap:8px}}
@media (max-height:760px){body:has(.kb-cheer),body:has(.kb-cheer) #app,body:has(.kb-cheer) main{padding-bottom:0!important;margin-bottom:0!important}.kb-hunt:has(.kb-cheer) .kb-nav{margin-bottom:0}}
/* endbean-1031g: 안내 줄 있는 말풍선 안쪽 여백(총괄) */
.kb-say p:has(.kb-revisit){padding-left:14px!important;padding-right:14px!important}

/* endbean-1031i: 좁은 화면 안내 말풍선 오른쪽 여백(디자이너) */
@media (max-width:400px){.kb-say p:has(.kb-revisit){padding-right:16px!important}.kb-revisit{word-break:keep-all}}
