@import url("https://fonts.googleapis.com/css2?family=Gaegu:wght@400;700&display=swap");
/* Inbox final interactive responsive extension. All non-inbox styling inherited from approved prototype. */
#app[data-kb-page="inbox"] .kb-inbox-root{--line:#E9DFD4;--ink:#604838;--sub:#806C5C}
.kb-child-select{margin:13px 0 16px;position:relative}
.kb-child-select>button{border:0;width:100%;display:flex;align-items:center;gap:9px;background:#EEE5DA;color:#604838;text-align:left;border-radius:11px;padding:13px 14px;min-height:48px;cursor:pointer}
.kb-child-select>button b{font-size:14px;flex:1}
.kb-child-options{background:#FFFCF8;border:1px solid #E9DFD4;border-radius:10px;box-shadow:0 8px 18px #49352A15;margin-top:5px;overflow:hidden}
.kb-child-options button{width:100%;padding:14px;text-align:left;border:none;background:#FFFCF8;color:#604838;border-bottom:1px solid #F2EBE3;display:flex;align-items:center;justify-content:space-between;cursor:pointer}
.kb-child-options button:last-child{border-bottom:0}.kb-child-options button[aria-selected="true"]{background:#EEE5DA;font-weight:700}
.kb-inbox-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;margin:12px 0 22px;background:#EEE5DA;border-radius:12px}
.kb-inbox-tabs button{border:0;border-radius:9px;background:transparent;min-height:43px;color:#907762;cursor:pointer;font-size:14px}
.kb-inbox-tabs button.active{background:#FFFCF8;color:#604838;font-weight:700}
.kb-inbox-section{font-size:12px;color:#A08067;margin:14px 0 11px}
.kb-mail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:26px}
.kb-mail-card{min-width:0;border:1px solid #E4D4C4;border-radius:13px;overflow:hidden;background:#FFFCF8;position:relative}
.kb-cover-button{border:0;background:#E6D7C6;display:block;width:100%;position:relative;padding:0;height:clamp(180px,52vw,236px);cursor:pointer;overflow:hidden}
.kb-cover-button img{width:100%;height:100%;display:block;object-fit:cover;object-position:center;transition:transform .2s ease}
.kb-cover-button:active img{transform:scale(1.03)}
.kb-cover-tint{position:absolute;inset:0;background:linear-gradient(0deg,rgba(50,29,16,.20),transparent 55%);pointer-events:none}
.kb-play{width:42px;height:42px;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:grid;place-items:center;color:#FFF;border-radius:50%;background:rgba(73,53,42,.72);border:1px solid #FFF9;pointer-events:none}
.kb-sample-label{position:absolute;left:8px;top:9px;background:#FFFCF8E6;color:#806C5C;font-size:10px;border-radius:30px;padding:3px 7px;pointer-events:none}
.kb-public-state{position:absolute;right:8px;top:9px;font-size:11px;border-radius:100px;padding:7px 9px;line-height:1;border:1px solid #BDA68F;background:#F9F2EA;color:#604838;min-height:28px;cursor:pointer;z-index:2}
.kb-public-state.is-public{border-color:#49352A;background:#49352A;color:#FFFFFF}
.kb-public-state:focus-visible,.kb-cover-button:focus-visible,.kb-inbox-tabs button:focus-visible,.kb-child-select button:focus-visible{outline:2px solid #604838;outline-offset:3px}
.kb-card-caption{padding:10px 10px 12px;line-height:1.5;cursor:pointer;min-height:67px}
.kb-card-caption strong{font-size:13px;color:#604838;display:block}.kb-card-caption span{color:#A08067;font-size:12px}
.kb-inbox-foot{font-size:11px;color:#988576;line-height:1.6;margin-top:4px}
/* Immersive video: no screen header/footer; 9:16 media on large screens */
#app[data-kb-page="videoLetter"]{background:#3C302C}
#app[data-kb-page="videoLetter"]>.top,#app[data-kb-page="videoLetter"]>.nav{display:none!important}
#app[data-kb-page="videoLetter"]>main{padding:0!important;margin:0;position:relative;background:#3C302C;overflow:hidden!important;display:flex;align-items:center;justify-content:center}
.kb-player{width:100%;height:100%;position:relative;background:#433833;overflow:hidden;color:#FFF;touch-action:pan-y;user-select:none}
.kb-player>.kb-player-poster{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;filter:brightness(.66)}
.kb-player>.kb-player-shade{position:absolute;inset:0;background:linear-gradient(to bottom,rgba(33,22,18,.34),transparent 25%,transparent 60%,rgba(28,19,15,.76));pointer-events:none}
.kb-video-top{position:absolute;top:max(18px,env(safe-area-inset-top));left:0;right:0;text-align:center;z-index:2;pointer-events:none}
.kb-video-top .logo{font-weight:600;font-size:21px;letter-spacing:.25em;text-indent:.25em;color:#FFF}
.kb-video-top .sub{font-size:11px;color:#FFFE;margin-top:6px;letter-spacing:.04em}
.kb-player-back{position:absolute;top:max(17px,env(safe-area-inset-top));left:16px;z-index:4;border:none;color:#FFF;background:#35241b55;border-radius:100px;width:36px;height:36px;display:grid;place-items:center;cursor:pointer}
.kb-video-index{position:absolute;top:max(22px,env(safe-area-inset-top));right:15px;z-index:2;font-size:12px;color:#FFFE}
.kb-video-bottom{position:absolute;left:18px;right:75px;bottom:66px;z-index:2;text-shadow:0 2px 5px #0006}
.kb-video-bottom strong{font-size:18px;font-weight:700;display:block}.kb-video-bottom span{font-size:12px;color:#FFFc;margin-top:6px;display:block}
.kb-video-words{position:absolute;inset:20% 16px 24% auto;width:62px;pointer-events:none;z-index:2}
.kb-video-words span{position:absolute;bottom:8%;right:0;color:rgba(255,255,255,.73);text-shadow:0 2px 8px #0007;font-size:19px;font-weight:500;opacity:0;animation:kb-rise 8.2s linear infinite;white-space:nowrap}
.kb-video-words span:nth-child(1){animation-delay:-7s}.kb-video-words span:nth-child(2){animation-delay:-5.4s}.kb-video-words span:nth-child(3){animation-delay:-3.8s}.kb-video-words span:nth-child(4){animation-delay:-2.2s}.kb-video-words span:nth-child(5){animation-delay:-.6s}
@keyframes kb-rise{0%{transform:translateY(30px);opacity:0}18%{opacity:.67}62%{opacity:.62}85%,100%{transform:translateY(-195px);opacity:0}}
.kb-video-next{position:absolute;bottom:17px;left:50%;transform:translateX(-50%);background:#ffffff23;border:1px solid #FFF8;border-radius:50px;color:#FFF;padding:8px 14px;font-size:12px;white-space:nowrap;z-index:4;cursor:pointer}
.kb-video-prev{position:absolute;bottom:17px;left:18px;background:none;border:0;color:#FFE8;font-size:12px;z-index:4;cursor:pointer}
.kb-demo-watermark{position:absolute;top:78px;left:50%;transform:translateX(-50%);color:#fff9;font-size:10px;background:#0002;padding:5px 9px;border-radius:8px;white-space:nowrap;pointer-events:none}
/* Letter: no florals or decorative illustrations within the paper. */
#app[data-kb-page="textLetter"] .kb-letter-root{max-width:760px;margin:auto}
.kb-letter-title{margin:2px 0 17px}.kb-letter-title .tag{margin:0 0 5px}
.kb-letter-layout{display:grid;grid-template-columns:1fr;gap:16px}
.kb-letter-page{background:#FFFCF7;border:1px solid #E6D7C8;border-radius:11px;padding:24px 23px 30px;box-shadow:0 8px 22px #49352A09;color:#604838}
.kb-letter-page .hand-title,.kb-letter-page .hand-body,.kb-letter-page .hand-sign{font-family:'Nanum Pen Script','Nanum Brush Script','Segoe Print','Apple SD Gothic Neo','Malgun Gothic',sans-serif}
.kb-letter-page .hand-title{font-weight:700;font-size:27px;margin:0 0 20px;line-height:1.5}
.kb-letter-page .hand-body{white-space:pre-line;font-size:17px;line-height:2.05;letter-spacing:.015em;margin:0;color:#664D3C}
.kb-letter-page .hand-sign{text-align:right;margin-top:25px;font-size:18px;font-weight:700}
.kb-letter-action{width:100%;background:#FFFCF8;border:1px solid #DCCABB;border-radius:11px;color:#604838;min-height:46px;cursor:pointer;font-size:13px;margin:12px 0 0}
.kb-parent-note{margin:18px 0 0;background:#EEE5DA;border-radius:12px;border:1px solid #E5D8CB;overflow:hidden}
.kb-parent-note-head{display:flex;align-items:center;gap:10px;border:0;background:transparent;color:#604838;width:100%;min-height:52px;padding:13px 15px;text-align:left;cursor:pointer}
.kb-parent-note-head strong{font-size:15px;flex:1}.kb-parent-note-body{padding:0 15px 17px}
.kb-sel-tags{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:13px}.kb-sel-tags span{font-size:11px;padding:6px 9px;border-radius:30px;border:1px solid #D5C5B5;color:#806C5C;background:#F8F5EF}.kb-sel-tags span.focus{color:#FFF;background:#604838;border-color:#604838}
.kb-report{background:#FFFCF8;border-radius:10px;padding:15px;line-height:1.8;font-size:13px;color:#604838}.kb-report strong{display:block;margin:0 0 5px}.kb-report p{margin:0 0 12px}.kb-report p:last-child{margin-bottom:0}
.kb-note-disclaimer{font-size:10px;color:#927d6c;margin-top:9px}
@media(min-width:760px){
 body:has(#app[data-kb-page="inbox"]),body:has(#app[data-kb-page="textLetter"]){background:#EAE3DB}
 #app[data-kb-page="inbox"],#app[data-kb-page="textLetter"]{max-width:900px}
 #app[data-kb-page="inbox"]>main,#app[data-kb-page="textLetter"]>main{padding-left:28px;padding-right:28px}
 .kb-mail-grid{grid-template-columns:repeat(2,minmax(0,250px));gap:17px}
 .kb-cover-button{height:280px}
 .kb-letter-layout{grid-template-columns:minmax(0,1fr) minmax(0,.86fr);align-items:start}
 .kb-parent-note{margin:0}
 #app[data-kb-page="videoLetter"]{max-width:900px;background:#2c2521}
 .kb-player{width:min(100%,480px);aspect-ratio:9 / 16;height:min(100%,calc(100dvh - 20px));border-radius:12px;box-shadow:0 12px 55px #0005}
}
@media(max-width:480px){.kb-cover-button{height:clamp(190px,52vw,245px)}.kb-letter-page{padding:22px 20px}.kb-video-top .logo{font-size:19px}}
@media(prefers-reduced-motion:reduce){.kb-video-words span{animation:none;opacity:.5}.kb-video-words span:nth-child(n+4){display:none}.kb-video-words span:nth-child(1){bottom:10%}.kb-video-words span:nth-child(2){bottom:23%}.kb-video-words span:nth-child(3){bottom:36%}}
@media print{html,body{height:auto!important;overflow:visible!important;background:white!important}#app{height:auto!important;min-height:0!important;max-width:100%!important;box-shadow:none!important}#app .top,#app .nav,#app .kb-letter-title,.kb-letter-action,.kb-parent-note{display:none!important}#app>main{overflow:visible!important;padding:0!important}.kb-letter-layout{display:block!important}.kb-letter-page{border:0;box-shadow:none;padding:30px 40px}}

/* FINAL TUNING: Keep the original visual language, but make the inbox compact. */
#app[data-kb-page="inbox"]{max-width:520px!important}
#app[data-kb-page="textLetter"]{max-width:640px!important}
.kb-inbox-root{max-width:500px;margin:0 auto}
.kb-cover-button{height:clamp(146px,42vw,195px)}
.kb-mail-grid{gap:10px}
.kb-card-caption{min-height:60px}
@media(min-width:760px){
  #app[data-kb-page="inbox"]>main{padding-left:22px;padding-right:22px}
  #app[data-kb-page="textLetter"]>main{padding-left:22px;padding-right:22px}
  .kb-mail-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .kb-cover-button{height:190px}
  .kb-letter-layout{display:flex;flex-direction:column;align-items:stretch;gap:0}
  .kb-parent-note{margin:15px 0 0}
  #app[data-kb-page="videoLetter"]{max-width:520px}
  .kb-player{max-width:430px}
}
@media(max-width:480px){.kb-cover-button{height:clamp(145px,42vw,187px)}}
/* Video downloads: real offline demo MP4s with an embedded watermark. */
.kb-player-video{object-fit:cover;cursor:pointer}
.kb-video-download{position:absolute;right:15px;bottom:103px;z-index:5;display:flex;flex-direction:column;align-items:center;gap:5px;color:#FFF;text-decoration:none;font-size:11px;text-shadow:0 1px 4px #0009;padding:6px 2px;min-width:55px}
.kb-download-symbol{width:35px;height:35px;border-radius:50%;border:1px solid #FFF9;background:#49352A70;display:grid;place-items:center;color:#FFF;font-size:26px;line-height:1;text-align:center}
.kb-video-watermark-hint{position:absolute;right:11px;left:11px;bottom:53px;z-index:4;color:rgba(255,255,255,.82);font-size:10px;text-align:right;text-shadow:0 1px 4px #0009;pointer-events:none;line-height:1.4}
/* The handwriting font applies exclusively to the actual letter paper. */
.kb-letter-page .hand-title,.kb-letter-page .hand-body,.kb-letter-page .hand-sign{
 font-family:'나눔손글씨 펜','Nanum Pen Script','휴먼편지체','UnPilgia','UnPilgi','UnPen','Apple SD Gothic Neo','Malgun Gothic',sans-serif
}
.kb-letter-page .hand-title{font-size:26px;line-height:1.65;font-weight:600}
.kb-letter-page .hand-body{font-size:19px;line-height:1.92;letter-spacing:.005em}
.kb-letter-page .hand-sign{font-size:20px}
.kb-letter-download-wrap{margin-top:15px}
.kb-letter-download-wrap .kb-letter-action{margin:0}
.kb-pdf-watermark-hint{color:#947D68;font-size:11px;text-align:center;margin:8px 0 0;line-height:1.6}
.kb-print-watermark{display:none}
@media print{
 #app[data-kb-page="textLetter"] .kb-letter-root{max-width:none}
 #app[data-kb-page="textLetter"] .kb-letter-page{position:relative;min-height:220mm!important;break-inside:avoid;padding:28px 30px 52px!important}
 #app[data-kb-page="textLetter"] .kb-print-watermark{display:block!important;position:absolute;bottom:22px;left:0;right:0;text-align:center;font-size:12px;letter-spacing:.08em;color:#A68F7D}
 .kb-letter-download-wrap,.kb-pdf-watermark-hint{display:none!important}
}

/* 2026-10-21 requested adjustments: inbox and letter width match all four parent tabs (410px). */
#app[data-kb-page="inbox"],#app[data-kb-page="textLetter"]{max-width:410px!important}
.kb-inbox-root{max-width:100%;margin-left:auto;margin-right:auto}
@media (min-width:760px){
 #app[data-kb-page="inbox"]>main,#app[data-kb-page="textLetter"]>main{padding-left:16px!important;padding-right:16px!important}
 .kb-mail-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .kb-cover-button{height:168px}
}
/* Handwritten but readable Gaegu applies ONLY to the actual letter, never parent notes. */
.kb-letter-page .hand-title,.kb-letter-page .hand-body,.kb-letter-page .hand-sign{
 font-family:'Gaegu','Nanum Pen Script','나눔손글씨 펜','휴먼편지체','Apple SD Gothic Neo','Malgun Gothic',sans-serif;
}
.kb-letter-page .hand-title{font-weight:700}
.kb-letter-page .hand-body{font-weight:400}
.kb-letter-page .hand-sign{font-weight:700}

/* 2026-10-23: parent note redesigned per approved SEL menu screenshot. */
.kb-parent-note{background:#EFE7DD;border:0;border-radius:15px;overflow:hidden}
.kb-parent-note-head{padding:14px 17px;min-height:50px}
.kb-parent-note-body{padding:4px 15px 17px}
.kb-note-kicker{color:#99775E;font-size:9px;font-weight:800;letter-spacing:.09em;line-height:1.5}
.kb-note-title{font-size:21px;font-weight:800;letter-spacing:-.035em;margin:7px 0 2px;color:#60432F;line-height:1.5}
.kb-note-description{font-size:10px;color:#977B68;margin-bottom:12px}
.kb-note-menu{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-bottom:11px}
.kb-note-area{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;gap:4px;border:1px solid #E5D6C5;border-radius:9px;background:#FAF7F2;color:#604838;min-height:81px;padding:8px 1px;cursor:default;user-select:none}
.kb-note-area.active{background:#E3CEB5;border-color:#BC9675}
.kb-note-area-icon{font-size:22px;line-height:24px;min-height:24px;color:#6F5038}
.kb-note-area strong{font-size:12px;line-height:1.2;white-space:nowrap}
.kb-note-area small{font-size:8px;color:#A07B64;line-height:1.3;white-space:normal;word-break:keep-all;text-align:center}
.kb-note-report{background:#FFFCF8;border-radius:10px;padding:16px 14px 20px;min-height:188px;font-size:12px;line-height:1.76;color:#6D5242;word-break:keep-all}
.kb-note-report>strong{font-size:13px;color:#5E3E2C;display:block;margin:0 0 6px}
.kb-note-report p{margin:0 0 13px}
.kb-note-report .kb-note-question{font-size:12px;margin:0 0 7px}
.kb-note-disclaimer{margin:10px 2px 0;color:#957C6C;font-size:10px;line-height:1.6}
/* Ensure the character art stays visible in either mailbox tab. */
.kb-cover-button img{width:100%;height:100%;object-fit:cover;object-position:center center;opacity:1;visibility:visible}
.kb-mail-card .kb-cover-button{background:#EDE0D4}
@media(max-width:360px){.kb-parent-note-body{padding-left:10px;padding-right:10px}.kb-note-menu{gap:4px}.kb-note-area small{font-size:7px}.kb-note-report{padding:13px 11px}}
