/* Archive S - Classic Light Library CSS */
:root {
  --bg-main: #fdfcf8;      /* 따뜻한 페일 베이지 (종이 질감) */
  --bg-card: #ffffff;      /* 카드 배경 (순백색) */
  --accent-primary: #8b0000; /* 클래식 딥 버건디 */
  --accent-soft: #4a5568;    /* 차분한 슬레이트 그레이 */
  --text-main: #2d3436;    /* 잉크 느낌의 다크 슬레이트 */
  --text-sub: #718096;     /* 서브 텍스트 */
  --border-light: rgba(0, 0, 0, 0.05);
  --border-focus: rgba(139, 0, 0, 0.2);
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Pretendard', sans-serif;
  --nav-height: 70px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  margin: 0;
  padding: 0;
  padding-bottom: calc(var(--nav-height) + 40px);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 100%;
  padding: 0 24px;
  margin: 0 auto;
}

@media (min-width: 768px) { .container { max-width: 720px; } }
@media (min-width: 1024px) { .container { max-width: 900px; } }

/* Header */
header {
  padding: 40px 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-style: italic;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

/* Tag Filter (Chips) */
.filter-container {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding: 10px 0 30px;
  scrollbar-width: none;
}
.filter-container::-webkit-scrollbar { display: none; }

.filter-chip {
  padding: 8px 18px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--border-light);
  color: var(--text-sub);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
  transition: all 0.2s ease;
}
.filter-chip.active {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
  box-shadow: 0 4px 8px rgba(139, 0, 0, 0.2);
}

/* Section Header */
.section-header {
  margin: 40px 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 2px solid var(--accent-primary);
  padding-bottom: 8px;
}
.section-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}
.section-more {
  font-size: 0.75rem;
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Book Grid */
.book-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (min-width: 768px) {
  .book-grid { grid-template-columns: repeat(3, 1fr); }
}

.book-card {
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease;
}
.book-card:active { transform: scale(0.97); }

.book-cover-wrapper {
  width: 100%;
  aspect-ratio: 3/4.2;
  background: #f1f1f1;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 2px 4px 12px rgba(0,0,0,0.08);
  margin-bottom: 12px;
  border: 1px solid var(--border-light);
}
.book-cover-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-info-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-main);
  line-height: 1.3;
}
.book-info-meta {
  font-size: 0.75rem;
  color: var(--text-sub);
}

/* Bottom Nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(253, 252, 248, 0.9);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -4px 10px rgba(0,0,0,0.03);
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-sub);
  text-decoration: none;
  font-size: 0.65rem;
  font-weight: 600;
}
.nav-item.active { color: var(--accent-primary); }
.nav-item i { font-size: 1.4rem; }
