/* PE-Class v1.14.35 — iPad 전용 레이아웃
 * pe87Ipad 클래스가 확인된 iPadOS Safari에서만 적용합니다.
 * 768px 이하의 기존 모바일 UI와 일반 PC/Android에는 적용되지 않습니다.
 */
@media (min-width:769px) and (max-width:1366px){
  html.pe87Ipad{
    -webkit-text-size-adjust:100%;
    text-size-adjust:100%;
    --ipad-safe-left:env(safe-area-inset-left,0px);
    --ipad-safe-right:env(safe-area-inset-right,0px);
  }
  html.pe87Ipad body{
    min-height:100dvh;
    overscroll-behavior-y:none;
  }
  html.pe87Ipad button,
  html.pe87Ipad input,
  html.pe87Ipad select,
  html.pe87Ipad textarea{
    touch-action:manipulation;
    -webkit-tap-highlight-color:transparent;
  }
  html.pe87Ipad input,
  html.pe87Ipad select,
  html.pe87Ipad textarea{
    font-size:16px!important;
  }
  html.pe87Ipad .btn,
  html.pe87Ipad .miniBtn,
  html.pe87Ipad .tab{
    min-height:44px;
  }
  html.pe87Ipad .pe87Top{
    height:76px!important;
    padding-left:calc(16px + var(--ipad-safe-left));
    padding-right:calc(16px + var(--ipad-safe-right));
    gap:12px;
  }
  html.pe87Ipad .pe87Logo{width:52px!important;height:52px!important}
  html.pe87Ipad .pe87Title strong{font-size:16px!important}
  html.pe87Ipad .pe87Title b{font-size:21px!important}
  html.pe87Ipad .pe87Brand{min-width:0;flex:1 1 auto}
  html.pe87Ipad .pe87UserTools{gap:6px;flex:0 0 auto}
  html.pe87Ipad .pe87User{display:none}
  html.pe87Ipad .miniBtn{padding:8px 9px;font-size:11px;white-space:nowrap}
  html.pe87Ipad .pe87Main{min-width:0;padding:12px!important}
  html.pe87Ipad #app{min-width:0;padding:16px!important;min-height:calc(100dvh - 116px)}
  html.pe87Ipad .panel,
  html.pe87Ipad .detail,
  html.pe87Ipad .list,
  html.pe87Ipad .adminCard{min-width:0}
  html.pe87Ipad .tableWrap,
  html.pe87Ipad .papsTableWrap,
  html.pe87Ipad .assessmentTableWrap,
  html.pe87Ipad .progressTableWrap,
  html.pe87Ipad .clubStatsWrap,
  html.pe87Ipad .clubMemberTableWrap{
    max-width:100%;
    overflow:auto!important;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior:contain;
  }
  html.pe87Ipad .modalBackdrop,
  html.pe87Ipad .calModal,
  html.pe87Ipad .pdfCropModal{
    padding-left:calc(18px + var(--ipad-safe-left));
    padding-right:calc(18px + var(--ipad-safe-right));
  }
  html.pe87Ipad .modalCard,
  html.pe87Ipad .calDialog{
    max-width:min(860px,calc(100vw - 48px));
    max-height:calc(100dvh - 48px);
    overflow:auto;
    -webkit-overflow-scrolling:touch;
  }
  html.pe87Ipad .formGrid,
  html.pe87Ipad .grid2{gap:12px}
  html.pe87Ipad textarea{min-height:92px!important;resize:vertical}
  html.pe87Ipad .calendarHeader{gap:10px}
  html.pe87Ipad .calDay{min-height:112px!important}
  html.pe87Ipad .clubCalDay{min-height:110px!important}
  html.pe87Ipad .studentList{max-height:calc(100dvh - 270px)!important}
  html.pe87Ipad .photoRosterDialog{max-width:calc(100vw - 40px);height:calc(100dvh - 40px)}
  html.pe87Ipad .pdfCropDialog{max-width:calc(100vw - 36px);height:calc(100dvh - 36px)}
  html.pe87Ipad .assessCards{grid-template-columns:repeat(2,minmax(0,1fr))}
  html.pe87Ipad .adminGridBalanced,
  html.pe87Ipad .adminMasterGrid,
  html.pe87Ipad .adminOpsGridWithSchool{gap:12px!important}
}

