
.yj-sta-textbook-layer{
  --yj-navy:#073b5c;
  --yj-blue:#0b7fb5;
  --yj-line:#d8e3e9;
  width:100%;
  margin:0 0 18px;
  border:1px solid var(--yj-line);
  background:#fff;
  color:#17384a;
  box-sizing:border-box;
  overflow:hidden;
}
.yj-sta-textbook-layer *{box-sizing:border-box}
.yj-sta-textbook-hidden-sync{display:none!important}

/* 교재는 위쪽에 아무 UI도 두지 않고 바로 시작. 오른쪽 프레임 폭을 최대한 사용 */
.yj-sta-textbook-stage{
  position:relative;
  width:100%;
  height:auto;
  min-height:0;
  padding:0;
  display:block;
  overflow:hidden;
  background:#d4dee3;
  cursor:default;
}
.yj-sta-textbook-pages{
  width:100%;
  display:block;
  filter:drop-shadow(0 3px 8px rgba(0,0,0,.08));
}
.yj-sta-textbook-page{
  margin:0!important;
  padding:0!important;
  width:100%;
  height:auto;
  min-width:0;
  min-height:0;
  background:#fff;
  display:block;
  overflow:hidden;
}
.yj-sta-textbook-page img{
  display:block;
  width:100%;
  height:auto;
  max-width:100%;
  max-height:none;
  margin:0;
  object-fit:contain;
  object-position:center top;
  user-select:none;
  -webkit-user-drag:none;
  background:#fff;
  image-rendering:auto;
}

.yj-sta-textbook-arrow{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  z-index:3;
  width:42px;
  height:78px;
  border:0;
  border-radius:4px;
  background:rgba(18,60,84,.70);
  color:#fff;
  font-size:31px;
  line-height:1;
  cursor:pointer;
  opacity:1;
  transition:opacity .28s ease, background .18s ease;
}
.yj-sta-textbook-arrow:hover{background:rgba(18,60,84,.86)}
.yj-sta-textbook-arrow.is-prev{left:4px}.yj-sta-textbook-arrow.is-next{right:4px}
.yj-sta-textbook-arrow:disabled{opacity:.18;cursor:default}
.yj-sta-textbook-stage.arrows-hidden .yj-sta-textbook-arrow{opacity:0!important;pointer-events:none}
.yj-sta-textbook-watermark{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none;color:rgba(23,65,89,.08);font-size:20px;font-weight:800;letter-spacing:.06em;transform:rotate(-20deg)}

/* 교재가 오른쪽 열을 차지 */
.yj-sta-textbook-layer.is-right-column{margin:0 0 18px;align-self:start;width:100%!important;max-width:none!important}

