/* PE-Class v1.15.54 — iPhone · Galaxy Z Fold7 홈 대시보드
 * 홈 표시 방식만 기기별로 재배치합니다. 수업 데이터·API·모달·PC·iPad 규칙은 변경하지 않습니다. */

/* iPhone 및 Fold7 접힘 화면: 오늘 수업 중심의 세로 카드 피드 */
.homeHero p{
  white-space:pre-line;
}

@media (max-width:920px) and (hover:none) and (pointer:coarse){
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) body.homeDashboardApp .pe87Main{
    background:#f3f7f5!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) body.homeDashboardApp #app{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    padding:10px!important;
    box-sizing:border-box!important;
    background:transparent!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) body.homeDashboardApp .ipadLessonCalendarOption{
    display:flex!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeDashboard{
    gap:10px!important;
    width:100%!important;
    max-width:100%!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeHero{
    display:block!important;
    min-height:0!important;
    border-radius:20px!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeHeroCopy{
    min-height:258px!important;
    padding:22px 20px 19px!important;
    box-sizing:border-box!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeHeroEyebrow{
    gap:7px!important;
    font-size:10px!important;
    letter-spacing:.08em!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeHeroEyebrow i{
    width:7px!important;
    height:7px!important;
    box-shadow:0 0 0 4px rgba(85,196,165,.12)!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeHero h1{
    max-width:calc(100% - 96px)!important;
    margin:15px 0 10px!important;
    font-size:29px!important;
    line-height:1.12!important;
    letter-spacing:-1.4px!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeHero p{
    display:-webkit-box!important;
    max-width:calc(100% - 94px)!important;
    overflow:hidden!important;
    font-size:11.5px!important;
    line-height:1.55!important;
    -webkit-box-orient:vertical!important;
    -webkit-line-clamp:3!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeHeroVisual{
    position:absolute!important;
    top:46px!important;
    right:12px!important;
    width:92px!important;
    height:108px!important;
    overflow:visible!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeHeroVisual::before{
    width:118px!important;
    height:118px!important;
    top:-12px!important;
    right:-19px!important;
    box-shadow:0 0 0 25px rgba(255,255,255,.018)!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeHeroVisual::after{
    width:86px!important;
    height:86px!important;
    top:4px!important;
    right:-2px!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeHeroOrbit{
    display:none!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeHeroDot{
    width:7px!important;
    height:7px!important;
    border-width:2px!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .dotOne{top:2px!important;right:13px!important}
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .dotTwo{top:49px!important;right:82px!important}
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .dotThree{top:93px!important;right:8px!important}
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeHeroCount{
    right:0!important;
    top:8px!important;
    width:88px!important;
    height:88px!important;
    gap:6px!important;
    border:1px solid rgba(184,218,236,.2)!important;
    border-radius:50%!important;
    background:rgba(255,255,255,.025)!important;
    transform:none!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeHeroCount strong{
    font-size:35px!important;
    letter-spacing:-1px!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeHeroCount span{
    font-size:10px!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeHeroActions{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    width:100%!important;
    margin-top:auto!important;
    padding-top:20px!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeHeroActions button{
    width:100%!important;
    min-width:0!important;
    min-height:44px!important;
    padding:0 9px!important;
    font-size:12px!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeMetrics{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:7px!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeMetrics article{
    min-height:82px!important;
    padding:11px 10px!important;
    border-radius:14px!important;
    text-align:center!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeMetrics span{
    font-size:9.5px!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeMetrics strong{
    margin-top:5px!important;
    font-size:25px!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeMetrics small{
    margin-top:5px!important;
    font-size:8.5px!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeDashboardGrid{
    grid-template-columns:minmax(0,1fr)!important;
    gap:10px!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeDashboardCard{
    border-radius:17px!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeScheduleColumns{
    grid-template-columns:minmax(0,1fr)!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeSchedulePane+.homeSchedulePane{
    border-top:1px solid #e3ebe7!important;
    border-left:0!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeSchedulePane>header,
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeDashboardCard>header{
    padding:17px 16px 10px!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeDashboardCard h2{
    font-size:19px!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeTodayList,
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeUpcomingList,
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeSportsList{
    max-height:none!important;
    padding:0 14px 14px!important;
    overflow:visible!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeTodayRow,
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeUpcomingRow{
    min-height:66px!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeUpcomingRow{
    grid-template-columns:44px 11px minmax(0,1fr)!important;
    gap:7px!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeUpcomingBadge{
    display:none!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeUpcomingInfo b{
    font-size:12.5px!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeUpcomingInfo small{
    font-size:10.5px!important;
  }
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeSportClasses{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

@media (max-width:390px) and (hover:none) and (pointer:coarse){
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeHeroCopy{min-height:270px!important;padding-right:17px!important;padding-left:17px!important}
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeHero h1{font-size:26px!important}
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeMetrics{gap:5px!important}
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeMetrics article{padding-right:6px!important;padding-left:6px!important}
  html:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide) .homeSportClasses{grid-template-columns:minmax(0,1fr)!important}
}

/* v1.15.58 — 연결된 날짜 표시와 모달 배경 위치 보존
 * body를 fixed 좌표로 이동하지 않고 현재 달력 위치에서 문서 스크롤만 잠급니다. */
html.calendarModalRootLocked{
  overflow:hidden!important;
  overscroll-behavior:none!important;
}
html.calendarModalRootLocked body.calendarModalPageLocked{
  position:static!important;
  top:auto!important;
  left:auto!important;
  right:auto!important;
  width:100%!important;
  overflow:hidden!important;
  overscroll-behavior:none!important;
}
html.calendarModalRootLocked body.calendarModalPageLocked.calendarModalUsesFixedLock{
  position:fixed!important;
  top:var(--calendar-modal-lock-top,0px)!important;
  left:0!important;
  right:0!important;
}
#calendarBox .calendarLinkedDateFocus{
  position:relative;
  z-index:3;
  border-color:#f59e0b!important;
  box-shadow:0 0 0 3px rgba(245,158,11,.82),0 8px 22px rgba(180,104,12,.18)!important;
  animation:calendarLinkedDatePulse .72s ease-out 2;
}
@keyframes calendarLinkedDatePulse{
  0%{box-shadow:0 0 0 0 rgba(245,158,11,.74),0 8px 22px rgba(180,104,12,.12)}
  100%{box-shadow:0 0 0 3px rgba(245,158,11,.82),0 8px 22px rgba(180,104,12,.18)}
}
@media (prefers-reduced-motion:reduce){
  #calendarBox .calendarLinkedDateFocus{animation:none}
}

/* iPhone 가로 화면과 Fold7 펼침 화면에서도 모달 뒤 페이지를 완전히 고정 */
html.pe87FoldWide body.calendarModalPageLocked,
html:not(.pe87Ipad):not(.pe87IpadRuntime) body.calendarModalPageLocked{
  position:fixed!important;
  left:0!important;
  right:0!important;
  width:100%!important;
  overflow:hidden!important;
  overscroll-behavior:none!important;
}

/* Fold7 펼침 화면: 넓은 내부 화면을 사용하는 2열 요약 레이아웃 */
@media (min-width:769px) and (max-width:1200px){
  html.pe87FoldWide .sideTabs{
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
  }
  html.pe87FoldWide body.homeDashboardApp .pe87Main{
    padding:10px 12px 18px!important;
    background:#f3f7f5!important;
  }
  html.pe87FoldWide body.homeDashboardApp #app{
    padding:10px!important;
    background:transparent!important;
  }
  html.pe87FoldWide .homeDashboard{
    gap:10px!important;
    max-width:100%!important;
  }
  html.pe87FoldWide .homeHero{
    grid-template-columns:minmax(0,1.2fr) minmax(210px,.8fr)!important;
    min-height:250px!important;
    border-radius:20px!important;
  }
  html.pe87FoldWide .homeHeroCopy{
    padding:28px 30px!important;
  }
  html.pe87FoldWide .homeHero h1{
    margin:14px 0 9px!important;
    font-size:33px!important;
    letter-spacing:-1.5px!important;
  }
  html.pe87FoldWide .homeHero p{
    max-width:490px!important;
    font-size:12px!important;
    line-height:1.6!important;
  }
  html.pe87FoldWide .homeHeroActions{
    margin-top:18px!important;
  }
  html.pe87FoldWide .homeHeroActions button{
    min-height:43px!important;
    padding:0 15px!important;
    font-size:12px!important;
  }
  html.pe87FoldWide .homeHeroVisual::before{right:-126px!important;top:-112px!important}
  html.pe87FoldWide .homeHeroVisual::after{right:-42px!important;top:0!important}
  html.pe87FoldWide .homeHeroCount{
    right:15px!important;
    transform:translateY(-50%) scale(.82)!important;
  }
  html.pe87FoldWide .homeMetrics{
    gap:8px!important;
  }
  html.pe87FoldWide .homeMetrics article{
    min-height:88px!important;
    padding:13px 16px!important;
  }
  html.pe87FoldWide .homeMetrics strong{font-size:27px!important}
  html.pe87FoldWide .homeDashboardGrid{
    grid-template-columns:minmax(0,1.32fr) minmax(270px,.68fr)!important;
    gap:10px!important;
  }
  html.pe87FoldWide .homeScheduleColumns{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  html.pe87FoldWide .homeSchedulePane>header,
  html.pe87FoldWide .homeDashboardCard>header{
    padding:17px 15px 10px!important;
  }
  html.pe87FoldWide .homeDashboardCard h2{font-size:18px!important}
  html.pe87FoldWide .homeTodayList,
  html.pe87FoldWide .homeUpcomingList,
  html.pe87FoldWide .homeSportsList{
    max-height:430px!important;
    padding:0 13px 13px!important;
  }
  html.pe87FoldWide .homeTodayRow,
  html.pe87FoldWide .homeUpcomingRow{
    min-height:64px!important;
  }
  html.pe87FoldWide .homeUpcomingRow{
    grid-template-columns:42px 10px minmax(0,1fr)!important;
    gap:6px!important;
  }
  html.pe87FoldWide .homeUpcomingBadge{display:none!important}
  html.pe87FoldWide .homeUpcomingInfo b{font-size:11.5px!important}
  html.pe87FoldWide .homeUpcomingInfo small{font-size:9.5px!important}
  html.pe87FoldWide .homeSportClasses{
    grid-template-columns:minmax(0,1fr)!important;
  }
}

/* 최종 잠금 우선순위: body 스크롤형 모바일은 fixed 좌표 보정을 사용하지 않습니다. */
html.calendarModalRootLocked body.calendarModalPageLocked:not(.calendarModalUsesFixedLock){
  position:static!important;
  top:auto!important;
  left:auto!important;
  right:auto!important;
}

/* v1.15.60 — iPad 달력 모달 배경 전체 보존
 * 스크롤된 문서를 fixed로 바꾸지 않아 달력 하단 행이 잘리지 않게 합니다.
 * 모달 내부만 세로 조작을 허용하고 배경 페이지의 터치 스크롤은 막습니다. */
html.pe87Ipad.calendarModalRootLocked body.calendarModalPageLocked,
html.pe87IpadRuntime.calendarModalRootLocked body.calendarModalPageLocked{
  position:static!important;
  top:auto!important;
  left:auto!important;
  right:auto!important;
  height:auto!important;
  min-height:100dvh!important;
  overflow:hidden!important;
}
html.pe87Ipad #calendarModal.calModal:not(.hidden),
html.pe87IpadRuntime #calendarModal.calModal:not(.hidden){
  touch-action:none!important;
}
html.pe87Ipad #calendarModal.calModal:not(.hidden) .calDialog,
html.pe87IpadRuntime #calendarModal.calModal:not(.hidden) .calDialog{
  touch-action:pan-y!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch;
}