/* iPad 세로 화면과 11인치 Split View의 넓은 구간: 좌측 메뉴를 상단 가로 메뉴로 전환 */
@media (min-width:769px) and (max-width:1100px){
  html.pe87Ipad .pe87Shell{display:block!important;min-height:calc(100dvh - 76px)!important}
  html.pe87Ipad .pe87Side{
    position:sticky!important;
    top:76px!important;
    height:auto!important;
    padding:9px 12px!important;
    border-right:0!important;
    border-bottom:1px solid #d9e1ea!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
    background:#fff!important;
  }
  html.pe87Ipad .pe87Side::-webkit-scrollbar{display:none}
  html.pe87Ipad .sideTabs{
    flex-direction:row!important;
    width:max-content!important;
    min-width:100%!important;
    gap:8px!important;
    overflow:visible!important;
  }
  html.pe87Ipad .sideTabs .tab{
    width:auto!important;
    min-width:max-content!important;
    height:44px!important;
    padding:0 14px!important;
    font-size:14px!important;
    white-space:nowrap!important;
  }
  html.pe87Ipad .sideTree{display:none!important}
  html.pe87Ipad .pe87Main{padding:10px!important}
  html.pe87Ipad #app{padding:14px!important;min-height:calc(100dvh - 150px)}
  html.pe87Ipad .grid,
  html.pe87Ipad .studentWaitingGrid{grid-template-columns:minmax(250px,34%) minmax(0,1fr)!important}
  html.pe87Ipad .field2{grid-template-columns:1fr 1fr!important}
  html.pe87Ipad .profile{align-items:flex-start}
  html.pe87Ipad .photo{width:132px!important;height:154px!important;flex:0 0 auto}
  html.pe87Ipad .adminGridBalanced,
  html.pe87Ipad .adminMasterGrid,
  html.pe87Ipad .adminOpsGridWithSchool{grid-template-columns:1fr!important}
  html.pe87Ipad .adminSubjectCard,
  html.pe87Ipad .adminSemesterCard,
  html.pe87Ipad .adminPlaceCard,
  html.pe87Ipad .adminSchoolCard{grid-column:auto!important}
  html.pe87Ipad .classGrid{grid-template-columns:repeat(4,minmax(0,1fr))}
  html.pe87Ipad .clubPcTopGrid{grid-template-columns:1fr 1fr!important}
  html.pe87Ipad .clubPcTopGrid>.clubPcTopCard{height:500px;min-height:500px;max-height:500px}
  html.pe87Ipad .clubPcTopGrid>.clubPcTopCard:last-child{grid-column:1/-1;height:auto;min-height:430px;max-height:none}
  html.pe87Ipad .pe87PageHead{gap:10px;flex-wrap:wrap}
  html.pe87Ipad .pe87PageHead .row{flex-wrap:wrap}
}

/* iPad 가로 전체 화면: PC 구조는 유지하되 사이드바와 본문 비율만 태블릿에 맞춤 */
@media (min-width:1101px) and (max-width:1366px){
  html.pe87Ipad .pe87Shell{grid-template-columns:225px minmax(0,1fr)!important}
  html.pe87Ipad .pe87Side{top:76px!important;height:calc(100dvh - 76px)!important;padding:13px 11px!important}
  html.pe87Ipad .sideTabs .tab{height:44px!important;font-size:14px!important;padding:0 12px!important}
  html.pe87Ipad .treeYear,
  html.pe87Ipad .treeSemester,
  html.pe87Ipad .treeItem{height:32px!important;font-size:13px!important}
  html.pe87Ipad .grid{grid-template-columns:270px minmax(0,1fr)!important}
  html.pe87Ipad .clubPcTopGrid{gap:12px}
  html.pe87Ipad .clubPcTopGrid>.clubPcTopCard{padding:14px!important}
}

/* 외장/화면 키보드가 올라온 iPad에서 하단 버튼이 가려지지 않도록 */
@media (min-width:769px) and (max-width:1366px) and (max-height:700px){
  html.pe87Ipad .pe87Top{position:relative!important}
  html.pe87Ipad .pe87Side{top:0!important;position:relative!important}
  html.pe87Ipad .studentList{max-height:42vh!important}
  html.pe87Ipad .modalCard,
  html.pe87Ipad .calDialog{max-height:calc(100dvh - 20px)}
  html.pe87Ipad .progressActions,
  html.pe87Ipad .assessmentActions,
  html.pe87Ipad .clubActions{position:relative;z-index:2}
}

/* PE-Class v1.14.36 — iPad 표·날짜 컨트롤 정밀 보정
 * html.pe87Ipad 안에서만 동작하여 일반 PC와 768px 이하 모바일에는 영향을 주지 않습니다.
 */