/* 동영상 아래 제어판 */
.yj-sta-video-controls{
  width:100%;
  min-height:54px;
  margin:0 0 0!important;
  padding:7px 10px;
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  border:1px solid #d7e3e9;
  border-top:0;
  background:#fff;
  color:#17384a;
}
.yj-sta-video-controls .yj-sta-speed-label{font-size:13px;font-weight:700;margin-right:2px;white-space:nowrap}
.yj-sta-video-controls button{
  min-width:70px;
  height:38px;
  padding:0 12px;
  border:1px solid #c9d9e1;
  background:#fff;
  color:#143e55;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
}
.yj-sta-video-controls button:hover{background:#f3f8fa}
.yj-sta-video-controls button.is-active{border-color:#0b7fb5;background:#edf7fb;color:#075b82}
.yj-sta-video-controls .yj-sta-speed-state{margin-left:auto;font-size:11px;color:#718894;white-space:nowrap}


.yj-sta-video-controls .yj-sta-video-fullscreen{
  min-width:84px;
  margin-left:2px;
  border-color:#8fb6ca;
  background:#f7fbfd;
  color:#0a5276;
}
.yj-sta-video-controls .yj-sta-video-fullscreen:hover{background:#eaf5fa}

/* 교재 더블클릭: 약간 큰 이동형 레이어 팝업 */
#yj-sta-book-modal.yj-sta-book-modal{
  position:fixed!important;
  inset:0!important;
  width:100vw!important;
  height:100vh!important;
  z-index:2147483647!important;
  display:none!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:rgba(3,16,25,.92)!important;
  backdrop-filter:blur(2px)!important;
  -webkit-backdrop-filter:blur(2px)!important;
  overflow:hidden!important;
  isolation:isolate!important;
  box-sizing:border-box!important;
  font-family:Arial,"Noto Sans KR",sans-serif!important;
}
#yj-sta-book-modal.yj-sta-book-modal.is-open{display:block!important}
#yj-sta-book-modal .yj-sta-book-modal-card{
  position:absolute!important;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:760px;
  max-width:calc(100vw - 56px)!important;
  max-height:calc(100vh - 44px)!important;
  margin:0!important;
  padding:0!important;
  background:#eef3f6!important;
  border:1px solid rgba(255,255,255,.45)!important;
  box-shadow:0 18px 60px rgba(0,0,0,.55)!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}
#yj-sta-book-modal .yj-sta-book-modal-head{
  height:42px!important;
  min-height:42px!important;
  padding:0 8px 0 14px!important;
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  background:#0b496c!important;
  color:#fff!important;
  cursor:grab!important;
  user-select:none!important;
  touch-action:none!important;
}
#yj-sta-book-modal .yj-sta-book-modal-card.is-dragging .yj-sta-book-modal-head{cursor:grabbing!important}
#yj-sta-book-modal .yj-sta-book-modal-title{font-size:13px!important;font-weight:700!important;letter-spacing:.01em!important;white-space:nowrap!important}
#yj-sta-book-modal .yj-sta-book-modal-hint{margin-left:auto!important;font-size:10px!important;font-weight:400!important;color:rgba(255,255,255,.72)!important;white-space:nowrap!important}
#yj-sta-book-modal .yj-sta-book-modal-close{
  flex:0 0 34px!important;
  width:34px!important;
  height:34px!important;
  margin:0!important;
  padding:0!important;
  border:1px solid rgba(255,255,255,.32)!important;
  background:rgba(255,255,255,.08)!important;
  color:#fff!important;
  font-size:22px!important;
  line-height:30px!important;
  text-align:center!important;
  cursor:pointer!important;
}
#yj-sta-book-modal .yj-sta-book-modal-body{
  position:relative!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:260px!important;
  max-height:calc(100vh - 104px)!important;
  padding:10px 50px 8px!important;
  overflow:auto!important;
  background:#d5e0e5!important;
  overscroll-behavior:contain!important;
}
#yj-sta-book-modal .yj-sta-book-modal-inner{
  position:relative!important;
  margin:0!important;
  padding:0!important;
  display:flex!important;
  align-items:flex-start!important;
  justify-content:center!important;
  width:auto!important;
  height:auto!important;
  overflow:visible!important;
}
#yj-sta-book-modal .yj-sta-book-modal-image{
  display:block!important;
  width:auto;
  height:auto!important;
  max-width:100%!important;
  max-height:calc(100vh - 126px)!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:#fff!important;
  box-shadow:0 8px 26px rgba(0,0,0,.24)!important;
  user-select:none!important;
  -webkit-user-drag:none!important;
  image-rendering:auto!important;
  filter:contrast(1.045) brightness(1.01)!important;
  transform:translateZ(0)!important;
}
#yj-sta-book-modal .yj-sta-book-modal-nav{
  position:absolute!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  z-index:3!important;
  width:36px!important;
  height:68px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:3px!important;
  background:rgba(13,69,98,.74)!important;
  color:#fff!important;
  font-size:28px!important;
  line-height:1!important;
  cursor:pointer!important;
}
#yj-sta-book-modal .yj-sta-book-modal-prev{left:7px!important}
#yj-sta-book-modal .yj-sta-book-modal-next{right:7px!important}
#yj-sta-book-modal .yj-sta-book-modal-nav:disabled{opacity:.22!important;cursor:default!important}
#yj-sta-book-modal .yj-sta-book-modal-status{
  height:28px!important;
  min-height:28px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  margin:0!important;
  padding:0 10px!important;
  background:#fff!important;
  border-top:1px solid #d7e3e9!important;
  color:#466272!important;
  font-size:11px!important;
  line-height:1!important;
  white-space:nowrap!important;
}
html.yj-sta-book-modal-open,body.yj-sta-book-modal-open{overflow:hidden!important}

@media(max-width:700px){
  #yj-sta-book-modal .yj-sta-book-modal-card{max-width:calc(100vw - 20px)!important;max-height:calc(100vh - 20px)!important}
  #yj-sta-book-modal .yj-sta-book-modal-hint{display:none!important}
  #yj-sta-book-modal .yj-sta-book-modal-body{padding:8px 38px 6px!important;max-height:calc(100vh - 92px)!important}
  #yj-sta-book-modal .yj-sta-book-modal-image{max-height:calc(100vh - 114px)!important}
  #yj-sta-book-modal .yj-sta-book-modal-nav{width:30px!important;height:58px!important;font-size:24px!important}
  #yj-sta-book-modal .yj-sta-book-modal-prev{left:4px!important}
  #yj-sta-book-modal .yj-sta-book-modal-next{right:4px!important}
}

/* 강의목록은 제어판 아래 */
.yj-sta-relocated-lecture-panel{
  width:100%!important;
  max-width:none!important;
  margin:0 0 22px!important;
  float:none!important;
  clear:both!important;
}
.yj-sta-relocated-lecture-panel > *{max-width:none!important}

