* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Source Code Pro', monospace;
  font-weight: 300;
  padding: 0px;
  background: snow;
  color: #333;
  padding-top: 260px;
}

header {
  border-bottom: 1px solid green;
  position: fixed; /* 추가 */
  top: 0;
  left: 0;
  right: 0;
  background: snow; /* 추가 */
  z-index: 1000; /* 추가 */
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
}
.header_title {
  color: #2d801c;
  font-family: 'Source Code Pro', monospace;
  font-size: 2.4em;
  font-weight: 500;
}

.header_nav {
  color: #2d801c;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  font-size: 32px;
  margin: 5px 0;
}

.nav-link {
  position: relative;
  margin: 0 6px;
  cursor: pointer;
  color: #2d801c;
  text-decoration: none;
  font-weight: 400;
  display: inline-block;
  padding-bottom: 2px;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #1e5c12; /* 호버시 조금 더 진한 초록색 */
}

.nav-link.active {
  font-weight: 400;
}

.nav-link.active::after {
  content: '';
  display: block;
  width: 90%;
  height: 2px;
  background: #222;
  margin: 0 auto;
  border-radius: 1px;
  background: green;
}

.birth {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: green;
  padding: 16px 0;
  border-bottom: 1px solid green;
  position: fixed;
  top: 97px; /* 97px → 73px로 되돌림 (헤더 실제 높이) */
  left: 0;
  right: 0;
  background: snow;
  z-index: 999;
}

.header_middle,
.now-label {
  font-size: 32px;
  margin: 10px 0;
  line-height: 1; /* 줄 간격을 최소화 */
}

.filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 24px;
  padding: 16px 32px;
}

.custom-year-dropdown {
  position: relative;
  display: inline-block;
  font-family: 'Source Code Pro', monospace;
}

.year-toggle {
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 5px 0;
}

.year-toggle .arrow {
  margin-left: 5px;
}

.year-options {
  position: absolute;
  top: 100%;
  left: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  display: none;
  background: #000;
  color: #fff;
  border: 1px solid #000;
  z-index: 10;
}

.year-options li {
  padding: 8px 12px;
  cursor: pointer;
}

.year-options li:hover {
  background: #444;
}

.custom-year-dropdown.active .year-options {
  display: block;
}

button,
select {
  font-family: inherit;
  padding: 4px 8px;
  border: 1px solid #444;
  background: #fff;
  cursor: pointer;
}

.expand-btn {
  font-size: 24px;
  cursor: pointer;
  padding: 6px;
}

.dropdown[open] {
  display: flex;
  flex-direction: column;
}
/* 노트북: 3열 */
@media (max-width: 1200px) {
  .weekly-grid .dropdown {
    flex-basis: 31%;
  }
}

/* 태블릿~모바일: 2열 */
@media (max-width: 900px) {
  .weekly-grid .dropdown {
    flex-basis: 48%;
  }
}

/* 모바일: 1열 */
@media (max-width: 600px) {
  .weekly-grid .dropdown {
    flex-basis: 100%;
  }
}
.weekly-grid {
  width: 100%;
  max-width: none; /* max-width 해제 */
  margin: 0;
  padding: 0 32px;
  display: block;
}

summary {
  background-color: snow;
}

.dropdown {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 20px;
  border: 1px solid #000;
  background: #fff;
  overflow: hidden;
}

.dropdown summary {
  display: flex;
  align-items: center;
  gap: 42px; /* 요소들 사이 간격 */
  padding: 12px 16px; /* 이 줄 추가 */
  cursor: pointer; /* 클릭 가능하다는 표시 */
}

.dropdown-arrow {
  flex: 0 0 auto; /* 내용에 맞는 크기 */
  margin-left: auto; /* 오른쪽 끝으로 밀기 */
}

.dropdown[open] .dropdown-arrow::after {
  content: '▲';
}
.dropdown:not([open]) .dropdown-arrow::after {
  content: '▼';
}

.week-code {
  flex: 0 0 180px; /* 너비를 180px로 증가 */
  font-family: 'Source Code Pro', monospace;
  font-size: 22px;
  font-weight: 500;
  white-space: nowrap; /* 줄바꿈 방지 */
  overflow: hidden; /* 넘치는 텍스트 숨김 */
}