@media (min-width:769px) and (max-width:1366px){
  /* 학교스포츠클럽 QR 날짜: Safari native date의 고유 최소 폭을 카드 안으로 제한 */
  html.pe87Ipad .clubQrPanel{
    min-width:0!important;
    overflow:hidden!important;
  }
  html.pe87Ipad .clubQrPanel .formGrid,
  html.pe87Ipad .clubQrPanel .formGrid label{
    min-width:0!important;
  }
  html.pe87Ipad .clubQrPanel #clubQrDate{
    display:block!important;
    inline-size:100%!important;
    min-inline-size:0!important;
    max-inline-size:100%!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:46px!important;
    padding:0 10px!important;
    box-sizing:border-box!important;
    text-align:center!important;
  }
  html.pe87Ipad .clubQrPanel #clubQrDate::-webkit-date-and-time-value{
    min-width:0!important;
    text-align:center!important;
  }

  /* 출석 입력: 날짜·시간대·조회·저장을 같은 너비와 높이로 정렬 */
  html.pe87Ipad .clubAttendancePanel .attendanceControls{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    align-items:end!important;
    gap:12px!important;
    width:100%!important;
  }
  html.pe87Ipad .clubAttendancePanel .attendanceControls>label,
  html.pe87Ipad .clubAttendancePanel .attendanceControls>.btn{
    width:100%!important;
    min-width:0!important;
    margin:0!important;
  }
  html.pe87Ipad .clubAttendancePanel .attendanceControls input,
  html.pe87Ipad .clubAttendancePanel .attendanceControls select,
  html.pe87Ipad .clubAttendancePanel .attendanceControls>.btn{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:48px!important;
    min-height:48px!important;
    box-sizing:border-box!important;
  }
  html.pe87Ipad .clubAttendancePanel #clubAttDate{
    padding-left:8px!important;
    padding-right:8px!important;
    text-align:center!important;
  }
  html.pe87Ipad .clubAttendancePanel #clubAttDate::-webkit-date-and-time-value{
    min-width:0!important;
    text-align:center!important;
  }

  /* 스포츠클럽 출석 현황: 13개 열을 iPad 본문 폭에 맞춰 고정 */
  html.pe87Ipad .clubAttendancePanel .tableScroll{
    width:100%!important;
    max-width:100%!important;
    overflow-x:hidden!important;
  }
  html.pe87Ipad .clubAttendancePanel .clubAttendanceTable{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    table-layout:fixed!important;
    font-size:10px!important;
  }
  html.pe87Ipad .clubAttendanceTable th,
  html.pe87Ipad .clubAttendanceTable td{
    min-width:0!important;
    width:auto!important;
    padding:7px 3px!important;
    white-space:normal!important;
    overflow:hidden!important;
    overflow-wrap:anywhere!important;
    word-break:keep-all!important;
    line-height:1.25!important;
  }
  html.pe87Ipad .clubAttendanceTable th:nth-child(1){width:4%!important}
  html.pe87Ipad .clubAttendanceTable th:nth-child(2){width:6%!important}
  html.pe87Ipad .clubAttendanceTable th:nth-child(3){width:7%!important}
  html.pe87Ipad .clubAttendanceTable th:nth-child(4){width:10%!important}
  html.pe87Ipad .clubAttendanceTable th:nth-child(5){width:10%!important}
  html.pe87Ipad .clubAttendanceTable th:nth-child(6){width:18%!important}
  html.pe87Ipad .clubAttendanceTable th:nth-child(7){width:9%!important}
  html.pe87Ipad .clubAttendanceTable th:nth-child(8){width:7%!important}
  html.pe87Ipad .clubAttendanceTable th:nth-child(n+9){width:5.8%!important}
  html.pe87Ipad .clubAttendanceTable input,
  html.pe87Ipad .clubAttendanceTable select,
  html.pe87Ipad .clubAttendanceTable .attStatus,
  html.pe87Ipad .clubAttendanceTable .attMemo{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:40px!important;
    padding:5px 4px!important;
    font-size:10px!important;
    box-sizing:border-box!important;
  }

  /* PAPS 현황: 12개 열을 화면 안에 맞추고 내부 입력 크기를 함께 축소 */
  html.pe87Ipad #papsTableBox{
    width:100%!important;
    max-width:100%!important;
    overflow-x:hidden!important;
  }
  html.pe87Ipad #papsTableBox .pe87Paps{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    table-layout:fixed!important;
    font-size:10px!important;
  }
  html.pe87Ipad .pe87Paps th,
  html.pe87Ipad .pe87Paps td{
    min-width:0!important;
    padding:6px 2px!important;
    white-space:normal!important;
    overflow:hidden!important;
    overflow-wrap:anywhere!important;
    line-height:1.2!important;
  }
  html.pe87Ipad .pe87Paps th:nth-child(1){width:4%!important}
  html.pe87Ipad .pe87Paps th:nth-child(2){width:7%!important}
  html.pe87Ipad .pe87Paps th:nth-child(3){width:6%!important}
  html.pe87Ipad .pe87Paps th:nth-child(4){width:7%!important}
  html.pe87Ipad .pe87Paps th:nth-child(5){width:13%!important}
  html.pe87Ipad .pe87Paps th:nth-child(6){width:14%!important}
  html.pe87Ipad .pe87Paps th:nth-child(7){width:13%!important}
  html.pe87Ipad .pe87Paps th:nth-child(8){width:7%!important}
  html.pe87Ipad .pe87Paps th:nth-child(9){width:7%!important}
  html.pe87Ipad .pe87Paps th:nth-child(10){width:9%!important}
  html.pe87Ipad .pe87Paps th:nth-child(11){width:7%!important}
  html.pe87Ipad .pe87Paps th:nth-child(12){width:6%!important}
  html.pe87Ipad .pe87Paps .papsInput{
    width:100%!important;
    min-width:0!important;
    max-width:48px!important;
    height:36px!important;
    padding:3px!important;
    font-size:11px!important;
    box-sizing:border-box!important;
  }
  html.pe87Ipad .pe87Paps .dual,
  html.pe87Ipad .pe87Paps .quad{
    width:100%!important;
    max-width:104px!important;
    gap:2px!important;
  }
  html.pe87Ipad .pe87Paps .genderToggle{
    max-width:100%!important;
    padding:4px 5px!important;
    font-size:10px!important;
    white-space:nowrap!important;
  }
  html.pe87Ipad .pe87Paps .papsGrade,
  html.pe87Ipad .pe87Paps .overallGradeBadge{
    max-width:100%!important;
    padding:3px 4px!important;
    font-size:9px!important;
    white-space:normal!important;
    line-height:1.15!important;
  }
  html.pe87Ipad .pe87Paps .bmiValue,
  html.pe87Ipad .pe87Paps .summaryScore,
  html.pe87Ipad .pe87Paps .summaryGrade{
    font-size:10px!important;
  }

  /* 종목별 진도표: 여섯 열을 카드 폭 안에 고정 */
  html.pe87Ipad #subjectPlanBox{
    width:100%!important;
    max-width:100%!important;
    overflow-x:hidden!important;
  }
  html.pe87Ipad #subjectPlanBox .pe87SubjectPlan{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    table-layout:fixed!important;
    font-size:12px!important;
  }
  html.pe87Ipad .pe87SubjectPlan th,
  html.pe87Ipad .pe87SubjectPlan td{
    min-width:0!important;
    padding:7px 6px!important;
    white-space:normal!important;
    overflow:hidden!important;
    overflow-wrap:anywhere!important;
  }
  html.pe87Ipad .pe87SubjectPlan th:nth-child(1){width:4%!important}
  html.pe87Ipad .pe87SubjectPlan th:nth-child(2){width:6%!important}
  html.pe87Ipad .pe87SubjectPlan th:nth-child(3){width:19%!important}
  html.pe87Ipad .pe87SubjectPlan th:nth-child(4){width:21%!important}
  html.pe87Ipad .pe87SubjectPlan th:nth-child(5){width:29%!important}
  html.pe87Ipad .pe87SubjectPlan th:nth-child(6){width:21%!important}
  html.pe87Ipad .pe87SubjectPlan input,
  html.pe87Ipad .pe87SubjectPlan textarea{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    padding:7px 8px!important;
    font-size:13px!important;
    box-sizing:border-box!important;
  }
}


