/* ========================================
   기본
   ======================================== */

* {
  box-sizing: border-box;
}


body {

  margin: 0;

  background: #f7f8fa;

  color: #222;

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Noto Sans KR",
    sans-serif;

}


/* ========================================
   전체 컨테이너
   ======================================== */

.container {

  width: 100%;

  max-width: 680px;

  margin: 0 auto;

  padding: 24px 16px 30px;

}


/* ========================================
   헤더
   ======================================== */

header {

  text-align: center;

  padding: 20px 0 24px;

}


header h1 {

  margin: 0 0 8px;

  font-size: 26px;

  font-weight: 750;

}


header p {

  margin: 0;

  color: #777;

  font-size: 14px;

}


/* ========================================
   카드
   ======================================== */

.card {

  background: white;

  border-radius: 18px;

  padding: 20px;

  margin-bottom: 16px;

  box-shadow:
    0 3px 12px rgba(0, 0, 0, 0.05);

}


.card h2 {

  margin: 0 0 14px;

  font-size: 18px;

}


/* ========================================
   입력창
   ======================================== */

textarea {

  width: 100%;

  min-height: 120px;

  resize: vertical;

  padding: 14px;

  border: 1px solid #ddd;

  border-radius: 12px;

  background: #fafafa;

  font-size: 15px;

  line-height: 1.6;

  font-family: inherit;

  outline: none;

}


textarea:focus {

  border-color: #999;

  background: white;

}


/* ========================================
   버튼
   ======================================== */

button {

  border: none;

  cursor: pointer;

  font-family: inherit;

}


.main-btn {

  width: 100%;

  margin-top: 12px;

  padding: 14px;

  border-radius: 12px;

  background: #222;

  color: white;

  font-size: 15px;

  font-weight: 650;

}


.main-btn:disabled {

  opacity: 0.5;

  cursor: default;

}


#status {

  margin: 10px 2px 0;

  color: #777;

  font-size: 13px;

}


/* ========================================
   결과
   ======================================== */

.result-header {

  display: flex;

  align-items: center;

  justify-content: space-between;

  margin-bottom: 12px;

}


.result-header h2 {

  margin: 0;

}


.copy-btn {

  padding: 8px 12px;

  border-radius: 9px;

  background: #f0f1f3;

  font-size: 13px;

}


pre {

  margin: 0;

  padding: 16px;

  border-radius: 12px;

  background: #f6f7f8;

  white-space: pre-wrap;

  word-break: break-word;

  font-family: inherit;

  font-size: 14px;

  line-height: 1.65;

}


/* ========================================
   학교 정보 변경 버튼
   ======================================== */

.school-setting-btn {

  width: 100%;

  padding: 14px;

  margin: 2px 0 20px;

  border-radius: 12px;

  background: white;

  border: 1px solid #ddd;

  color: #333;

  font-size: 14px;

  font-weight: 600;

}


/* ========================================
   Footer
   ======================================== */

footer {

  padding: 10px 12px 30px;

  text-align: center;

  color: #999;

  font-size: 11px;

  line-height: 1.7;

}


.footer-title {

  margin-bottom: 5px;

  color: #777;

  font-weight: 600;

}


/* ========================================
   팝업
   ======================================== */

.modal {

  position: fixed;

  inset: 0;

  display: none;

  align-items: center;

  justify-content: center;

  padding: 16px;

  background:
    rgba(0, 0, 0, 0.45);

  z-index: 1000;

}


.modal.show {

  display: flex;

}


.modal-content {

  width: 100%;

  max-width: 500px;

  max-height: 90vh;

  overflow-y: auto;

  padding: 22px;

  border-radius: 20px;

  background: white;

  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.18);

}


.modal-header {

  display: flex;

  align-items: center;

  justify-content: space-between;

  margin-bottom: 20px;

}


.modal-header h2 {

  margin: 0;

  font-size: 20px;

}


