/* mobile-apply.css — apply.html(수시 원서 DB) 모바일(≤640px) 전용 화면. */
@media (max-width: 640px) {
  .page-wrap { max-width: none; padding: 14px 12px calc(96px + env(safe-area-inset-bottom)) !important; }
  .back { font-size: 14px; padding: 6px 0; margin-bottom: 8px; }
  h1 { font-size: 22px; }
  .page-sub { font-size: 12px; line-height: 1.5; margin-bottom: 14px; }

  /* 요약 칩 → 3열 두 줄: 지원·접수완료·합격 / 예비·불합·면접 DB */
  .sum-bar { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
  .sum-chip { flex-direction: column; justify-content: center; align-items: center; gap: 4px; padding: 10px 4px !important; border-radius: 14px !important; min-height: 66px; box-shadow: none !important; border: 1.5px solid #f3e6ea !important; }
  .sn { font-size: 22px !important; line-height: 1; }
  .sl { font-size: 12px !important; line-height: 1; }
  /* 면접 DB는 버튼이라 색으로 구분 */
  .sum-bar > a.sum-chip { background: var(--main-light, #fff0f3) !important; border-color: var(--main-border, #ffd0df) !important; }
  .sum-bar > a.sum-chip .sn { font-size: 20px !important; }
  #odinNoticeBox { grid-column: 1 / -1; margin: 0 !important; }
  /* 「제한 외」 칩이 나와 7개가 되면 면접 DB 를 셋째 줄 가로 띠로 */
  .sum-bar:has(#s-extra-wrap:not([style*="none"])) > a.sum-chip { grid-column: 1 / -1; flex-direction: row; gap: 8px; min-height: 48px; }

  /* 원서 카드: 한 줄에 하나 */
  .gun-grid { grid-template-columns: 1fr !important; gap: 12px !important; }
  .gun-card { width: auto !important; min-width: 0 !important; max-width: 100% !important; box-sizing: border-box; padding: 14px !important; border-radius: 18px !important; }
  .gun-header { margin-bottom: 12px; }
  .gun-badge { font-size: 15px; padding: 4px 14px; }
  .s-btn { width: 36px; height: 36px; font-size: 15px; }
  .sub-row { gap: 6px; }
  .sub-btn { min-height: 40px; font-size: 13px !important; }
  .application-period { font-size: 12px; }
  .gun-fields { gap: 10px; }
  .field-label { font-size: 11px; margin-bottom: 2px !important; }   /* -6px 겹침 해제 */
  .gun-fields > div > .gun-input, .gun-fields > div > select.gun-input { width: 100% !important; display: block; }
  .gun-input { padding: 11px 12px; font-size: 16px !important; min-height: 46px; }
  /* 모집인원·지원자수: 숫자 입력칸의 기본 최소폭(약 200px) 때문에 줄이 카드 밖으로 밀렸다 */
  .field-row > div { flex: 1 1 0 !important; min-width: 0 !important; }
  .gun-input.narrow { flex: 1 1 0 !important; width: 100% !important; min-width: 0 !important; }
  select.gun-input { min-height: 46px; }
  .field-row { gap: 8px; }
  .ratio-badge { font-size: 16px !important; font-weight: 900; padding: 9px 14px; border-radius: 12px; width: 100%; justify-content: center; margin-top: 4px; }
  .wn-row { flex-wrap: wrap; }
  .wn-input { width: 96px; font-size: 16px !important; }
  /* 학교장추천 안내 상자(apply_guard.js 가 9~11px 로 찍는 것) — 폰에서는 13px */
  html body .ag-box { padding: 10px 12px !important; border-radius: 12px !important; }
  html body .ag-box-none { padding: 6px 0 !important; }
  html body .ag-head { gap: 8px !important; margin-bottom: 8px !important; }
  html body .ag-badge { font-size: 12.5px !important; min-height: 28px !important; padding: 0 11px !important; }
  html body .ag-select { font-size: 14px !important; min-height: 38px !important; padding: 0 10px !important; }
  html body .ag-row { font-size: 13px !important; padding: 5px 0 !important; gap: 8px !important; flex-wrap: wrap; }
  html body .ag-k, html body .ag-v { font-size: 13px !important; line-height: 1.5 !important; }
  html body .ag-v { flex: 1 1 auto; }
  html body .ag-ack { font-size: 12px !important; line-height: 1.55 !important; }
  html body .ag-src { font-size: 11px !important; }
  html body .ag-alert-title { font-size: 15px !important; }
  html body .ag-alert-sub, html body .ag-alert-body, html body .ag-alert-list { font-size: 13px !important; }
  html body .ag-btn { min-height: 40px !important; font-size: 13px !important; }
  html body .ag-alert-foot { font-size: 11px !important; }
  html body .jc-note { font-size: 12px !important; }
  html body .extra-note { font-size: 12px !important; }

  /* 고사 일정 충돌: 요약 상자를 카드 위로 올리고 글자를 키운다 */
  .page-wrap { display: flex; flex-direction: column; }
  .page-wrap > * { order: 2; }
  .page-wrap > .back, .page-wrap > h1, .page-wrap > .page-sub, .page-wrap > .sum-bar, .page-wrap > #conflictSummary { order: 1; }
  html body .cf-summary { margin: 0 0 12px !important; padding: 12px !important; }
  html body .cf-summary-title { font-size: 15px !important; }
  html body .cf-summary-row { padding: 10px !important; gap: 8px !important; }
  html body .cf-summary-text { font-size: 13px !important; }
  html body .cf-summary-go { font-size: 12px !important; }
  html body .cf-summary-more { font-size: 12px !important; }
  html body .cf-chip, html body .cf-badge { font-size: 12.5px !important; padding: 5px 10px !important; }
  html body .cf-badge { margin-top: 8px !important; }
  /* 충돌 창 */
  html body .cf-modal-back { padding: 10px !important; align-items: flex-start !important; padding-top: 10px !important; z-index: 9950 !important; }
  html body .cf-modal { padding: 14px 12px !important; border-radius: 16px !important; max-height: calc(100vh - 20px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
  html body .cf-level { font-size: 12px !important; }
  html body .cf-head { font-size: 16px !important; margin-top: 8px !important; }
  html body .cf-body { font-size: 13px !important; margin-top: 6px !important; line-height: 1.55 !important; }
  html body .cf-sides { grid-template-columns: 1fr !important; gap: 6px !important; margin-top: 10px !important; }
  html body .cf-side { padding: 10px !important; }
  html body .cf-side-tag { font-size: 11px !important; }
  html body .cf-side-univ { font-size: 14.5px !important; margin-top: 2px !important; }
  html body .cf-side-jh { font-size: 12.5px !important; }
  html body .cf-side-when { font-size: 13.5px !important; margin-top: 5px !important; }
  html body .cf-side-place { font-size: 12.5px !important; }
  html body .cf-side-desc { font-size: 11.5px !important; margin-top: 3px !important; }
  html body .cf-vs { font-size: 12px !important; padding: 2px 0; }
  html body .cf-note { font-size: 12.5px !important; }
  html body .cf-btns { gap: 6px !important; margin-top: 12px !important; }
  html body .cf-btn { min-height: 42px !important; font-size: 13.5px !important; }
  html body .cf-foot { font-size: 11px !important; margin-top: 9px !important; }
  html body .cf-restore { min-height: 40px !important; font-size: 13px !important; }

  .extra-add-wrap { margin-top: 14px; }
  .extra-add-btn { width: 100%; min-height: 44px; font-size: 14px; }
  .extra-add-hint { font-size: 12px; }
  .extra-remove { min-height: 40px; font-size: 13px; }

  /* 상세 화면 */
  .detail-head { gap: 8px; }
  .detail-nav { width: 40px !important; height: 40px !important; }
  .detail-title { font-size: 15px !important; }
  .detail-back { min-height: 40px !important; font-size: 14px; }
  .detail-grid { grid-template-columns: 1fr !important; gap: 12px !important; }
  .detail-col { gap: 12px !important; }
  .detail-box { padding: 12px !important; border-radius: 14px !important; }
  .detail-box-title { font-size: 14px !important; }
  /* 「다음에 할 일」 줄: 글이 좁은 기둥으로 접히던 것 — 글은 폭 전체, 날짜·버튼은 아래 줄 */
  .ac-next { flex-wrap: wrap !important; gap: 8px 10px !important; padding: 12px !important; }
  .ac-next > input { margin-top: 3px !important; }
  .ac-next-body { flex: 1 1 200px !important; }
  .ac-next-body .ac-due { align-self: flex-start; margin: 4px 0 0 !important; }
  .ac-next-label { font-size: 14px !important; }
  /* 줄마다 붙던 「성취 DB로 →」 대신 목록 끝에 한 번 */
  .ac-next .ac-send { display: none !important; }
  html body .ac-send-all { display: flex !important; align-items: center; justify-content: center; width: 100%; min-height: 44px; margin-top: 10px; border-radius: 11px; border: 1.5px solid var(--main-pink, #ff8fa3); background: #fff; color: var(--main-pink, #ff8fa3); font-size: 14px; font-weight: 900; font-family: inherit; cursor: pointer; }
  html body .ac-send-all-done { border-color: #bfe9dd; background: #ecfdf5; color: #0f766e; cursor: default; }
  /* 체크리스트 줄: 항목 이름 한 줄, 날짜 배지·개수 칩은 그 아래 오른쪽 */
  .ac-item { flex-wrap: wrap !important; gap: 6px 8px !important; padding: 10px 12px !important; }
  .ac-left { flex: 1 1 100% !important; }
  .ac-label { font-size: 13.5px !important; }
  .ac-item > .ac-due { margin-left: auto !important; }
  .ac-due-date { font-size: 12.5px !important; }
  .ac-dday { font-size: 13px !important; }
  .ac-sub { padding-left: 36px !important; font-size: 12.5px !important; }

  /* 대학 검색 창 (목표 DB와 같은 창) */
  .univ-modal-overlay { padding: 12px; align-items: flex-start !important; padding-top: 24px; }
  .univ-modal-content { width: 100% !important; max-width: none !important; padding: 18px 14px 14px !important; border-radius: 18px !important; max-height: calc(100vh - 48px); display: flex; flex-direction: column; }
  .univ-modal-title { font-size: 18px !important; margin: 0 0 12px !important; }
  .univ-modal-close { top: 10px !important; right: 10px !important; width: 40px; height: 40px; font-size: 20px; }
  .univ-tab-btn { font-size: 14px !important; padding: 10px 6px !important; min-height: 42px; }
  .univ-search-group input { height: 46px !important; font-size: 16px !important; }
  .univ-search-btn { min-width: 64px; font-size: 14px !important; }
  #deptSearchInput { height: 44px !important; font-size: 16px !important; }
  .univ-result-list { flex: 1 1 auto; overflow-y: auto !important; max-height: none !important; -webkit-overflow-scrolling: touch; }
  .univ-result-item { padding: 12px 10px !important; min-height: 46px; }

  .odin-toast { bottom: calc(110px + env(safe-area-inset-bottom)); max-width: calc(100vw - 24px); white-space: normal; text-align: center; }
}
