  /* 기본 스타일 (유지) */
  * {
    box-sizing: border-box;
  }

  body {
  font-family: sans-serif;
  padding: 0;            /* ✅ 상단 여백 제거 */
  margin: 0;
  font-size: 1.6em;
  background-color: #f4f4f4;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}


  /* 고정 헤더 스타일 (유지) */
  .fixed-header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #f4f4f4;
    text-align: center;
    font-size: 1.6em;
    font-weight: bold;
    padding: 20px;
    z-index: 1000;
    border-bottom: 1px solid #ccc;
  }

/* 전체 상단 바 레이아웃: 3등분 */

.top-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  display: flex;
  justify-content: space-between;  /* 좌우 끝에 버튼 */
  align-items: center;
  padding: 4px 12px;     /* ✅ 상하 padding 줄임 */ 
  background-color: #f4f4f4;
  border-bottom: 1px solid #ccc;
  height: auto;          /* ✅ 고정 높이 제거 */
  min-height: 44px;      /* ✅ 너무 납작하지 않도록 최소값만 줌 */
}

/* 버튼 컨테이너는 끝쪽 정렬 */
.nav-button-container.left {
  flex: 0 0 auto;
}

.nav-button-container.right {
  flex: 0 0 auto;
}

/* 제목은 가운데에 고정 배치 */
.nav-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.8em;
  font-weight: bold;
  color: #000;
  white-space: nowrap;
  pointer-events: none; /* 버튼과 겹쳐도 클릭 안 막도록 */
}

/* 버튼 스타일 */
.nav-button {
  background-color: #2d6cdf;
  color: white;
  border: none;
  padding: 10px 20px;     /* ✅ 상하 줄이기 */
  font-size: 1.4em;
  border-radius: 6px;
  cursor: pointer;
}


 input[type="checkbox"] {
  transform: scale(1.5); /* 1.5배 확대 */
  margin-right: 10px;
  vertical-align: middle;
 }


  /* 단계별 컨텐츠 스타일 (유지) */
 .step {
  padding-top: 70px;       /* ✅ 상단 바 아래에서 고정된 위치 */
  margin: 0 auto 30px;      /* ✅ 위쪽 margin 제거 */
  width: 95%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

    

  .step h3 {
    font-size: 1.6em;
    font-weight: bold;
  }

  .step h4 {
    font-size: 1.6em;
    font-weight: bold;
  }

  /* 레이블-입력 필드 그룹 스타일 (유지) */
  .label-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
  }

  .label-row label {
    font-size: 1.6em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 5px;
    white-space: nowrap; /* 한 줄로 유지 */
  }

  .label-row input[type="text"],
  .label-row input[type="tel"],
  .label-row .birth-input-group input {
    width: 100%;
    max-width: 330px;
    padding: 12px;
    font-size: 1.6em;
    margin: 5px 0;
    text-align: center;
  }

.input-common {
  width: 280px;
  padding: 14px;
  font-size: 1.3em;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  text-align: center;
}


.explain-text {
  margin-top: 16px;
  font-size: 1em;
  text-align: center;
  line-height: 1.4;
}


  /* 생년월일 입력 필드 그룹 스타일 (유지) */
  .label-row .birth-input-group {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 330px;
    justify-content: center;
  }

  .label-row .birth-input-group input {
    width: 30%;
    margin: 5px;
  }

  /* 입력 필드, 선택 상자, 버튼 공통 스타일 (유지) */
  input, select, button {
    font-size: 1.6em;
    padding: 10px;
    margin: 10px 0;
  }


/* 버튼 그룹 컨테이너: 가로 정렬 및 반응형 */
.gender-buttons,
.region-buttons,
.option-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 1rem;
}

/* 공통 버튼 스타일 */

/* 버튼 그룹 컨테이너 */
.gender-buttons,
.region-buttons,
.option-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 1rem;
}

/* 공통 버튼 스타일 */
.gender-button,
.region-button,
.option-button {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #ccc;
  background: transparent;
  color: black;

  /* ✅ 글씨와 박스 크기 확대 */
  font-size: 1.4em;       /* 글씨 더 큼 */
  font-weight: 500;       /* 좀 더 두껍게 */
  padding: 14px 24px;     /* 더 넉넉한 여백 */
  min-width: 120px;       /* 박스 기본 너비 더 넓게 */

  display: inline-block;
  flex: 0 0 auto;
  margin: 6px;
  border-radius: 8px;     /* 테두리도 좀 더 둥글게 */
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;
  width: auto;

  /* ✅ 포커스 스타일 제거 */
  outline: none;
  box-shadow: none;

  transition: background-color 0.3s ease, color 0.3s ease;
}

/* 선택된 버튼 */
.gender-button.selected,
.region-button.selected,
.option-button.selected {
  background-color: #4CAF50;
  color: white;
  font-weight: bold;
}


.subject-button.selected {
    background-color: #4CAF50;
    color: white;
    font-weight: bold;
}

.subject-button,
.club-button,
.education-button {
  /* 공통 스타일 */
  flex: 0 1 auto;
  text-align: center;
  border: 1px solid #ccc;
  background: transparent;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.2em;
  margin: 4px;
  display: block;
  width: 100%;
  color: black;
  box-sizing: border-box;
  outline: none;
}

.subject-button.selected,
.club-button.selected,
.education-button.selected {
  background-color: #4CAF50;
  color: white;
  font-weight: bold;
}


