/* 1. 전체 box-sizing 통일 & 가로 스크롤 방지 */
html, body {
  box-sizing: border-box;
  overflow-x: hidden;
}
*, *::before, *::after {
  box-sizing: inherit;
}

/* 2. 기본 페이지 스타일 */
body {
  font-family: 'Noto Sans KR', sans-serif;
  background: #eef4f8;
  margin: 0;
  padding: 0;
  color: #222;
}

/* 3. 컨테이너: 양 옆 1rem 패딩 추가 */
.container {
  max-width: 960px;
  margin: 100px auto;
  padding: 30px 1rem; /* 기존 30px → 30px 1rem */
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

/* 4. 제목 및 설명 */
h1 {
  font-size: 26px;
  color: #0a4d74;
  text-align: center;
  margin-bottom: 20px;
}
.description {
  text-align: center;
  margin-bottom: 24px;
  font-size: 15px;
  color: #444;
  line-height: 1.6;
}

/* 5. 검색 입력창: 폭 100% 고정, 최대폭 해제 */
#searchInput {
  width: 100%;          /* 화면 폭 가득 채우기 */
  max-width: 100%;      /* 기존 max-width:420px 해제 */
  margin: 0 auto 24px;
  padding: 14px 18px;
  display: block;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #ccc;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  box-sizing: border-box;
}

/* 6. 테이블 래퍼: 자체 스크롤 */
.table-wrapper {
  overflow-x: auto;
}
#contactsTable {
  width: 100%;
  border-collapse: collapse;
  display: none;
}
#contactsTable thead {
  background: #f0f7ff;
}
#contactsTable th, #contactsTable td {
  padding: 12px 10px;
  border: 1px solid #c7d7e4;
  font-size: 14px;
  text-align: left;
}
#contactsTable tbody tr:nth-child(even) {
  background: #f9fcff;
}
#contactsTable td.phone {
  cursor: pointer;
  color: #0066cc;
  text-decoration: underline;
}
#contactsTable td.phone:hover {
  background: #e1f0ff;
}

/* 7. 토스트 */
#toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: #fff;
  padding: 12px 24px;
  border-radius: 20px;
  font-size: 14px;
  display: none;
  z-index: 9999;
}

/* 8. 홈 버튼 */
.home-button {
  position: fixed;
  top: 12px;
  left: 0; right: 0;
  margin: auto;
  width: fit-content;
  padding: 14px 24px;
  background-color: #0066cc;
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1.3em;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
  z-index: 999;
}
.home-button:hover {
  background-color: #004999;
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
}
.home-button::before {
  content: "";
  position: absolute;
  top: 0; left: -75%;
  width: 50%; height: 100%;
  background: rgba(255,255,255,0.4);
  transform: skewX(-30deg);
  animation: shine 3s infinite;
}
@keyframes shine {
  0%   { left: -75%; }
  50%  { left: 125%; }
  100% { left: -75%; }
}

/* 9. 푸터 */
footer {
  text-align: center;
  font-size: 14px;
  color: #888;
  margin: 60px 0 30px;
}