.date-code {
  flex: 0 0 110px; /* 너비를 110px로 증가 */
  font-family: 'Source Code Pro', monospace;
  color: #444;
  font-size: 22px;
  font-weight: 500;
  white-space: nowrap; /* 줄바꿈 방지 */
  margin-right: 16px;
}

.week-title {
  flex: 1; /* 나머지 공간 사용 */
  font-weight: 500;
  color: #222;
  font-size: 22px;
}

.dropdown[open] summary {
  border-bottom: 1px solid #ccc;
}

.description {
  padding: 12px 16px;
  margin: 0;
  font-size: 18px;
  background: #f9f9f9;
  line-height: 1.5;
  font-weight: 500;
}

/* 슬라이드 컨테이너 */
.slider-container {
  padding: 10px 0;
  background: #fff;
  overflow-x: auto;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.slider {
  display: flex;
  gap: 10px;
  min-width: max-content;
  padding: 0 16px;
  transition: transform 0.3s ease-in-out;
}

.slider img {
  max-height: 200px;
  aspect-ratio: 1 / 1;
  width: auto;
  object-fit: cover;
  margin-right: 10px;
  border-radius: 4px;
  background: #eee;
}
.slide-btn {
  background: rgba(0, 0, 0, 0.05);
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.prev {
  left: 5px;
}
.next {
  right: 5px;
}

/* 햄버거 메뉴 스타일 */
.hamburger-menu {
  display: none;
  flex-direction: column;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px; /* 모서리 둥글게 */
  transition: all 0.3s ease; /* 부드러운 전환 */
}

.hamburger-menu span {
  width: 20px;
  height: 2px;
  background: green;
  margin: 2.5px 0;
  transition: 0.3s;
  transition: all 0.3s ease; /* 부드러운 전환 */
  border-radius: 1px; /* 모서리 둥글게 */
}

/* 모바일용 헤더 스타일 추가 */
@media (max-width: 1024px) {
  .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    position: relative;
  }

  .header_title {
    font-size: 20px;
    font-weight: 600;
    order: 1;
  }

  /* 햄버거 메뉴 보이기 */
  .hamburger-menu {
    display: flex;
    order: 2;
  }

  /* 네비게이션 아래쪽 토글 - 가로로 배치 */
  .header_nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #ddd;

    /* 가로 배치 유지 */
    flex-direction: row; /* column을 row로 변경 */
    justify-content: center; /* 중앙 정렬 */
    align-items: center;

    padding: 12px 16px; /* 패딩 줄이기 */
    display: none;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);

    /* 가로 간격 조정 */
    gap: 12px; /* 요소들 사이 간격 */
    font-size: 14px !important;
  }

  .header_nav.active {
    display: flex;
  }

  .header_nav span,
  .header_nav a {
    margin: 0;
    font-size: 14px !important; /* 강제로 작게 만들기 */
    text-align: center;
    white-space: nowrap;
  }

  /* birth 부분은 기존 위치에 작게 만들기 */
  .birth {
    padding: 8px 16px;
  }

  .header_middle {
    font-size: 18px !important;
    margin-bottom: 4px;
  }

  .now-label {
    font-size: 18px;
    line-height: 1; /* 줄 간격을 최소화 */
  }

  #age-display {
    font-size: 18px;
  }

  #eye-emoji {
    font-size: 18px;
  }
  /* 필터 섹션도 조정 */
  .filters {
    padding: 12px 16px;
    padding-top: 22px;
  }

  .year-toggle,
  .expand-btn {
    font-size: 16px;
    padding: 6px 10px;
    color: #333 !important; /* 파란색 → 검정색으로 강제 변경 */
    text-decoration: none !important;
  }

  /* 주차 정보 모바일 스타일 */
  .week-code {
    flex: 0 0 140px; /* 너비 조정 */
    font-size: 16px;
  }

  /* date-code 숨기기 */
  .date-code {
    display: none;
  }

  .week-title {
    flex: 1;
    font-size: 16px;
    white-space: nowrap; /* 줄바꿈 방지 */
    overflow: hidden; /* 넘치는 부분 숨기기 */
    text-overflow: ellipsis; /* ...으로 표시 */
  }

  .dropdown summary {
    gap: 15px; /* 간격 조정 */
    padding: 10px 12px;
  }

  .birth {
    top: 61px;
    padding: 8px 16px;
  }

  body {
    padding-top: 140px;
  }
}