/* 표 스타일 */
table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}
th, td {
    border: 1px solid #ccc;
    padding: 8px;
}


.timetable {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  table-layout: fixed; /* 테이블 레이아웃 고정 */
}

  /* 수업 버튼 스타일 (수정됨 - 시간표에만 적용) */
  .timetable .class-button {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 8px 5px; /* 상하 여백 늘리고 좌우 여백 줄임 */
    font-size: 0.9em; /* 기본 큰 글자 크기 (시간표 기준) */
    line-height: 1.3; /* 줄 간격 약간 늘려 가독성 확보 */
    word-break: keep-all; /* 띄어쓰기 기준으로 줄바꿈 */
    width: 100%; /* 테이블 셀 너비에 맞춤 */
    height: 100%; /* 테이블 셀 높이에 맞춤 */
    box-sizing: border-box; /* padding, border가 width, height에 포함되도록 */
    margin: 0; /* 테이블 셀 내부 margin 제거 */
    border: none; /* 테이블 셀 테두리와 겹치지 않도록 */
    background-color: #e0e0e0;
    cursor: pointer;
    font-weight: 500;
  }

 display: -webkit-box;
  -webkit-line-clamp: 2; /* 최대 2줄까지 표시 */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

  .timetable .class-button.song-class {
    background-color: #ffd54f;
    border-color: #fbc02d;
  }

  .timetable .class-button.selected,
  .timetable .song-class.selected {
    background-color: #4CAF50;
    color: white;
    font-weight: bold;
  }

  .timetable .song-class.selected {
    background-color: #2196F3 !important;
  }

  /* 시간표 스타일 (유지) */
  .timetable-container {
    padding: 20px;
    background-color: #f9f9f9;
  }

  .timetable {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  .timetable th,
  .timetable td {
    border: 1px solid #ddd;
    text-align: center;
    padding: 12px;
    font-size: 0.9em;
  }

  .timetable thead th {
    background-color: #f1f1f1;
    font-weight: bold;
  }

  .class-button.selected {
    background-color: #ffd54f;
    color: black;
  }
  

.hidden {
  display: none;
}

 
.hidden {
  display: none;
}



  button {
    font-size: 1.6em;
    padding: 18px 36px;
    border-radius: 14px;
    font-weight: bold;
    background-color: #1976d2;
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: background-color 0.3s ease;
  }

  button:hover {
    background-color: #1565c0;
  }

.submit-final-button {
  font-size: 1.9em;
  padding: 10px 25px;
  border-radius: 8px;
  background-color: #2196f3;
  color: white;
  border: none;
  cursor: pointer;
}
.submit-final-button:hover {
  background-color: #1976d2;
}


.confirmation-table {
  width: 600px;
  border-collapse: collapse;
  font-size: 1.2em;
  border: 2px solid #333;
}

.confirmation-table th,
.confirmation-table td {
  border: 2px solid #333;
  padding: 12px;
  text-align: left;
  vertical-align: top;
}



  /* 반응형 디자인 (시간표 수업 버튼에만 적용) */
  .timetable .class-button {
    font-size: 0.9em; /* 기본 큰 글자 크기 (시간표 기준) */
  }

  /* 중간 크기 화면 (예: 태블릿 가로, 작은 데스크톱 - 최소 너비 600px 이상) */
  @media (min-width: 600px) {
    .timetable .class-button {
      font-size: 0.7em; /* 약간 더 크게 */
    }
  }

  /* 큰 화면 (데스크톱 - 최소 너비 992px 이상) */
  @media (min-width: 992px) {
    .timetable .class-button {
      font-size: 0.9em; /* 더 크게 */
      -webkit-line-clamp: 2;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
  }

  /* 아주 큰 화면 (큰 데스크톱 - 최소 너비 1200px 이상) */
  @media (min-width: 1200px) {
    .timetable .class-button {
      font-size: 0.9em; /* 더욱 크게 */
    }
  }

  /* Grid 시간표 스타일 (수정됨 - 수업 버튼에 동일한 반응형 적용) */
  .timetable-grid .class-block {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 5px;
    font-size: 0.9em;
    line-height: 1.3;
    word-break: keep-all;
    cursor: pointer;
    box-sizing: border-box;
    z-index: 1;
    border: 1px solid #00acc1;
    background: #e0f7fa;
  }

  @media (min-width: 600px) {
    .timetable-grid .class-block {
      font-size: 0.7em;
    }
  }

  @media (min-width: 992px) {
    .timetable-grid .class-block {
      font-size: 0.9em;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
  }

  @media (min-width: 1200px) {
    .timetable-grid .class-block {
      font-size: 0.9em;
    }
  }

/* 선택형 버튼들의 포커스/클릭/터치 하이라이트 제거 */
.gender-button:focus,
.gender-button:focus-visible,
.gender-button:active,

.option-button:focus,
.option-button:focus-visible,
.option-button:active,

.club-button:focus,
.club-button:focus-visible,
.club-button:active,

.education-button:focus,
.education-button:focus-visible,
.education-button:active,

.subject-button:focus,
.subject-button:focus-visible,
.subject-button:active {
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

/* 평소 상태에만 적용되는 초기화 (선택된 상태는 보호) */
.gender-button:not(.selected),
.option-button:not(.selected),
.club-button:not(.selected),
.education-button:not(.selected),
.subject-button:not(.selected) {
  background-color: transparent !important;
  color: black !important;
  border-color: #ccc !important;
}


