@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');
@import url('https://fonts.googleapis.com/css2?family=Pacifico&display=swap');

@font-face {
  font-family: 'Paperlogy';
  font-style: normal;
  font-weight: 400;
  src: url('https://cdn.jsdelivr.net/gh/fonts-archive/Paperlogy/Paperlogy-4Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Paperlogy';
  font-style: normal;
  font-weight: 700;
  src: url('https://cdn.jsdelivr.net/gh/fonts-archive/Paperlogy/Paperlogy-7Bold.woff2') format('woff2');
}

@font-face {
  font-family: 'Paperlogy';
  font-style: normal;
  font-weight: 800;
  src: url('https://cdn.jsdelivr.net/gh/fonts-archive/Paperlogy/Paperlogy-8ExtraBold.woff2') format('woff2');
}

:root {
  --page: #fffaf3;
  --ink: #202124;
  --muted: #6f6a61;
  --line: #ece2d2;
  --accent: #1f8f55;
  --accent-dark: #14613d;
}

body {
  background: var(--page);
  color: var(--ink);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 0.98rem;
  overflow-x: hidden;
  overflow-wrap: break-word;
  word-break: keep-all;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

.site-nav {
  backdrop-filter: blur(10px);
  background: rgba(255, 250, 243, 0.92);
}

.nav-inner {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  min-height: 4rem;
}

.navbar-brand {
  color: var(--accent-dark);
  font-family: 'Pacifico', cursive;
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.4;
  text-decoration: none;
}

h1,
h2,
h3,
.brand-link,
.section-head h2,
.auth-panel h1,
.write-panel h1 {
  font-family: 'Paperlogy', 'Pretendard', sans-serif;
}

.nav-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-left: auto;
}

.nav-actions .nav-link {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-size: 0.95rem;
  font-weight: 600;
  min-height: 2rem;
  padding: 0.25rem 0.5rem;
  white-space: nowrap;
}

.hero {
  align-items: center;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  padding: 3rem 0 2rem;
}

.hero > * {
  min-width: 0;
}

.hero h1 {
  font-size: clamp(2.25rem, 7vw, 5rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  max-width: 48rem;
}

.hero-copy {
  color: var(--muted);
  font-size: 1rem;
  max-width: 34rem;
}

.hero-photo {
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(rgba(20, 97, 61, 0.08), rgba(20, 97, 61, 0.08)),
    url('https://images.unsplash.com/photo-1555396273-367ea4eb4db5?auto=format&fit=crop&w=900&q=80');
  background-position: center;
  background-size: cover;
  border-radius: 1.5rem;
  min-height: 0;
  width: 100%;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.section-head {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
}

.section-head h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
}

.section-head p,
.metadata {
  font-size: 0.9rem;
  color: var(--muted);
}

.review-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.review-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.25rem;
  min-width: 0;
}

.review-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.review-card > .d-flex {
  align-items: flex-start;
}

.review-card .btn-group {
  flex: 0 0 auto;
}

.review-content {
  white-space: pre-wrap;
}

.review-author {
  color: var(--accent-dark);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.comment-list {
  max-height: 13rem;
  overflow-y: auto;
}

.comment-box {
  align-items: flex-start;
  background: #f8f2e9;
  border-radius: 0.75rem;
  padding: 0.75rem;
}

.comment-box .btn {
  align-self: flex-start;
  flex: 0 0 auto;
}

.comment-login {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  color: var(--muted);
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0.75rem;
}

.comment-author {
  color: var(--accent-dark);
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.empty-state {
  background: #ffffff;
  border: 1px dashed var(--line);
  border-radius: 1rem;
  color: var(--muted);
  padding: 2rem;
  text-align: center;
}

.auth-layout {
  align-items: center;
  display: grid;
  min-height: 100vh;
  padding: 2rem;
  place-items: center;
}

.auth-panel,
.write-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: 0 1.5rem 4rem rgba(32, 33, 36, 0.08);
  max-width: 30rem;
  padding: 2rem;
  width: 100%;
}

.auth-panel .form-control {
  font-size: 1rem;
  min-height: 3rem;
}

.auth-panel .btn-lg {
  font-size: 1rem;
  min-height: 3rem;
}

.write-panel {
  max-width: 54rem;
}

.brand-link {
  color: var(--accent-dark);
  display: inline-block;
  font-weight: 800;
  margin-bottom: 2rem;
  text-decoration: none;
}

.auth-panel h1,
.write-panel h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.sub-link {
  color: var(--accent-dark);
  display: inline-block;
  margin-top: 1.25rem;
}

.auth-divider {
  align-items: center;
  color: var(--muted);
  display: flex;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.auth-divider::before,
.auth-divider::after {
  background: var(--line);
  content: '';
  flex: 1 1 0;
  height: 1px;
}

.social-actions {
  display: grid;
  gap: 0.75rem;
}

.social-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  display: flex;
  font-size: 1rem;
  font-weight: 700;
  gap: 0.75rem;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1rem;
  width: 100%;
}

.social-button.google {
  background: #ffffff;
  color: #202124;
}

.social-button.kakao {
  background: #fee500;
  border-color: #fee500;
  color: #191600;
}

.social-icon {
  align-items: center;
  display: inline-flex;
  flex: 0 0 1.25rem;
  height: 1.25rem;
  width: 1.25rem;
}

.auth-notice {
  background: #f8f2e9;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.25rem;
}

.auth-notice h2 {
  font-family: 'Paperlogy', 'Pretendard', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.auth-notice p {
  color: var(--muted);
}

.status-pill {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 0.875rem;
  padding: 0.35rem 0.8rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.mypage-section {
  margin-bottom: 2.5rem;
}

.mypage-heading {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.mypage-info dt {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.mypage-info dd {
  font-size: 0.95rem;
  margin-bottom: 0;
  word-break: break-all;
}

.mypage-nickname {
  display: flex;
  gap: 0.5rem;
  max-width: 22rem;
}

.mypage-nickname .form-control {
  font-size: 0.95rem;
}

.mypage-nickname .btn {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .nav-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    padding-top: 0.75rem;
  }

  .nav-actions {
    justify-content: flex-start;
    margin-left: 0;
    width: 100%;
  }

  .hero,
  .review-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 2rem 0 1.5rem;
  }

  .hero-photo {
    aspect-ratio: 16 / 10;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
    gap: 1rem;
  }

  .review-card > .d-flex {
    flex-direction: column;
  }

  .review-card .btn-group {
    width: 100%;
  }

  .review-card .btn-group .btn {
    flex: 1 1 0;
  }

  .comment-login,
  .comment-form {
    align-items: stretch;
    flex-direction: column;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .nav-actions {
    gap: 0.25rem;
  }

  .nav-actions .nav-link,
  .nav-actions .btn {
    font-size: 0.875rem;
  }

  .auth-layout {
    padding: 1rem;
  }

  .auth-panel,
  .write-panel {
    padding: 1.25rem;
  }
}

/* 장소 검색 결과 목록은 길어지면 스크롤한다 */
.place-results {
  max-height: 16rem;
  overflow-y: auto;
}

/* 선택 위치 미리보기 지도 높이 */
#placeMap {
  height: 220px;
}

/* 목록 카드의 위치 지도 높이 */
.review-map {
  height: 220px;
}

/* 목록 지도 컨트롤은 줄바꿈을 허용한다 */
.map-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: space-between;
}

/* 지도 선택 버튼은 색 채움 없이 상태만 표시한다 */
.map-toolbar [aria-pressed='true'] {
  box-shadow: inset 0 0 0 1px currentColor;
  font-weight: 700;
}

/* 확대된 목록 지도 높이 */
.review-map-expanded {
  height: min(70vh, 520px);
}

/* 지도 정보창의 이름·주소 표시 */
.map-info {
  padding: 0.5rem 0.75rem;
  max-width: 220px;
  line-height: 1.4;
}

.map-info-name {
  display: block;
}

.map-info-address {
  margin-top: 0.15rem;
  font-size: 0.8rem;
  color: #6c757d;
}