/* 교재 아래 Q&A/AI 자리 */
.yj-sta-ai-board-slot{border-top:1px solid var(--yj-line);background:#fff}
.yj-sta-ai-board-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 13px;background:#f7fafb;border-bottom:1px solid var(--yj-line)}
.yj-sta-ai-board-head strong{font-size:14px;color:#0a3d5d}.yj-sta-ai-board-head span{font-size:10px;color:#78909b}
.yj-sta-ai-board-body{padding:13px}
.yj-sta-ai-board-body p{margin:0 0 10px!important;font-size:12px!important;line-height:1.55!important;color:#607986!important}
.yj-sta-ai-board-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.yj-sta-ai-board-actions button{min-height:36px;border:1px solid #c8d8e0;background:#f4f8fa;color:#78909b;font-size:12px;font-weight:700;cursor:not-allowed}

@media(max-width:820px){
  .yj-sta-video-controls{min-height:50px;padding:6px 8px;gap:6px}
  .yj-sta-video-controls button{min-width:62px;height:36px;padding:0 9px;font-size:12px}
  .yj-sta-video-controls .yj-sta-speed-state{display:none}
}
@media(max-width:540px){
  .yj-sta-textbook-arrow{width:34px;height:64px;font-size:27px}
  .yj-sta-video-controls .yj-sta-speed-label{width:100%;font-size:12px}
  .yj-sta-video-controls button{flex:1 1 58px;min-width:0}
  .yj-sta-ai-board-head{align-items:flex-start;flex-direction:column}
}

/* 진단 배지는 안정화 후 사용자 화면에서 숨김 */
.yj-sta-textbook-debug{display:none!important}


/* V0.3.4: 40~50대 수강생 가독성 개선 - 이동된 LearnDash 강의목록 */
.yj-sta-relocated-lecture-panel{
  font-size:15px!important;
  line-height:1.55!important;
}
.yj-sta-relocated-lecture-panel a,
.yj-sta-relocated-lecture-panel button,
.yj-sta-relocated-lecture-panel span,
.yj-sta-relocated-lecture-panel strong,
.yj-sta-relocated-lecture-panel p{
  line-height:1.5!important;
}
.yj-sta-relocated-lecture-panel a,
.yj-sta-relocated-lecture-panel button{
  font-size:14px!important;
}
.yj-sta-relocated-lecture-panel [class*="title"],
.yj-sta-relocated-lecture-panel [class*="lesson"] [class*="name"],
.yj-sta-relocated-lecture-panel [class*="topic"] [class*="name"],
.yj-sta-relocated-lecture-panel [class*="item"] [class*="name"]{
  font-size:16px!important;
  line-height:1.55!important;
}
.yj-sta-relocated-lecture-panel [class*="chapter"] strong,
.yj-sta-relocated-lecture-panel [class*="chapter"] [class*="title"]{
  font-size:17px!important;
}
.yj-sta-relocated-lecture-panel [class*="number"],
.yj-sta-relocated-lecture-panel [class*="index"],
.yj-sta-relocated-lecture-panel [class*="count"]{
  font-size:12px!important;
}
.yj-sta-textbook-stage,
.yj-sta-textbook-page,
.yj-sta-textbook-page img{
  cursor:default!important;
}

/* V0.5.4: 학습목표 바로 위 필수문제 1차 확인 박스 */
.yj-sta-required-problems{
  width:100%;
  box-sizing:border-box;
  margin:0 0 18px!important;
  padding:15px 16px;
  display:block;
  border:1px solid #d4e1e8;
  background:#f8fbfc;
  color:#17384a;
}
.yj-sta-required-problems-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.yj-sta-required-problems-copy strong{
  font-size:18px!important;
  line-height:1.35!important;
  color:#0a3d5d!important;
}
.yj-sta-required-problems-copy span{
  font-size:14px!important;
  line-height:1.5!important;
  color:#5d7480!important;
}
.yj-sta-required-problems-action{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:5px;
  margin-top:12px;
}
.yj-sta-required-problems-button{
  min-width:132px;
  min-height:42px;
  padding:0 17px;
  border:1px solid #0b78aa;
  background:#0b78aa;
  color:#fff;
  font-size:14px;
  font-weight:700;
  line-height:1;
  cursor:pointer;
}
.yj-sta-required-problems-button:hover,
.yj-sta-required-problems-button:focus{
  background:#096891;
  border-color:#096891;
  color:#fff;
}
.yj-sta-required-problems-message{
  min-height:15px;
  font-size:11px!important;
  line-height:1.35!important;
  color:#6e818b!important;
}
@media(max-width:700px){
  .yj-sta-required-problems{padding:13px 14px;}
  .yj-sta-required-problems-action{align-items:stretch;margin-top:10px;}
  .yj-sta-required-problems-button{width:100%;}
}
