/* =========================================================
   Cheese Navigation (details + grid)
   - year nav / genealogy nav 공통으로 재사용 가능
   - 기존 HTML: .cheese-year-nav / .cheese-year-head / .cheese-year-grid ...
   - 다른 시리즈에도 동일 스타일을 쓰려면
     .cheese-geo-nav / .cheese-geo-grid 같은 클래스에도 자동 적용됨
========================================================= */

/* ✅ 공통: 네비(details) 박스 */
details.cheese-year-nav,
details.cheese-geo-nav{
  border: 1px solid rgba(15,23,42,0.12);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 22px rgba(15,23,42,0.06);
  overflow: hidden;
}

/* ✅ summary 레이아웃 */
details.cheese-year-nav > summary,
details.cheese-geo-nav  > summary{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px;
  cursor: pointer;
  user-select: none;
  list-style: none;
}

/* ✅ 기본 삼각형(마커) 제거 */
details.cheese-year-nav > summary::-webkit-details-marker,
details.cheese-geo-nav  > summary::-webkit-details-marker{ display:none; }
details.cheese-year-nav > summary::marker,
details.cheese-geo-nav  > summary::marker{ content:""; }

/* ✅ 헤드 텍스트 */
.cheese-year-head,
.cheese-geo-head{
  display:flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.cheese-year-title,
.cheese-geo-title{
  margin: 0;
  font-size: 25px;
  font-weight: 800;
  color: #111827;
  line-height: 1.25;
  letter-spacing: -0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cheese-year-sub,
.cheese-geo-sub{
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: rgba(17,24,39,0.65);
  line-height: 1.2;
}

/* ✅ 우측 토글 텍스트 */
.cheese-year-toggle,
.cheese-geo-toggle{
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  color: rgba(17,24,39,0.70);
  background: rgba(15,23,42,0.06);
  border: 1px solid rgba(15,23,42,0.10);
  padding: 8px 10px;
  border-radius: 999px;
  line-height: 1;
  white-space: nowrap;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

/* ✅ open 상태에서 토글 강조 */
details[open].cheese-year-nav > summary .cheese-year-toggle,
details[open].cheese-geo-nav  > summary .cheese-geo-toggle{
  background: rgba(17,24,39,0.10);
  border-color: rgba(17,24,39,0.18);
}

/* ✅ 본문 영역 */
.cheese-year-body,
.cheese-geo-body{
  padding: 0 14px 14px;
}

/* ✅ 그리드 */
.cheese-year-grid,
.cheese-geo-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(15,23,42,0.10);
}

/* ✅ 셀(링크/현재) 공통 */
.cheese-year-cell,
.cheese-geo-cell{
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 10px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.2px;
  text-decoration: none;
  border: 1px solid rgba(15,23,42,0.12);
  background: #fff;
  color: #111827;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}

/* ✅ 링크 hover */
.cheese-year-cell:hover,
.cheese-geo-cell:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(15,23,42,0.08);
  border-color: rgba(17,24,39,0.20);
  background: rgba(15,23,42,0.02);
}

/* ✅ 현재 페이지 표시 */
.cheese-year-cell.current,
.cheese-geo-cell.current{
  background: #111827;
  color: #fff;
  border-color: #111827;
  box-shadow: none;
}

/* ✅ 모바일 최적화 */
@media (max-width: 640px){
  details.cheese-year-nav > summary,
  details.cheese-geo-nav  > summary{
    padding: 12px 12px;
  }

  .cheese-year-title,
  .cheese-geo-title{
    font-size: 15px;
  }

  .cheese-year-grid,
  .cheese-geo-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .cheese-year-cell,
  .cheese-geo-cell{
    font-size: 13px;
    padding: 10px 8px;
  }
}