/* PE-Class v1.14.37 — iPad 실기기 최종 보정
 * 이 블록은 iPad 식별 클래스가 존재할 때만 적용되고, 모든 일반 PC/아이폰/갤럭시에는 적용되지 않습니다.
 * 768px iPad viewport도 포함하며, 파일을 모든 PC/모바일 스타일 뒤에서 로드해 우선순위를 보장합니다.
 */
@media (min-width:700px) and (max-width:1366px){
  html.pe87Ipad #app,
  html.pe87Ipad #app > *,
  html.pe87Ipad .panel,
  html.pe87Ipad .clubPcTopGrid,
  html.pe87Ipad .clubPcTopCard{
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }

  /* QR 출석 날짜 — Safari native date input의 intrinsic width를 강제로 카드 내부에 고정 */
  html.pe87Ipad .clubQrPanel{overflow:hidden!important}
  html.pe87Ipad .clubQrPanel .formGrid{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }
  html.pe87Ipad .clubQrPanel .formGrid label{
    display:grid!important;
    grid-template-columns:82px minmax(0,1fr)!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
  }
  html.pe87Ipad .clubQrPanel #clubQrDate{
    -webkit-appearance:none!important;
    appearance:none!important;
    display:block!important;
    inline-size:0!important;
    width:0!important;
    min-inline-size:100%!important;
    min-width:100%!important;
    max-inline-size:100%!important;
    max-width:100%!important;
    height:46px!important;
    padding:0 8px!important;
    margin:0!important;
    box-sizing:border-box!important;
    font-size:16px!important;
    text-align:center!important;
    overflow:hidden!important;
  }
  html.pe87Ipad .clubQrPanel #clubQrDate::-webkit-date-and-time-value{
    min-width:0!important;
    width:100%!important;
    padding:0!important;
    text-align:center!important;
  }

  /* 출석 입력 — 날짜/시간대/조회/저장 동일 크기 */
  html.pe87Ipad .clubAttendancePanel .attendanceControls{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:12px!important;
    align-items:end!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    flex-wrap:nowrap!important;
  }
  html.pe87Ipad .clubAttendancePanel .attendanceControls > label,
  html.pe87Ipad .clubAttendancePanel .attendanceControls > .btn{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    box-sizing:border-box!important;
  }
  html.pe87Ipad .clubAttendancePanel .attendanceControls input,
  html.pe87Ipad .clubAttendancePanel .attendanceControls select,
  html.pe87Ipad .clubAttendancePanel .attendanceControls > .btn{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:48px!important;
    min-height:48px!important;
    padding:0 8px!important;
    box-sizing:border-box!important;
    font-size:15px!important;
  }
  html.pe87Ipad .clubAttendancePanel #clubAttDate{
    -webkit-appearance:none!important;
    appearance:none!important;
    text-align:center!important;
  }

  /* 스포츠클럽 출석 현황 — 13열을 카드 안에 완전히 수용 */
  html.pe87Ipad .clubAttendancePanel .tableScroll{
    width:100%!important;
    max-width:100%!important;
    overflow-x:hidden!important;
    overscroll-behavior-x:none!important;
  }
  html.pe87Ipad .clubAttendancePanel table.clubAttendanceTable.dataTable{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    table-layout:fixed!important;
    border-collapse:collapse!important;
    font-size:9px!important;
  }
  html.pe87Ipad .clubAttendancePanel table.clubAttendanceTable th,
  html.pe87Ipad .clubAttendancePanel table.clubAttendanceTable td{
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    padding:6px 2px!important;
    white-space:normal!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
    line-height:1.15!important;
  }
  html.pe87Ipad .clubAttendancePanel table.clubAttendanceTable th:nth-child(1){width:4%!important}
  html.pe87Ipad .clubAttendancePanel table.clubAttendanceTable th:nth-child(2){width:6%!important}
  html.pe87Ipad .clubAttendancePanel table.clubAttendanceTable th:nth-child(3){width:8%!important}
  html.pe87Ipad .clubAttendancePanel table.clubAttendanceTable th:nth-child(4){width:9%!important}
  html.pe87Ipad .clubAttendancePanel table.clubAttendanceTable th:nth-child(5){width:10%!important}
  html.pe87Ipad .clubAttendancePanel table.clubAttendanceTable th:nth-child(6){width:17%!important}
  html.pe87Ipad .clubAttendancePanel table.clubAttendanceTable th:nth-child(7){width:8%!important}
  html.pe87Ipad .clubAttendancePanel table.clubAttendanceTable th:nth-child(8){width:7%!important}
  html.pe87Ipad .clubAttendancePanel table.clubAttendanceTable th:nth-child(n+9){width:6.2%!important}
  html.pe87Ipad .clubAttendancePanel table.clubAttendanceTable input,
  html.pe87Ipad .clubAttendancePanel table.clubAttendanceTable select,
  html.pe87Ipad .clubAttendancePanel table.clubAttendanceTable .attStatus,
  html.pe87Ipad .clubAttendancePanel table.clubAttendanceTable .attMemo{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:36px!important;
    padding:3px 2px!important;
    font-size:9px!important;
    box-sizing:border-box!important;
  }

  /* PAPS 상단 제목과 모든 버튼을 한 줄로 */
  html.pe87Ipad .papsDashboardHead{
    display:flex!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
  }
  html.pe87Ipad .papsDashboardHead h2{
    flex:0 1 auto!important;
    min-width:0!important;
    margin:0!important;
    font-size:clamp(13px,1.5vw,18px)!important;
    line-height:1.2!important;
    white-space:nowrap!important;
    letter-spacing:-.5px!important;
  }
  html.pe87Ipad .papsDashboardHead > .row{
    display:flex!important;
    flex:1 1 auto!important;
    min-width:0!important;
    flex-wrap:nowrap!important;
    justify-content:flex-end!important;
    gap:5px!important;
  }
  html.pe87Ipad .papsDashboardHead > .row .btn{
    flex:1 1 0!important;
    min-width:0!important;
    max-width:none!important;
    min-height:42px!important;
    height:42px!important;
    padding:5px 6px!important;
    margin:0!important;
    font-size:clamp(9px,1vw,12px)!important;
    line-height:1.05!important;
    white-space:nowrap!important;
    letter-spacing:-.4px!important;
  }

  /* PAPS 표 — 강제 min-width를 무효화하고 12열을 화면에 맞춤 */
  html.pe87Ipad #papsTableBox.tableWrap{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    overflow-x:hidden!important;
  }
  html.pe87Ipad #papsTableBox table.pe87Paps.dataTable,
  html.pe87Ipad #papsTableBox table.papsTable{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    table-layout:fixed!important;
    font-size:9px!important;
  }
  html.pe87Ipad #papsTableBox table.pe87Paps th,
  html.pe87Ipad #papsTableBox table.pe87Paps td{
    min-width:0!important;
    max-width:none!important;
    padding:5px 2px!important;
    white-space:normal!important;
    overflow:hidden!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
    line-height:1.1!important;
  }
  html.pe87Ipad #papsTableBox .papsInput{
    width:100%!important;
    min-width:0!important;
    max-width:46px!important;
    height:34px!important;
    margin:1px auto!important;
    padding:2px!important;
    font-size:10px!important;
    box-sizing:border-box!important;
  }
  html.pe87Ipad #papsTableBox .dual,
  html.pe87Ipad #papsTableBox .quad{
    width:100%!important;
    min-width:0!important;
    max-width:96px!important;
    gap:2px!important;
    margin:0 auto!important;
  }
  html.pe87Ipad #papsTableBox .genderToggle{padding:3px 4px!important;font-size:9px!important}
  html.pe87Ipad #papsTableBox .papsGrade,
  html.pe87Ipad #papsTableBox .overallGradeBadge{padding:2px 3px!important;font-size:8px!important;white-space:normal!important}

  /* 종목별 진도표 — 선택 대기 표와 실제 입력 표 모두 카드 안에 고정 */
  html.pe87Ipad #subjectPlanBox,
  html.pe87Ipad #app .panel:has(> table.pe87SubjectPlan){
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    overflow-x:hidden!important;
    box-sizing:border-box!important;
  }
  html.pe87Ipad #app table.pe87SubjectPlan.dataTable{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    table-layout:fixed!important;
    font-size:11px!important;
  }
  html.pe87Ipad #app table.pe87SubjectPlan th,
  html.pe87Ipad #app table.pe87SubjectPlan td{
    min-width:0!important;
    max-width:none!important;
    padding:6px 5px!important;
    white-space:normal!important;
    overflow:hidden!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
    box-sizing:border-box!important;
  }
  html.pe87Ipad #app table.pe87SubjectPlan th:nth-child(1){width:4%!important}
  html.pe87Ipad #app table.pe87SubjectPlan th:nth-child(2){width:7%!important}
  html.pe87Ipad #app table.pe87SubjectPlan th:nth-child(3){width:19%!important}
  html.pe87Ipad #app table.pe87SubjectPlan th:nth-child(4){width:21%!important}
  html.pe87Ipad #app table.pe87SubjectPlan th:nth-child(5){width:29%!important}
  html.pe87Ipad #app table.pe87SubjectPlan th:nth-child(6){width:20%!important}
  html.pe87Ipad #app table.pe87SubjectPlan input,
  html.pe87Ipad #app table.pe87SubjectPlan textarea{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    font-size:12px!important;
    padding:6px!important;
  }
}

