/* 서면 고지를 모든 HTML의 마지막 콘텐츠로 분리하고 광고와 공간을 공유하지 않습니다. */
.hanmo-policy-footer {
  box-sizing: border-box;
  position: relative;
  z-index: 20;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 10px 24px 12px;
  border-top: 1px solid rgba(159, 193, 210, .3);
  background: #061521;
  color: #f3f7fa;
  text-align: center;
  font: 600 12px/1.65 "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  user-select: text;
}
.hanmo-policy-footer p {
  max-width: 1100px;
  margin: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  overflow-wrap: anywhere;
}
.hanmo-policy-footer strong { font-weight: 750; }
.hanmo-policy-footer .hanmo-restriction-notice:not(:empty) {
  display: inline-block;
  margin-inline-start: .65em;
  color: #ff4d4f;
  font-weight: 750;
  /* 곧 이용 제한·이용 제한 중에는 빨간 글씨를 1초 주기로 깜빡여 눈에 띄게 합니다. */
  animation: hanmo-restriction-blink 1s ease-in-out infinite;
}
@keyframes hanmo-restriction-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: .2; }
}
/* 움직임 줄이기를 설정한 사용자에게는 깜빡임 없이 빨간 글씨만 보여 줍니다. */
@media (prefers-reduced-motion: reduce) {
  .hanmo-policy-footer .hanmo-restriction-notice:not(:empty) { animation: none; }
}

/* 홈은 광고가 main에만 위치하고 마지막 안내는 별도 flex 행에 놓입니다. */
body.hanmo-home > .hanmo-policy-footer {
  padding-left: clamp(84px, 10vw, 144px);
  padding-right: clamp(84px, 10vw, 144px);
}

/* 학업 안내 화면: 긴 자료는 본문에서 스크롤하고 고지는 페이지 맨 마지막에 놓습니다. */
body.hanmo-ui {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
body.hanmo-ui > main {
  flex: 1 0 auto;
  width: 100%;
}

/* 원본 소개·결과 화면은 콘텐츠와 광고 뒤에 문서 푸터를 둡니다. */
body.hanmo-policy-legacy {
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 100vh;
  min-height: 100dvh;
}
body.hanmo-policy-legacy > main {
  flex: 1 0 auto;
  height: auto;
  min-height: 0;
  overflow: visible;
}
body.hanmo-policy-legacy > main > .f-dirt-up {
  flex: 1 0 auto;
  height: auto;
  min-height: 90px;
}

/* 기존 좌측 모의신청 메뉴/타이머·표는 유지하고 우측 본문만 필요 시 스크롤합니다. */
body.hanmo-practice-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}
body.hanmo-practice-layout > .half {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}
body.hanmo-practice-layout .half > :is(.mainArea, .selectZone_mainArea) {
  min-height: 0;
  overflow-y: auto;
}
body.hanmo-practice-layout .mainArea > .f-dirt-up {
  flex: 1 0 auto;
  height: auto;
  min-height: 90px;
}
body.hanmo-synthetic-404.hanmo-practice-layout .half {
  min-height: 0;
}

/* PC 전용 안내는 본문을 중앙에 두되 고지를 뷰포트 맨 아래로 내립니다. */
body.hanmo-pc-only-layout {
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
}
body.hanmo-pc-only-layout > main {
  margin: auto;
}
@media (max-width: 700px) {
  .hanmo-policy-footer { padding: 10px 16px; font-size: 11px; line-height: 1.6; }
  body.hanmo-home > .hanmo-policy-footer { padding-left: 70px; padding-right: 70px; }
}

/* 1980×1080 PC 기준: 모든 화면의 실제 문서 높이는 1개 뷰포트에 맞춥니다.
   작은 화면과 고배율에서는 기존 접근 가능한 반응형 배치를 보존합니다. */
