/* 모든 화면이 같이 쓰는 기본 스타일 */

/* 색
   글자 #333, 덜 중요한 글자 #888, 선 #e5e5e5, 옅은 배경 #f7f7f7, 강조 #2a6fdb

   화면 폭 기준
   360px 이하: 작은 휴대폰
   600px 이상: 태블릿
   900px 이상: 데스크톱 (지도 화면이 좌우로 나뉨. css/map.css) */

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  /* 기기가 다크 모드여도 글자가 보이게 배경과 글자색을 정해 둔다 */
  background: #fff;
  color: #333;
  /* 띄어쓰기 없는 긴 글자가 화면 밖으로 나가지 않게 한다 */
  overflow-wrap: anywhere;
}

/* 맨 위 바. 모든 화면에 같은 모양으로 들어간다 */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid #e5e5e5;
  background: #fff;
}

.site-title {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  /* 폭이 좁으면 제목이 두 줄이 되지 않고 뒤가 잘린다 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-title:hover {
  text-decoration: none;
}

.site-header .button {
  flex-shrink: 0;
  padding: 6px 12px;
  font-size: 14px;
}

/* 본문. 글이 너무 넓게 퍼지지 않게 폭을 제한하고 가운데에 둔다 */
.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

h1 {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.4;
}

h2 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.4;
}

p {
  margin: 0 0 12px;
}

a {
  color: #2a6fdb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* 입력 칸과 버튼은 글꼴을 따로 정해 주지 않으면 브라우저 기본 글꼴로 나온다 */
input,
button {
  font-family: inherit;
  font-size: 15px;
}

input[type="text"],
input[type="search"],
input[type="number"] {
  padding: 9px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  color: #333;
}

input:focus {
  border-color: #2a6fdb;
  outline: none;
}

/* 기본 버튼. 링크를 버튼처럼 보이게 할 때는 class="button"을 붙인다 */
button,
.button {
  display: inline-block;
  padding: 9px 16px;
  border: 1px solid #2a6fdb;
  border-radius: 4px;
  background: #2a6fdb;
  color: #fff;
  cursor: pointer;
}

button:hover,
.button:hover {
  background: #1f5cbd;
  border-color: #1f5cbd;
  text-decoration: none;
}

button:disabled {
  background: #a9c1ea;
  border-color: #a9c1ea;
  cursor: default;
}

/* 키보드로 옮겨 다닐 때 지금 어디에 있는지 보이게 한다 */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #2a6fdb;
  outline-offset: 2px;
}

/* 덜 중요한 안내 글자 */
.sub {
  font-size: 13px;
  color: #888;
}

/* 작은 휴대폰: 여백과 제목을 조금 줄인다 */
@media (max-width: 360px) {
  .site-header {
    padding: 0 12px;
  }

  .site-title {
    font-size: 15px;
  }

  .page {
    padding: 16px 12px 32px;
  }
}

/* 태블릿 이상: 여백을 넓힌다 */
@media (min-width: 600px) {
  .site-header {
    padding: 0 24px;
  }

  .page {
    padding: 28px 24px 48px;
  }
}