/* 768px iPad에서 기존 모바일용 media query와 충돌하더라도 iPad 표는 PC형 압축 레이아웃을 유지 */
@media (width:768px){
  html.pe87Ipad #app .papsDashboardHead,
  html.pe87Ipad #app table.pe87SubjectPlan,
  html.pe87Ipad #app table.pe87Paps,
  html.pe87Ipad #app table.clubAttendanceTable{display:table!important}
}

/* PE-Class v1.14.38 — iPadOS 실기기 강제 적용 보정
 * pe87Ipad 판별과 별개로 iPadOS Safari의 터치 전용 CSS feature에서도 적용됩니다.
 * 769px 이상 Apple touch viewport만 대상으로 하므로 일반 PC/아이폰/갤럭시는 제외됩니다.
 */
@media (min-width:769px) and (max-width:1366px) {
@supports (-webkit-touch-callout:none) {
  /* 공통: iPad Safari 내부 요소가 부모 폭을 밀어내지 못하게 제한 */
  #app, #app > *, #app .panel, #app .tableWrap, #app .tableScroll,
  .clubPcTopGrid, .clubPcTopCard, .clubQrPanel, .clubAttendancePanel {
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }

  /* 1. QR 출석 날짜 칸 */
  .clubQrPanel { overflow:hidden!important; }
  .clubQrPanel .formGrid,
  .clubQrPanel .formGrid label {
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }
  .clubQrPanel .formGrid label {
    grid-template-columns:92px minmax(0,1fr)!important;
    overflow:hidden!important;
  }
  .clubQrPanel #clubQrDate {
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    inline-size:100%!important;
    min-inline-size:0!important;
    max-inline-size:100%!important;
    height:46px!important;
    min-height:46px!important;
    padding:0 6px!important;
    margin:0!important;
    box-sizing:border-box!important;
    font-size:15px!important;
    letter-spacing:-.4px!important;
    text-align:center!important;
    overflow:hidden!important;
  }
  .clubQrPanel #clubQrDate::-webkit-date-and-time-value {
    width:100%!important;
    min-width:0!important;
    padding:0!important;
    text-align:center!important;
  }

  /* 2. 출석 입력 날짜/시간대/조회/저장 동일 크기 */
  .clubAttendancePanel .attendanceControls {
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    align-items:end!important;
    gap:12px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    flex-wrap:nowrap!important;
  }
  .clubAttendancePanel .attendanceControls > label,
  .clubAttendancePanel .attendanceControls > .btn {
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    box-sizing:border-box!important;
  }
  .clubAttendancePanel .attendanceControls input,
  .clubAttendancePanel .attendanceControls select,
  .clubAttendancePanel .attendanceControls > .btn {
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:48px!important;
    min-height:48px!important;
    max-height:48px!important;
    padding:0 8px!important;
    margin:0!important;
    box-sizing:border-box!important;
    font-size:15px!important;
    line-height:48px!important;
  }
  .clubAttendancePanel #clubAttDate {
    display:block!important;
    inline-size:100%!important;
    min-inline-size:0!important;
    text-align:center!important;
  }
  .clubAttendancePanel #clubAttDate::-webkit-date-and-time-value {
    width:100%!important;
    min-width:0!important;
    padding:0!important;
    text-align:center!important;
  }

  /* 3. 학교스포츠클럽 출석 현황: 13열 전체를 카드 안에 배치 */
  .clubAttendancePanel .tableScroll {
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    overflow-x:hidden!important;
    overscroll-behavior-x:none!important;
  }
  .clubAttendancePanel table.clubAttendanceTable.dataTable {
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    table-layout:fixed!important;
    border-collapse:collapse!important;
    font-size:9px!important;
  }
  .clubAttendancePanel table.clubAttendanceTable th,
  .clubAttendancePanel table.clubAttendanceTable td {
    min-width:0!important;
    max-width:none!important;
    padding:5px 2px!important;
    white-space:normal!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
    line-height:1.1!important;
    box-sizing:border-box!important;
  }
  .clubAttendancePanel table.clubAttendanceTable th:nth-child(1),
  .clubAttendancePanel table.clubAttendanceTable td:nth-child(1){width:4%!important}
  .clubAttendancePanel table.clubAttendanceTable th:nth-child(2),
  .clubAttendancePanel table.clubAttendanceTable td:nth-child(2){width:6%!important}
  .clubAttendancePanel table.clubAttendanceTable th:nth-child(3),
  .clubAttendancePanel table.clubAttendanceTable td:nth-child(3){width:8%!important}
  .clubAttendancePanel table.clubAttendanceTable th:nth-child(4),
  .clubAttendancePanel table.clubAttendanceTable td:nth-child(4){width:9%!important}
  .clubAttendancePanel table.clubAttendanceTable th:nth-child(5),
  .clubAttendancePanel table.clubAttendanceTable td:nth-child(5){width:10%!important}
  .clubAttendancePanel table.clubAttendanceTable th:nth-child(6),
  .clubAttendancePanel table.clubAttendanceTable td:nth-child(6){width:16%!important}
  .clubAttendancePanel table.clubAttendanceTable th:nth-child(7),
  .clubAttendancePanel table.clubAttendanceTable td:nth-child(7){width:8%!important}
  .clubAttendancePanel table.clubAttendanceTable th:nth-child(8),
  .clubAttendancePanel table.clubAttendanceTable td:nth-child(8){width:7%!important}
  .clubAttendancePanel table.clubAttendanceTable th:nth-child(n+9),
  .clubAttendancePanel table.clubAttendanceTable td:nth-child(n+9){width:6.4%!important}
  .clubAttendancePanel table.clubAttendanceTable input,
  .clubAttendancePanel table.clubAttendanceTable select,
  .clubAttendancePanel table.clubAttendanceTable .attStatus,
  .clubAttendancePanel table.clubAttendanceTable .attMemo {
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:34px!important;
    padding:2px!important;
    font-size:9px!important;
    box-sizing:border-box!important;
  }

  /* 4. PAPS 표: 가로 스크롤 없이 전체 열 표시 */
  #papsTableBox.tableWrap {
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    overflow-x:hidden!important;
  }
  #papsTableBox table.pe87Paps.dataTable {
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    table-layout:fixed!important;
    font-size:9px!important;
  }
  #papsTableBox table.pe87Paps th,
  #papsTableBox table.pe87Paps td {
    min-width:0!important;
    max-width:none!important;
    padding:4px 2px!important;
    white-space:normal!important;
    overflow:hidden!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
    line-height:1.08!important;
    box-sizing:border-box!important;
  }
  #papsTableBox table.pe87Paps th:nth-child(1),#papsTableBox table.pe87Paps td:nth-child(1){width:4.5%!important}
  #papsTableBox table.pe87Paps th:nth-child(2),#papsTableBox table.pe87Paps td:nth-child(2){width:7%!important}
  #papsTableBox table.pe87Paps th:nth-child(3),#papsTableBox table.pe87Paps td:nth-child(3){width:7%!important}
  #papsTableBox table.pe87Paps th:nth-child(4),#papsTableBox table.pe87Paps td:nth-child(4){width:10.5%!important}
  #papsTableBox table.pe87Paps th:nth-child(5),#papsTableBox table.pe87Paps td:nth-child(5){width:17%!important}
  #papsTableBox table.pe87Paps th:nth-child(6),#papsTableBox table.pe87Paps td:nth-child(6){width:17%!important}
  #papsTableBox table.pe87Paps th:nth-child(7),#papsTableBox table.pe87Paps td:nth-child(7){width:17%!important}
  #papsTableBox table.pe87Paps th:nth-child(8),#papsTableBox table.pe87Paps td:nth-child(8){width:8%!important}
  #papsTableBox table.pe87Paps th:nth-child(9),#papsTableBox table.pe87Paps td:nth-child(9){width:8%!important}
  #papsTableBox table.pe87Paps th:nth-child(10),#papsTableBox table.pe87Paps td:nth-child(10){width:8%!important}
  #papsTableBox table.pe87Paps th:nth-child(11),#papsTableBox table.pe87Paps td:nth-child(11){width:8%!important}
  #papsTableBox table.pe87Paps th:nth-child(12),#papsTableBox table.pe87Paps td:nth-child(12){width:8%!important}
  #papsTableBox .papsInput {
    width:100%!important;
    min-width:0!important;
    max-width:44px!important;
    height:32px!important;
    padding:1px!important;
    margin:1px auto!important;
    font-size:10px!important;
    box-sizing:border-box!important;
  }
  #papsTableBox .dual,
  #papsTableBox .quad {
    width:100%!important;
    min-width:0!important;
    max-width:92px!important;
    gap:2px!important;
    margin:0 auto!important;
  }
  #papsTableBox .genderToggle {padding:2px 3px!important;font-size:8px!important}
  #papsTableBox .papsGrade,
  #papsTableBox .overallGradeBadge {padding:2px 2px!important;font-size:7px!important;white-space:normal!important}

  /* 5·6. 종목별 진도표 및 선택 대기: 마지막 열까지 카드 안에 고정 */
  #subjectPlanBox,
  #app .panel:has(> table.pe87SubjectPlan) {
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    overflow-x:hidden!important;
    box-sizing:border-box!important;
  }
  #app table.pe87SubjectPlan.dataTable {
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    table-layout:fixed!important;
    font-size:11px!important;
  }
  #app table.pe87SubjectPlan th,
  #app table.pe87SubjectPlan td {
    min-width:0!important;
    max-width:none!important;
    padding:6px 4px!important;
    white-space:normal!important;
    overflow:hidden!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
    box-sizing:border-box!important;
  }
  #app table.pe87SubjectPlan th:nth-child(1),#app table.pe87SubjectPlan td:nth-child(1){width:4%!important}
  #app table.pe87SubjectPlan th:nth-child(2),#app table.pe87SubjectPlan td:nth-child(2){width:7%!important}
  #app table.pe87SubjectPlan th:nth-child(3),#app table.pe87SubjectPlan td:nth-child(3){width:19%!important}
  #app table.pe87SubjectPlan th:nth-child(4),#app table.pe87SubjectPlan td:nth-child(4){width:20%!important}
  #app table.pe87SubjectPlan th:nth-child(5),#app table.pe87SubjectPlan td:nth-child(5){width:29%!important}
  #app table.pe87SubjectPlan th:nth-child(6),#app table.pe87SubjectPlan td:nth-child(6){width:21%!important}
  #app table.pe87SubjectPlan input,
  #app table.pe87SubjectPlan textarea {
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    padding:5px!important;
    font-size:11px!important;
  }

  /* 7. 활성 PAPS 대시보드 제목과 모든 제어 버튼 한 줄 */
  #app:has(#papsTableBox) > .pe87PageHead {
    display:grid!important;
    grid-template-columns:minmax(250px,1fr) minmax(0,2.35fr)!important;
    align-items:center!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }
  #app:has(#papsTableBox) > .pe87PageHead > h2 {
    min-width:0!important;
    margin:0!important;
    font-size:clamp(12px,1.35vw,17px)!important;
    line-height:1.15!important;
    white-space:nowrap!important;
    letter-spacing:-.6px!important;
  }
  #app:has(#papsTableBox) > .pe87PageHead > .row {
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    align-items:center!important;
    gap:4px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    flex-wrap:nowrap!important;
  }
  #app:has(#papsTableBox) > .pe87PageHead > .row > .btn {
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:40px!important;
    min-height:40px!important;
    padding:3px 3px!important;
    margin:0!important;
    font-size:clamp(8px,.85vw,11px)!important;
    line-height:1.05!important;
    white-space:nowrap!important;
    letter-spacing:-.5px!important;
    box-sizing:border-box!important;
  }
}
}