.close-btn {

  width: 34px;

  height: 34px;

  border-radius: 50%;

  background: #f1f2f3;

  font-size: 24px;

  line-height: 1;

  color: #555;

}


/* ========================================
   폼
   ======================================== */

.modal-content > label {

  display: block;

  margin: 16px 0 7px;

  font-size: 13px;

  font-weight: 650;

  color: #555;

}


.school-search {

  display: flex;

  gap: 7px;

}


.school-search input {

  flex: 1;

  min-width: 0;

  padding: 12px;

  border: 1px solid #ddd;

  border-radius: 10px;

  outline: none;

  font-size: 14px;

}


.school-search button {

  width: 46px;

  border-radius: 10px;

  background: #222;

  color: white;

  font-size: 17px;

}


select {

  width: 100%;

  padding: 12px;

  border: 1px solid #ddd;

  border-radius: 10px;

  background: white;

  font-size: 14px;

}


/* ========================================
   학교 검색 결과
   ======================================== */

.search-status {

  margin-top: 8px;

  color: #888;

  font-size: 12px;

}


.school-results {

  display: flex;

  flex-direction: column;

  gap: 6px;

  margin-top: 8px;

}


.school-result {

  display: flex;

  flex-direction: column;

  align-items: flex-start;

  gap: 3px;

  width: 100%;

  padding: 12px;

  border-radius: 10px;

  background: #f5f6f7;

  text-align: left;

}


.school-result:hover {

  background: #e9eaec;

}


.school-result strong {

  font-size: 14px;

}


.school-result span {

  color: #888;

  font-size: 12px;

}


/* ========================================
   선택된 학교
   ======================================== */

.selected-school {

  margin-top: 10px;

  padding: 12px;

  border-radius: 10px;

  background: #f5f6f7;

  color: #777;

  font-size: 13px;

}


.selected-school strong {

  display: block;

  margin-bottom: 3px;

  color: #222;

  font-size: 14px;

}


.selected-school span {

  color: #888;

}


/* ========================================
   급식 체크박스
   ======================================== */

.meal-checkboxes {

  display: flex;

  gap: 8px;

}


.meal-checkbox {

  flex: 1;

  margin: 0 !important;

  cursor: pointer;

}


.meal-checkbox input {

  display: none;

}


.meal-checkbox span {

  display: block;

  padding: 12px 8px;

  border: 1px solid #ddd;

  border-radius: 10px;

  background: white;

  text-align: center;

  color: #555;

  font-size: 14px;

  transition: 0.15s;

}


.meal-checkbox input:checked + span {

  border-color: #222;

  background: #222;

  color: white;

  font-weight: 600;

}

/* ========================================
   날짜 선택
   ======================================== */

.date-checkboxes {

  display: flex;

  gap: 8px;

}


.date-checkbox {

  flex: 1;

  margin: 0 !important;

  cursor: pointer;

}


.date-checkbox input {

  display: none;

}


.date-checkbox span {

  display: block;

  padding: 12px 8px;

  border: 1px solid #ddd;

  border-radius: 10px;

  background: white;

  text-align: center;

  color: #555;

  font-size: 14px;

  transition: 0.15s;

}


.date-checkbox input:checked + span {

  border-color: #222;

  background: #222;

  color: white;

  font-weight: 600;

}


/* ========================================
   저장 버튼
   ======================================== */

.save-btn {

  width: 100%;

  margin-top: 22px;

  padding: 14px;

  border-radius: 12px;

  background: #222;

  color: white;

  font-size: 15px;

  font-weight: 650;

}


/* ========================================
   모바일
   ======================================== */

@media (
  max-width: 480px
) {

  .container {

    padding:
      14px 12px 20px;

  }


  header {

    padding:
      18px 0 20px;

  }


  header h1 {

    font-size: 23px;

  }


  .card {

    padding: 17px;

    border-radius: 16px;

  }


  .modal-content {

    padding: 18px;

    border-radius: 18px;

  }


  .meal-checkbox span {

    font-size: 13px;

  }

}