@media (min-width: 1600px) and (min-height: 900px) {
  html { box-sizing: border-box; width: 100%; height: 100%; overflow: hidden; }
  body.hanmo-home,
  body.hanmo-ui,
  body.hanmo-vsugang,
  body.hanmo-policy-legacy,
  body.hanmo-practice-layout,
  body.hanmo-pc-only-layout {
    box-sizing: border-box;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }
  .hanmo-policy-footer {
    flex: 0 0 auto;
    min-height: 48px;
    padding-block: 8px;
  }
  /* 학업 화면은 기존 1070px 제한을 풀고 1980px 너비를 활용합니다. */
  body.hanmo-ui > .hanmo-topbar { flex: 0 0 auto; }
  body.hanmo-ui > main.hanmo-main {
    box-sizing: border-box;
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    min-height: 0;
    margin: 0;
    padding: 18px clamp(28px, 3vw, 66px) 12px;
    overflow: hidden;
  }
  body.hanmo-ui .hanmo-main > .hanmo-card,
  body.hanmo-ui .hanmo-main > .academic-calendar-surface {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
  }
  body.hanmo-ui .hanmo-main > .hanmo-schoolmark { flex: 0 0 auto; }
  body.hanmo-ui .hanmo-fields { gap: 16px 28px; }
  body.hanmo-ui .hanmo-list { min-height: 0; }
  /* 구형 개발자·결과 화면도 헤더·본문·고지의 세 행만 사용합니다. */
  body.hanmo-policy-legacy > main {
    box-sizing: border-box;
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    width: 100%;
    justify-content: center;
    overflow: hidden;
  }
  body.hanmo-policy-legacy main > .f-dirt-down {
    max-height: 100%;
    align-items: center;
    justify-content: center;
  }
  body.hanmo-policy-legacy .titleContainer { top: 0; }
  body.hanmo-policy-legacy .container { margin-top: 14px; }
  body.hanmo-policy-legacy .info { margin-top: 9px; line-height: 1.35; }
  body.hanmo-policy-legacy .info.blueBox { padding-block: 9px; }
  body.hanmo-policy-legacy .info img { height: 80px; }
  body.hanmo-policy-legacy .hanmo-contributor-list li { padding-block: 6px; }
  body.hanmo-policy-legacy .box { margin-top: 12px; gap: 12px; }
  body.hanmo-policy-legacy .button { margin-bottom: 8px; }
  body.hanmo-vsugang > main { min-height: 0; overflow: hidden; }
  /* 수강신청 표는 세로 영역을 나누고 아래의 신청 화면 전용 규격을 적용합니다. */
  body.hanmo-practice-layout > .half { min-height: 0; overflow: hidden; }
  body.hanmo-practice-layout .half > .selectZone_mainArea,
  body.hanmo-practice-layout .half > .mainArea { min-height: 0; overflow: hidden; }
  body.hanmo-practice-layout .tableZone {
    box-sizing: border-box;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: calc(100% - 24px);
    min-height: 0;
    overflow: hidden;
  }
  body.hanmo-practice-layout .vsugangTable {
    flex: 0 0 auto;
    height: auto;
    min-height: 0;
    margin-top: 8px;
    overflow: visible;
  }
  body.hanmo-practice-layout .vsugangedTable {
    flex: 0 0 auto;
    height: auto;
    min-height: 0;
    margin-top: 12px;
    padding-bottom: 0;
    overflow: visible;
  }
  body.hanmo-practice-layout #course-search-prompt { margin: 6px 0; }
  body.hanmo-practice-layout .course-general-warning { margin-block: 4px; }
  body.hanmo-pc-only-layout > main { flex: 1 1 auto; min-height: 0; }
}

/* 헤더·개발자 소개·고지가 브라우저 내부 스크롤 없이 함께 들어오도록 합니다. */
@media (min-width: 1200px) and (min-height: 780px) {
  body.hanmo-developer {
    display: flex; flex-direction: column; height: 100dvh; min-height: 0; overflow: hidden;
  }
  body.hanmo-developer > main {
    box-sizing: border-box; flex: 1 1 auto; display: flex; flex-direction: column;
    align-items: center; justify-content: center; width: 100%; height: auto;
    min-height: 0; margin: 0; padding: 12px 20px; overflow: hidden;
  }
  body.hanmo-developer .container .info.blueBox { padding: 14px 20px; }
  body.hanmo-developer > .hanmo-policy-footer { flex: 0 0 auto; }
}

/* 기존 모의신청 색상·폰트는 유지하고 selectZone의 상·하단 테이블 좌표만 고정합니다. */
body.hanmo-practice-layout .half > :is(.mainArea,.selectZone_mainArea) {
  box-sizing: border-box;
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}
@media (min-width: 1100px) and (min-height: 680px) {
  body.hanmo-practice-layout .selectZone_mainArea { overflow: hidden; }
  body.hanmo-practice-layout .selectZone_mainArea > h2 {
    box-sizing: border-box;
    height: 42px;
    min-height: 42px;
    flex: 0 0 42px;
    margin: 0;
  }
  body.hanmo-practice-layout .selectZone_mainArea .tableZone {
    box-sizing: border-box;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 95.3%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
  }
  body.hanmo-practice-layout .tableZone > #course-mode-nav,
  body.hanmo-practice-layout .tableZone > .course-warning-slot,
  body.hanmo-practice-layout .tableZone > #course-search-prompt {
    flex-shrink: 0;
  }
  body.hanmo-practice-layout #course-search-prompt { margin: 0; }
  body.hanmo-practice-layout .course-warning-slot .course-general-warning { margin: 0; }
  /* 겨울계절학기 참고 화면의 너비 95%, 상단 높이 약 46%와 두 표 사이 간격을 반영합니다.
     가용 높이가 작은 경우 두 표를 축소하고, 넘치는 표 내용만 독립적으로 스크롤합니다. */
  body.hanmo-practice-layout .selectZone_mainArea .vsugangTable {
    box-sizing: border-box;
    flex: 0 1 46vh;
    flex-basis: 46dvh;
    height: 46vh;
    height: 46dvh;
    min-height: 120px;
    margin-top: 5px;
    overflow: auto;
    align-items: stretch;
  }
  body.hanmo-practice-layout .selectZone_mainArea .vsugangedTable {
    box-sizing: border-box;
    flex: 0 1 clamp(100px, 24vh, 260px);
    flex-basis: clamp(100px, 24dvh, 260px);
    height: clamp(100px, 24vh, 260px);
    height: clamp(100px, 24dvh, 260px);
    min-height: 90px;
    margin-top: clamp(16px, 2.3vh, 24px);
    padding-bottom: 0;
    overflow: auto;
  }
  body.hanmo-practice-layout .vsugangTable > table,
  body.hanmo-practice-layout .vsugangedTable > table { width: 100%; }
}
/* 표가 없어도 검색 안내가 차지하는 24px은 유지하므로 Search 전후에 하단이 움직이지 않습니다. */
body.hanmo-practice-layout #course-search-prompt[hidden] {
  display: block;
  visibility: hidden;
}