/* 더 작은 모바일 (480px 이하) */

@media (max-width: 480px) {
  body {
    padding-top: 140px; /* 더 작은 모바일용 패딩 증가 */
  }

  .header_nav {
    padding: 8px 12px;
    gap: 8px;
    font-size: 16px !important; /* 더 작게 */
  }

  .header_nav span,
  .header_nav a {
    font-size: 16px !important; /* 더 작게 */
  }
  .week-code {
    flex: 0 0 120px;
    font-size: 14px;
  }

  .week-title {
    font-size: 14px;
  }

  .dropdown summary {
    gap: 12px;
    padding: 8px 10px;
  }

  .tiny-universe {
    display: none;
  }

  /* 작은 모바일에서 "Tiny Universe →" 숨기기 */
  .now-label::before {
    content: none; /* "Tiny Universe →" 제거 */
  }

  .tiny-universe {
    display: none; /* "Tiny Universe →" 완전히 숨김 */
  }
}

/* 햄버거 메뉴 애니메이션 */

.hamburger-menu.active {
  background: #2d801c;
}
.hamburger-menu.active span {
  background: snow;
}

/* Growth/Medical 페이지 스타일 */
.content-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 32px;
  min-height: calc(100vh - 280px); /* height → min-height, 더 여유롭게 */
  max-height: calc(100vh - 280px); /* 최대 높이도 제한 */
  overflow: hidden; /* 전체 컨테이너 스크롤 방지 */
}

.growth-section {
  flex: 2; /* 세로 2/3 공간 고정 */
  overflow-y: auto;
  background: snow;
  box-shadow: inset 0 -24px 15px -8px rgba(0, 0, 0, 0.15);
  margin-bottom: 16px; /* 그림자와 medical 섹션 사이 간격 */
}

.medical-section {
  flex: 1; /* 세로 1/3 공간 고정 */
  overflow-y: auto;
  background: snow;
  box-shadow: inset 0 -24px 15px -8px rgba(0, 0, 0, 0.15);
}

.growth-section h2,
.medical-section h2 {
  font-family: 'Source Code Pro', monospace;
  font-size: 24px;
  font-weight: 500;
  color: #2d801c;
  margin-bottom: 12px;
  padding-bottom: 8px;

  /* 헤더는 스크롤 영향 받지 않도록 */
  position: sticky;
  top: 0;
  background: snow;
  z-index: 1;
}

/* 그라디언트 페이드 효과 제거 */
.growth-section::after {
  display: none; /* 기존 그라디언트 제거 */
}

/* 모바일에서 Growth/Medical 비율 조정 */
@media (max-width: 1024px) {
  .content-container {
    padding: 16px; /* 패딩 줄이기 */
    min-height: calc(100vh - 320px); /* 모바일 헤더 높이 고려 */
    max-height: calc(100vh - 320px);
  }

  .growth-section {
    flex: 1.2; /* 2 → 1.2로 줄임 (약 55%) */
  }

  .medical-section {
    flex: 1; /* 그대로 유지 (약 45%) */
  }
  .tiny-universe {
    display: none; /* 1024px 이하에서도 숨김 */
  }
}

/* 작은 모바일에서 더 균등하게 */
@media (max-width: 480px) {
  .content-container {
    padding: 12px; /* 더 작게 */
    min-height: calc(100vh - 280px);
    max-height: calc(100vh - 280px);
  }

  .growth-section {
    flex: 0.6 !important;
  }

  .medical-section {
    flex: 1.3 !important;
  }

  .tiny-universe {
    display: none !important;
    visibility: hidden !important;
  }
}

.record-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 20px;
}

.record-item {
  display: flex;
  align-items: flex-start;
}

.date-column {
  flex: 0 0 80px;
  font-family: 'Source Code Pro', monospace;
  font-size: 16px;
  font-weight: 500;
  color: #666;
}

.description-column {
  flex: 1;
  font-family: 'Source Code Pro', monospace;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.5;
  color: #333;
}

/* 커스텀 스크롤바 */
.growth-section::-webkit-scrollbar,
.medical-section::-webkit-scrollbar {
  display: none;
}

/* Firefox용 스크롤바 숨기기 */
.growth-section,
.medical-section {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Internet Explorer 10+ */
}
