html {
  font-size: 16px;
}

@media (max-width: 900px) {
  html {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 12px;
  }
}


body {
    display: flex;
    flex-direction: column;
    height: 100vh; /* 브라우저 전체 높이 */
    margin: 0;
    padding: 0;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
    overflow-y: auto;
    /*font-size: 10px;*/
}

.grid-container {
    flex: 1 1 auto;
    display: grid;
    gap: 10px;
    padding: 10px;
    margin: 0 auto;
    /* 100vh에서 헤더(60px)와 푸터(40px)를 뺀 높이 */
    height: calc(100vh - 100px);
}

/* 푸터 높이 지정 (예시로 40px) */
footer {
    flex: 0 0 auto;
    text-align: center;
}

/* 섹션 헤더: 전체 줄 높이를 48px로 잡고 수직 중앙 정렬 */
.section-header {
    display: flex;
    justify-content: space-between; /* 왼쪽에 타이틀, 오른쪽에 버튼 */
    align-items: center; /* 수직 중앙 정렬 */
    height: 48px; /* 헤더 높이 (원하는 값으로 조정) */
    padding: 0 10px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

/* 섹션 제목: 기본 마진 제거 + 라인 높이는 1로(부모가 정렬 담당) */
.section-title {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1;
}

/* td 내부의 두 줄 구성 */
.top-line,
.bottom-line {
  display: flex;
  align-items: center;
}

/* 종목명 및 즐겨찾기 버튼 */
.stock-name {
  font-weight: 500;
  margin-right: 5px;
}

.top-line {
    font-size: 1rem;
    margin-bottom: 2.5px;
}

.bottom-line {
    font-size: 0.75rem;
}

/* 즐겨찾기 버튼 (실제 아이콘은 background 이미지나 폰트 아이콘으로 교체) */
.favorite-button {
  width: 18px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
}

tr td {
    padding: 5px;
}

/* 부모 컨테이너: 사각 테두리 안에 버튼 2개 */
.toggle-buttons {
  display: inline-flex;            /* 버튼들을 가로로 배치 */
  align-items: center;             /* 세로 가운데 정렬 */
  justify-content: space-between;  /* 버튼 사이 여백 균등 분배 */

  border-radius: 20px;             /* 모서리를 살짝 둥글게 (필요 시 조정) */

  /* 컨테이너 내부 여백 */
  padding: 5px;

  /* 너비는 원하는 대로 (고정/유동) */
  width: 180px;
  box-sizing: border-box;          /* 패딩/테두리 포함 계산 */
}

/* 개별 버튼 기본 스타일 */
.toggle-button {
  flex: 1;                         /* 너비 균등 분배 */
  border: none;                    /* 버튼 자체 테두리는 제거 */
  background: transparent;         /* 부모 배경이 비치도록 투명 */
  cursor: pointer;                 /* 마우스 포인터 */

  /* 버튼 안쪽 여백(높이 결정) */
  padding: 4px 0;
  font-size: 14px;

  /* 활성/비활성 전환 시 애니메이션(선택) */
  transition: background-color 0.3s, color 0.3s;
}

/* 활성화된 버튼 */
.toggle-button.active {
  border-radius: 20px;             /* 버튼 자체 모서리 (부모와 동일/조정 가능) */
}

.section {
    border-radius: 15px;
    padding: 5px;
}

.period-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 10px;
}

.period-button {
  padding: 8px 16px;
  font-size: 0.8rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.weekday {
    margin-left: 5px;
    color: #66aaff;
}

.header__right {
    margin-right: 20px;
}

.tab-button {
  text-decoration: none;
  font-size: 1rem;
}

/* 현재 페이지에 대한 스타일 (볼드 처리 등) */
.tab-button.active {
  font-weight: bold;
    font-size: 1.5rem;
}


.search-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 20px; /* 필요에 따라 간격 조정 */
}

#theme-stock-search,
#change30-search,
#value30-search,
#top3-search {
  width: 90%;  /* 원하는 너비로 조정 */
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.ticker-split {
    margin-right: 5px;
    margin-left: 5px;
}
