/* Mobile layout, plus the separately approved desktop introduction composition. */
/* November 25: 학습용 글꼴을 '자주 쓰는 글자'(기존 파일 이름 그대로)와 '드문 글자'(-rest) 둘로 나눴다. 글자 모양은 같다.
   아래 줄은 드문 글자용이고, 기존 줄보다 먼저 적어 두어 기존 파일에 없는 글자일 때만 내려받는다. */
@font-face{font-family:'Ttobak About';src:url('./assets/noto-sans-kr-regular-learning-rest.woff2') format('woff2');font-style:normal;font-weight:400;font-display:swap;unicode-range:U+1100-11FF,U+A960-A97F,U+AC00-D7FF}
@font-face{font-family:'Ttobak About';src:url('./assets/noto-sans-kr-bold-learning-rest.woff2') format('woff2');font-style:normal;font-weight:700;font-display:swap;unicode-range:U+1100-11FF,U+A960-A97F,U+AC00-D7FF}
@font-face{font-family:'Ttobak About';src:url('./assets/noto-sans-kr-regular-learning.woff') format('woff');font-style:normal;font-weight:400;font-display:swap}
@font-face{font-family:'Ttobak About';src:url('./assets/noto-sans-kr-bold-learning.woff') format('woff');font-style:normal;font-weight:700;font-display:swap}
@media(max-width:619px){
  body .mobile-menu-header,
  body .tt-learning-app :is([data-ui='headerStyle'],.learning-header).mobile-menu-header{
    display:grid!important;grid-template-columns:minmax(134px,1fr) auto 60px!important;
    align-items:center!important;gap:0 8px!important;box-sizing:border-box!important;
    width:calc(100% - 28px)!important;max-width:none!important;min-height:60px!important;
    margin:0 auto 12px!important;padding:8px 0!important;top:0!important;
    border-bottom:1px solid #dae5dd!important;transform:none!important;
    background:#f5f8f4!important;opacity:1!important;backdrop-filter:none!important;isolation:isolate;z-index:100!important;
  }
  body .tt-learning-app .tt-home{padding-top:0!important;}
  body .tt-learning-app .tt-home > .mobile-menu-header{width:100%!important;margin-inline:0!important;margin-bottom:0!important;}
  body[data-mobile-page='collection']{padding:0 14px 28px;}
  body[data-mobile-page='collection'] > .mobile-menu-header{width:100%!important;}
  body .mobile-menu-header > :is(.shared-brand,.home-wordmark,.learning-home-link,[data-ui='learningBrandStyle']){
    display:flex!important;align-items:center!important;justify-content:flex-start!important;
    gap:6px!important;min-width:0!important;width:134px!important;min-height:44px!important;
    height:44px!important;margin:0!important;padding:0!important;line-height:1!important;
  }
  body .mobile-menu-header :is(.brand-face,.secondary-ddori-face,[data-ui='learningLogoImgStyle']){
    display:block!important;visibility:visible!important;opacity:1!important;flex:0 0 32px!important;
    width:32px!important;height:32px!important;min-width:32px!important;background-size:32px 32px!important;
  }
  body .mobile-menu-header :is(.brand-logo,.learning-clay-wordmark img,.secondary-clay-wordmark img:not(.secondary-ddori-face)){
    width:92px!important;height:auto!important;max-height:36px!important;object-fit:contain!important;
  }
  body .mobile-menu-header .learning-clay-wordmark{margin:0!important;min-width:0!important;}
  body .mobile-menu-current{min-width:0;text-align:right;white-space:nowrap;word-break:keep-all;overflow-wrap:anywhere;
    color:#426357;font:400 13px/1.35 'Ttobak UI','Ttobak Learning','Malgun Gothic',sans-serif;}
  body .mobile-menu-toggle{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:60px;min-width:0;
    min-height:44px;height:44px;margin:0;padding:0 6px;border:1px solid #c9d8ce;border-radius:12px;
    background:var(--paper-grain),var(--paper);color:var(--paper-ink);box-shadow:var(--paper-shadow);cursor:pointer;
    font:600 14px/1 var(--ui-font)!important;letter-spacing:-.01em!important;touch-action:manipulation;}
  body .mobile-menu-toggle::after{content:none;display:none;}
  body .mobile-menu-toggle:focus-visible{outline:3px solid var(--paper-focus)!important;outline-offset:2px!important;}
  body .mobile-menu-header > .learning-tools{
    display:none!important;grid-column:1/-1;width:100%!important;min-width:0!important;max-width:100%!important;
    height:auto!important;max-height:none!important;margin:8px 0 0!important;padding:6px!important;
    overflow:visible!important;transform:none!important;box-sizing:border-box!important;
    border:1px solid #d7e2d9!important;border-radius:16px;background:#fffdf7!important;
  }
  /* The open list participates in page scrolling; no nested scroll region or scroll lock. */
  body .mobile-menu-header[data-mobile-menu-open='true']{position:sticky!important;}
  body .mobile-menu-header[data-mobile-menu-open='true'] > .learning-tools{display:grid!important;grid-template-columns:minmax(0,1fr);gap:2px!important;}
  body .mobile-menu-header > .learning-tools > :is(a,button){
    display:flex!important;justify-content:flex-start!important;gap:10px!important;width:100%!important;min-width:0!important;
    min-height:46px!important;height:auto!important;padding:10px 12px!important;white-space:normal!important;
    font-size:15px!important;line-height:1.5!important;letter-spacing:0!important;text-shadow:none!important;
    text-align:left!important;border-radius:10px!important;box-sizing:border-box!important;
  }
  body .mobile-menu-header > .learning-tools > [hidden]{display:none!important;}
  body .mobile-menu-header > .learning-tools > :is(a,button)::before{display:none!important;}
  body .mobile-menu-header > .learning-tools > [aria-current='page']{background:#e7f1e7!important;box-shadow:inset 3px 0 #477a62!important;}
  body .mobile-menu-header .learning-tools .mobile-menu-item-label{display:inline!important;}
  body .mobile-menu-header .ttobak-music-toggle svg{flex:none;}
  body .sound-panel-heading button{width:44px;height:44px;}

  /* Less vertical travel; retain the original reading content and educational glyph fonts. */
  body[data-ttobak-screen^='stage-'] .tt-learning-app [data-ui='lessonPageStyle']{padding-top:0!important;}
  body[data-ttobak-screen^='stage-'] .lesson-breadcrumb-row{margin:0 0 6px;}
  body[data-ttobak-screen^='stage-'] .tt-learning-app [data-ui='breadcrumbStyle']{min-height:44px!important;}
  body[data-ttobak-screen^='stage-'] .tt-learning-app [data-ui='lessonHeadingRowStyle']{margin-bottom:12px!important;}
  body[data-ttobak-screen^='stage-'] .tt-learning-app [data-ui='lessonTitleStyle']{margin-bottom:10px!important;}
  body[data-ttobak-screen='stage-1'] .tt-learning-app [data-ui='s1BoardFooterStyle']{margin-top:12px!important;padding-top:12px!important;gap:8px!important;}
  body[data-ttobak-screen^='stage-'] .tt-learning-app [data-ui='lessonTitleStyle']{font-size:22px!important;line-height:1.4!important;}
  body[data-ttobak-screen^='stage-'] .tt-learning-app .mobile-stage-picker{gap:8px;font-size:14px;}
  body[data-ttobak-screen^='stage-'] .tt-learning-app .mobile-stage-picker select{min-height:44px;padding:8px;}
  body[data-ttobak-screen^='stage-'] .tt-learning-app [data-ui='feedbackRowStyle']{padding:8px 10px!important;}
  body[data-ttobak-screen^='stage-'] .tt-learning-app [data-ui='activityScrollStyle']{padding:12px!important;overflow:visible!important;max-height:none!important;}
  body[data-ttobak-screen='stage-1'] .tt-learning-app [data-ui='s1WorkspaceStyle']{padding:22px 12px 24px!important;gap:8px!important;}
  body[data-ttobak-screen='stage-1'] .tt-learning-app [data-ui='s1BoxStyle']{width:124px!important;height:128px!important;margin:0 auto 4px!important;}
  body[data-ttobak-screen='stage-1'] .tt-learning-app [data-ui='bigGlyphStyle']{font-size:94px!important;}
  body[data-ttobak-screen='stage-1'] .tt-learning-app [data-ui='s1SoundRowStyle']{margin-top:6px!important;}
  body[data-ttobak-screen='stage-1'] .tt-learning-app [data-ui='s1HintStyle']{font-size:15px!important;line-height:1.5!important;}
  body[data-ttobak-screen='stage-1'] .tt-learning-app [data-ui='s1GuideImageStyle']{width:48px!important;height:52px!important;}
  body[data-ttobak-screen='stage-1'] .tt-learning-app [data-ui='s1VowelRowStyle']{gap:6px!important;margin:10px 0!important;}
  body[data-ttobak-screen='stage-1'] .tt-learning-app [data-ui='v.style']{min-height:44px!important;}
  body .tt-learning-app :is([data-ui='s1ActionRowStyle'],[data-ui='s2ControlRowStyle'],[data-ui='s3ActionRowStyle'],[data-ui='s4ControlRowStyle'],[data-ui='s5ControlRowStyle'],[data-ui='s7ControlRowStyle'],[data-ui='wordControlRowStyle'],[data-ui='stageControlRowStyle']){
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;width:100%!important;
  }
  body .tt-learning-app :is([data-ui='navBtnStyle'],[data-ui='navBtnAccentStyle'],[data-ui='smallActionBtnStyle'],[data-ui='smallActionMutedStyle'],[data-ui$='ListenBtnStyle']){
    display:flex!important;align-items:center!important;justify-content:center!important;min-width:0!important;
    min-height:48px!important;height:auto!important;padding:10px 8px!important;font-size:15px!important;line-height:1.4!important;
    white-space:normal!important;word-break:keep-all!important;box-sizing:border-box!important;
  }
  body .tt-learning-app [data-ui='stageControlRowStyle']{grid-template-columns:repeat(3,minmax(0,1fr))!important;align-items:stretch!important;}
  body .tt-learning-app [data-ui='stageControlRowStyle'] button{min-height:48px!important;padding:10px 4px!important;font-size:14px!important;line-height:1.4!important;}
  body .tt-learning-app [data-ui='sentenceBigCardStyle']{padding:16px 10px!important;}
  body .tt-learning-app [data-ui='sentenceListStyle']{gap:6px!important;}
  body .tt-learning-app [data-ui='sentenceListStyle'] button{min-height:44px!important;padding:8px 10px!important;}
  body[data-ttobak-screen='stage-5'] .tt-learning-app [data-ui='s5BatchimGridStyle']{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important;}
  body[data-ttobak-screen='stage-5'] .tt-learning-app [data-ui='b.style']{min-width:44px!important;min-height:48px!important;}
  body .tt-learning-app .learning-reading-complete-bar{margin-top:16px;}
}
/* A short landscape viewport scrolls the complete list with the page. */
@media(max-width:619px) and (max-height:479px){
  body .mobile-menu-header[data-mobile-menu-open='true']{position:relative!important;}
}

/* All compact book layouts share the same loaded introduction typefaces. */
@media(max-width:760px){
  /* About: the bundled regular and bold are real 400/700 static font files. */
  body[data-mobile-page='about'] .storybook .copy{font-family:'Ttobak About','Malgun Gothic',sans-serif;
    font-synthesis:none;margin:0 12px 18px;padding:22px 16px;text-align:center;}
  body[data-mobile-page='about'] .copy .eyebrow{font-size:13px;font-weight:400;line-height:1.5;letter-spacing:.025em;margin:0 0 12px;}
  body[data-mobile-page='about'] .copy h1{font-size:28px;font-weight:700;line-height:1.3;letter-spacing:-.025em;margin:0 0 16px;}
  body[data-mobile-page='about'] .copy > p:not(.eyebrow):not(.reward){font-size:16px;font-weight:400;line-height:1.6;margin:0;}
  body[data-mobile-page='about'] .copy .reward{font-size:14px;font-weight:400;line-height:1.65;letter-spacing:0;margin:16px 0 0;color:#756548;}
  body[data-mobile-page='about'] .start{font-family:'Ttobak About','Malgun Gothic',sans-serif;font-weight:700;font-synthesis:none;}

  body[data-mobile-page='about'] .storybook .mascot{width:38%;right:31%;}
}

/* Approved book scene refinement: unchanged background and copy, more breathing room. */
@media(min-width:761px){
  body[data-mobile-page='about'] .storybook .copy{
    top:44%;left:10%;width:37%;font-family:'Ttobak About','Malgun Gothic',sans-serif;
    font-synthesis:none;text-align:center;
  }
  body[data-mobile-page='about'] .copy .eyebrow{font-size:13px;font-weight:400;line-height:1.5;letter-spacing:.04em;margin:0 0 12px;}
  body[data-mobile-page='about'] .copy h1{font-size:clamp(27px,2.15vw,30px);font-weight:700;line-height:1.35;letter-spacing:-.025em;margin:0 0 16px;}
  body[data-mobile-page='about'] .copy > p:not(.eyebrow):not(.reward){font-size:16px;font-weight:400;line-height:1.7;margin:0;}
  body[data-mobile-page='about'] .copy .reward{font-size:13px;font-weight:400;line-height:1.7;margin:14px 0 0;color:#756548;}
  body[data-mobile-page='about'] .storybook .mascot{width:24%;right:16.5%;bottom:22%;}
}

/* The introduction uses the same two-part wording as the existing site footer. */
body[data-mobile-page='about'] .intro-film-mute{border:1px solid var(--paper-line);border-radius:var(--paper-radius);background:var(--paper-grain),var(--paper);color:var(--paper-ink);box-shadow:var(--paper-shadow);}
body[data-mobile-page='about'] .intro-film-mute:not(:disabled):hover{background:var(--paper-grain),var(--paper-pressed);}
body[data-mobile-page='about'] .intro-film-mute:not(:disabled):active{translate:0 1px;box-shadow:var(--paper-shadow-pressed);}
body[data-mobile-page='about'] .intro-film-mute:focus-visible{outline:3px solid var(--paper-focus);outline-offset:3px;}
body[data-mobile-page='about'] .intro-film-mute:disabled{opacity:var(--paper-disabled-opacity);box-shadow:none;}
body[data-mobile-page="about"] .about-site-footer{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:6px 20px;word-break:keep-all;}
body[data-mobile-page="about"] .about-site-footer span{display:block;max-width:100%;}

/* Confirmed creator display name, separate from the shared copyright footer. */
body[data-mobile-page="about"] .creator-credit{margin:14px 0 0;text-align:center;font:400 14px/1.7 "Ttobak About","Malgun Gothic",sans-serif;color:#756548;}

/* Refined mobile header: logo, Menu, and the independent BGM control. */
@media(max-width:619px){
 body .mobile-menu-header,body .tt-learning-app :is([data-ui='headerStyle'],.learning-header).mobile-menu-header{grid-template-columns:minmax(134px,1fr) 44px 64px!important;column-gap:7px!important;}
 body .mobile-menu-toggle,body .mobile-menu-header > .ttobak-music-toggle{height:44px!important;min-height:44px!important;border:1px solid var(--paper-line)!important;border-radius:var(--paper-radius)!important;background:var(--paper-grain),var(--paper)!important;color:var(--paper-ink)!important;box-shadow:var(--paper-shadow)!important;}
 body .mobile-menu-toggle{grid-column:3;grid-row:1;width:64px;padding-inline:9px;font-size:13px!important;}
 body .mobile-menu-header > .ttobak-music-toggle{grid-column:2;grid-row:1;width:44px!important;min-width:44px!important;padding:0!important;margin:0!important;display:grid!important;place-items:center;}
 body .mobile-menu-header > .ttobak-music-toggle[hidden]{display:none!important;}
 body .mobile-menu-header > .ttobak-music-toggle > span{display:none!important;}
 body .mobile-menu-header > .ttobak-music-toggle[data-audio-on='true']{background:var(--paper-grain),var(--paper-mint)!important;}
 body[data-ttobak-screen='stage-1'] .tt-learning-app [data-ui='s1GuideStyle']{justify-content:flex-end!important;gap:8px!important;}
 body[data-ttobak-screen='stage-1'] .tt-learning-app [data-ui='s1GuideBubbleStyle']{flex:0 1 205px!important;max-width:calc(100% - 56px)!important;width:max-content!important;margin-left:auto!important;}
}
/* Shared footer uses the same approved two lines as the introduction. */
.tt-learning-app [data-ui='siteFooterStyle']{display:flex!important;flex-direction:column!important;align-items:center!important;gap:7px!important;text-align:center!important;padding:22px 8px!important;}
.tt-learning-app [data-ui='siteFooterStyle'] > span{max-width:100%;white-space:normal;word-break:keep-all;overflow-wrap:anywhere;}
.tt-learning-app [data-ui='siteFooterStyle'] > span:last-child{font-size:clamp(13px,3.55vw,14px)!important;line-height:1.65!important;letter-spacing:-.02em!important;}

@media(max-width:619px){
 .tt-learning-app [data-ui='siteFooterStyle']{box-sizing:border-box!important;width:calc(100% - 24px)!important;padding-inline:0!important;font-family:'Ttobak UI','Malgun Gothic',sans-serif!important;}
 .tt-learning-app [data-ui='siteFooterStyle'] > span:first-child{font-size:clamp(15px,4.25vw,17px)!important;}
}

/* The library shortcut shares the existing music control’s size and quiet outline. */
.mobile-library-link{display:none;}
@media(min-width:620px){
 body .learning-tools > .learning-library-link{
  display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;
  width:44px;min-width:44px;height:44px;min-height:44px;margin:0;padding:0!important;
  border:1px solid #c5d7cd;border-radius:999px;background:#fffdf5;color:#245348;
  box-shadow:0 2px 5px #123c2d12;text-decoration:none;box-sizing:border-box;
 }
 body .learning-tools > .learning-library-link svg{display:block;flex:none;}
 body .learning-tools > .learning-library-link:hover{background:#eaf4ed;}
 body .learning-tools > .learning-library-link:focus-visible{outline:3px solid #197c99;outline-offset:3px;}
}
@media(max-width:619px){
 body .mobile-menu-header.mobile-menu-with-library,
 body .tt-learning-app :is([data-ui='headerStyle'],.learning-header).mobile-menu-header.mobile-menu-with-library{
  grid-template-columns:minmax(0,1fr) 44px 44px 68px!important;column-gap:6px!important;
 }
 body .mobile-menu-header.mobile-menu-with-library > .mobile-library-link{
  display:inline-flex!important;grid-column:2;grid-row:1;align-items:center;justify-content:center;
  width:44px;min-width:44px;height:44px;min-height:44px;margin:0;padding:0;
  border:1px solid var(--paper-line);border-radius:var(--paper-radius);background:var(--paper-grain),var(--paper);
  color:var(--paper-ink);box-shadow:var(--paper-shadow);text-decoration:none;box-sizing:border-box;touch-action:manipulation;
 }
 body .mobile-menu-header.mobile-menu-with-library > .ttobak-music-toggle{grid-column:3!important;grid-row:1!important;}
 body .mobile-menu-header.mobile-menu-with-library > .mobile-menu-toggle{grid-column:4!important;grid-row:1!important;}
 body .mobile-menu-header.mobile-menu-with-library > .mobile-library-link svg{display:block;flex:none;}
 body .mobile-menu-header.mobile-menu-with-library > .mobile-library-link:focus-visible{outline:3px solid var(--paper-focus);outline-offset:2px;}
 body .mobile-menu-header.mobile-menu-with-library > .learning-tools > .learning-library-link{display:none!important;}
}
@media(max-width:359px){
 body .mobile-menu-header.mobile-menu-with-library > :is(.shared-brand,.home-wordmark,.learning-home-link,[data-ui='learningBrandStyle']){width:100px!important;gap:4px!important;}
 body .mobile-menu-header.mobile-menu-with-library :is(.brand-face,.secondary-ddori-face,[data-ui='learningLogoImgStyle']){width:24px!important;height:24px!important;min-width:24px!important;flex-basis:24px!important;background-size:24px 24px!important;}
 body .mobile-menu-header.mobile-menu-with-library :is(.brand-logo,.learning-clay-wordmark img,.secondary-clay-wordmark img:not(.secondary-ddori-face)){width:72px!important;}
}

/* Current local learner belongs to the expanded mobile learner menu row. */
.mobile-learner-name{display:none;}
@media(max-width:619px){
 body .mobile-menu-header .learning-tools > .mobile-learner-row{align-items:center!important;}
 body .mobile-menu-header .mobile-learner-name{
  display:block;flex:0 1 auto;min-width:0;max-width:calc(100% - 66px);
  border:0;border-left:1px solid #b9cbbf;border-radius:0;padding:0 0 0 10px;margin:0;
  background:transparent;color:inherit;font:inherit;font-size:14px;line-height:1.3;font-weight:400;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
 }
 body .mobile-menu-header .mobile-learner-name[hidden]{display:none;}
}
/* November 8: on the learner panels the header sits inside the page gutter;
   line the logo and 메뉴 up with the cards' outer edges. */
@media(max-width:939px){body:is([data-ttobak-screen=learners],[data-ttobak-screen=progress],[data-ttobak-screen=review]) .tt-learning-app header.mobile-menu-header{padding-left:0!important;padding-right:0!important}}
