/* 2026-11-16 휴대폰 화면 정리 (사용자 요청 A·B·E·F·G·전체 화면). 다른 CSS 뒤에 불러온다. */

/* A. 책 읽기 버튼 줄: 한 줄, 글자가 접히지 않게. 큰 글씨(카카오톡 글자 크기)여도 넘치지 않게 줄인다. */
@media (max-width:600px){
 #reader:not(.screen-reader) footer.child-player{display:grid!important;grid-template-columns:44px minmax(0,1fr) minmax(0,1fr) 44px!important;gap:8px!important;align-items:center;padding:10px 0 6px!important;height:auto!important}
 #reader:not(.screen-reader) footer.child-player #prevPage,#reader:not(.screen-reader) footer.child-player #nextPage{width:44px!important;height:48px!important;min-height:48px!important;font-size:24px!important;padding:0!important}
 #reader:not(.screen-reader) footer.child-player #narrationToggle,#reader:not(.screen-reader) footer.child-player #replayPage{width:100%!important;min-width:0!important;height:48px!important;min-height:48px!important;padding:0 8px!important;gap:6px!important;font-size:15px!important;white-space:nowrap;flex-direction:row!important;border-radius:16px!important}
 #reader:not(.screen-reader) footer.child-player #narrationToggle span:first-child,#reader:not(.screen-reader) footer.child-player #replayPage span:first-child{font-size:18px!important;line-height:1}
 #reader:not(.screen-reader) footer.child-player #narrationToggle span:last-child,#reader:not(.screen-reader) footer.child-player #replayPage span:last-child{overflow:hidden;text-overflow:clip}

 /* B. 재생 위치: [0:00 ──●── 0:08] 한 줄. 상자 없이 얇게. */
 #reader:not(.screen-reader) footer.child-player .story-timeline{grid-column:1/-1!important;grid-row:2!important;height:auto!important;padding:0 4px!important;border:0!important;background:none!important;gap:0!important}
 #reader:not(.screen-reader) footer.child-player .story-timeline>span[aria-hidden]{display:none}
 #reader:not(.screen-reader) footer.child-player .trail-track{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px}
 #reader:not(.screen-reader) footer.child-player .trail-track>label{display:none}
 #reader:not(.screen-reader) footer.child-player .story-time{display:contents}
 #reader:not(.screen-reader) footer.child-player #storyElapsed{grid-column:1;grid-row:1}
 #reader:not(.screen-reader) footer.child-player #storySeek{grid-column:2;grid-row:1;height:32px!important}
 #reader:not(.screen-reader) footer.child-player #storyDuration{grid-column:3;grid-row:1}
 #reader:not(.screen-reader) footer.child-player #storyElapsed,#reader:not(.screen-reader) footer.child-player #storyDuration{font-size:12px;min-width:30px;text-align:center;border:0;background:none;padding:0}

 /* E. '내 이야기 만들기를 누르면…' 안내, F. 그림체 예시 안내: 휴대폰에서는 숨김. */
 #creationBoundary,.creation-boundary{display:none!important}
 .art-style-options+small{display:none!important}

 /* G. 이야기 모양: 제목과 고르기를 한 줄에. 아래 작은 설명은 숨김. */
 .story-type-choice{display:flex!important;align-items:center;gap:10px;flex-wrap:nowrap}
 .story-type-choice>label{flex:none;white-space:nowrap;margin:0}
 .story-type-choice>select{flex:1 1 auto;min-width:0;width:auto!important;margin:0}
 .story-type-choice>small{display:none!important}
}

/* 아주 좁은 폰(또는 카카오톡 큰 글씨): 버튼 글자를 조금 줄인다. */
@media (max-width:360px){
 #reader:not(.screen-reader) footer.child-player{grid-template-columns:40px minmax(0,1fr) minmax(0,1fr) 40px!important;gap:6px!important}
 #reader:not(.screen-reader) footer.child-player #prevPage,#reader:not(.screen-reader) footer.child-player #nextPage{width:40px!important}
 #reader:not(.screen-reader) footer.child-player #narrationToggle,#reader:not(.screen-reader) footer.child-player #replayPage{font-size:13px!important;padding:0 4px!important;gap:4px!important}
 #reader:not(.screen-reader) footer.child-player #narrationToggle span:first-child,#reader:not(.screen-reader) footer.child-player #replayPage span:first-child{font-size:15px!important}
}

/* 전체 화면 = 휴대폰을 눕혔을 때와 같은 동화책 화면.
   휴대폰을 세운 채로 전체 화면을 누르면 책을 90도 돌려서 보여 준다(가로 고정이 되는 폰은 실제로 가로로 바뀐다). */
@media (max-width:600px) and (orientation:portrait){
 #reader.compact-reader.screen-reader{position:fixed;inset:0;padding:0;overflow:hidden;background:#fffdf5}
 #reader.compact-reader.screen-reader .reader-canvas{position:absolute!important;left:50%!important;top:50%!important;width:100dvh!important;height:100dvw!important;transform:translate(-50%,-50%) rotate(90deg)!important;container-type:size;display:grid!important;place-items:center;overflow:hidden!important;gap:0}
 #reader.compact-reader.screen-reader .spread,#reader.compact-reader.screen-reader.picture-only .spread{display:block!important;position:relative;width:min(100cqw,177.777cqh)!important;height:auto!important;max-height:100cqh!important;aspect-ratio:16/9!important;margin:0!important}
 #reader.compact-reader.screen-reader .spread .illustration{width:100%!important;height:100%!important;aspect-ratio:auto!important;padding:0}
 #reader.compact-reader.screen-reader .spread .illustration img{width:100%;height:100%!important;object-fit:cover}
 #reader.compact-reader.screen-reader .spread .caption-layer:not(.editing){display:block!important}
 #reader.compact-reader.screen-reader .spread .reading,#reader.compact-reader.screen-reader.movable-captions.picture-only.show-story-text .reading{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;overflow:hidden!important;clip-path:inset(50%)!important}
}
