:root {
  --primary: #7B5B3A;
  --primary-hover: #5D3F24;
  --primary-dark: #5D3F24;
  --primary-light: #D4A574;
  --secondary: #A0522D;
  --accent: #D4A574;
  --background: #FBF8F5;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.88);
  --text-main: #2C1810;
  --text-muted: #7A6B5F;
  --border: #E8DFD5;
  --shadow-sm: 0 1px 2px 0 rgba(44, 24, 16, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(44, 24, 16, 0.1), 0 2px 4px -1px rgba(44, 24, 16, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(44, 24, 16, 0.1), 0 4px 6px -2px rgba(44, 24, 16, 0.05);
  --radius: 12px;
  --radius-lg: 20px;
  --gradient-warm: linear-gradient(135deg, #7B5B3A, #A0522D);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', 'Noto Sans KR', sans-serif;
}

body {
  background-color: var(--background);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

html {
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, p, .footer-phone {
  word-break: keep-all;
  text-wrap: balance;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

ul { list-style: none; }

/* ===== Header & Glassmorphism Navigation ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

.nav-container {
  max-width: 1280px;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 0;
}

.logo .cross-icon {
  width: 36px;
  height: 36px;
  color: #7B5B3A;
  flex-shrink: 0;
}

.logo span {
  color: var(--text-main);
  font-weight: 700;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 2rem;
  margin-left: 2.5rem;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  font-size: 0.95rem;
}

.nav-links a:hover { color: var(--primary); }

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary);
  transition: width 0.3s ease;
}

.nav-links a:hover::after { width: 100%; }

.btn-primary {
  background: var(--gradient-warm);
  color: white !important;
  padding: 0.5rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: var(--primary-hover); /* 호버 시 색상 변화 추가 */
}

.btn-outline {
  background: var(--surface);
  color: var(--text-main) !important;
  border: 1px solid var(--border);
  padding: 0.5rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-outline:hover {
  border-color: var(--primary);
  color: white !important; /* 글자색을 흰색으로 */
  background: var(--primary); /* 배경을 채워서 확실히 보이게 */
}

.pc-only { display: flex; align-items: center; gap: 0.8rem; }
.mobile-auth-links { display: none; }

/* Mobile hamburger */
.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border);
  padding: 5px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-main);
  transition: all 0.2s;
}
.mobile-menu-btn:hover {
  background: var(--background);
  color: var(--primary);
}

/* ===== Hero Section ===== */
.hero {
  max-width: 1280px;
  margin: 3rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-text h1 {
  font-size: 2.75rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--text-main), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  word-break: keep-all;
  text-wrap: balance;
}

.hero-text p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.8;
  word-break: keep-all;
  text-wrap: balance;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-img {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin-left: auto;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #F5EDE4, #E8DFD5);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-img-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--primary);
  opacity: 0.4;
}

/* ===== Section Titles ===== */
.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 1.5rem;
  letter-spacing: -0.05em;
  text-wrap: balance; /* 글자 균형 줄바꿈 추가 */
  word-break: keep-all; /* 단어 보존 추가 */
}

.hero-desc {
  font-size: 1.15rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2.5rem;
  max-width: 600px;
  text-wrap: balance; /* 글자 균형 줄바꿈 추가 */
  word-break: keep-all; /* 단어 보존 추가 */
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title::before {
  content: '';
  display: block;
  width: 24px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}

/* ===== Banner ===== */
.info-banner {
  background: linear-gradient(135deg, rgba(123, 91, 58, 0.08), rgba(160, 82, 45, 0.08));
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.info-banner h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.info-banner p {
  color: var(--text-muted);
  line-height: 1.8;
}

/* ===== Container ===== */
.container {
  max-width: 1280px;
  margin: 0 auto 3rem auto;
  padding: 0 1.5rem;
}

/* ===== Books Grid ===== */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.5rem;
}

.book-card {
  background: transparent;
  padding: 0.5rem;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.book-card:hover {
  transform: translateY(-4px);
}

.book-cover {
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  background: linear-gradient(135deg, #F5EDE4, #E8DFD5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: bold;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.book-card:hover .book-cover {
  box-shadow: var(--shadow-lg);
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  height: 2.8em; /* 정확히 2줄 분량의 강제 높이 유지 (들쭉날쭉 방지) */
  word-break: keep-all; /* 단어 단위로 줄바꿈 (글자 쪼개짐 방지) */
  text-wrap: balance; /* 각 줄의 텍스트 길이를 균형 있게 분배 */
  white-space: normal; /* 상속된 nowrap 방지용 */
}

.book-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Audio Book Featured Card ===== */
.audio-featured {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.audio-featured::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(123, 91, 58, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(20%, -20%);
  pointer-events: none;
}

.audio-cover {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: var(--text-main);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.5);
  overflow: hidden;
}

.audio-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.audio-info h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.audio-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.audio-desc {
  margin-bottom: 1.5rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.play-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary);
  color: white;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius);
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 0.95rem;
}

.play-btn:hover { background: var(--primary-hover); }

/* ===== Channel Cards ===== */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.channel-card {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.channel-card:hover {
  box-shadow: var(--shadow-md);
}

.channel-card h4 {
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.channel-card li {
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.channel-card li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* ===== Payment Section ===== */
.payment-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 3rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.payment-section h2 {
  margin-bottom: 0.5rem;
}

.payment-price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin: 1.5rem 0;
}

.payment-price small {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
}

.payment-features {
  text-align: left;
  margin: 2rem 0;
}

.payment-features li {
  padding: 0.5rem 0;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.payment-features li::before {
  content: '✓';
  color: var(--primary);
  font-weight: bold;
}

/* ===== Footer ===== */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  margin-top: 4rem;
}

footer .footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

footer .footer-policy-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
  font-weight: 700;
}

footer .footer-policy-links a {
  color: var(--text-main);
}

footer .footer-policy-links a:hover {
  color: var(--primary);
}

footer .footer-policy-links span {
  color: var(--border);
}

footer .footer-phone {
  margin-top: 1rem;
  font-weight: bold;
  color: var(--text-main);
  font-size: 1.1rem;
}

/* ===== Responsive ===== */
@media (max-width: 1023px) {
  .pc-only { display: none !important; }
  .mobile-menu-btn {
    display: block;
    flex-shrink: 0;
    margin-left: auto;
  }
}

@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    margin: 2rem auto;
    gap: 2rem;
  }
  .hero-text h1 { font-size: 2rem; }
  .hero-actions { justify-content: center; }
  .hero-img { max-width: 320px; margin: 0 auto; }
  
  .pc-only { display: none !important; }
  .mobile-menu-btn { display: block; margin-left: auto; }

  
  .audio-featured {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .audio-cover {
    width: 180px;
    margin: 0 auto;
  }
  
  .books-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
  }

  .info-banner {
    flex-direction: column;
    text-align: center;
  }

  .payment-section { padding: 2rem 1.5rem; }
}

@media (max-width: 480px) {
  .hero-text h1 { font-size: 1.6rem; }
  .books-grid { grid-template-columns: repeat(2, 1fr); }
  .channel-grid { grid-template-columns: 1fr; }
}
