/* ─── Reset & Base ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
  background: #ffffff;
  color: #000000;
  font-family: 'Times New Roman', Times, serif;
  font-style: italic;
}

/* ─── Header ─── */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: calc(100vh - 320px - 56px);
  padding: 0 48px;
}

header h1 {
  font-size: clamp(3.5rem, 10vw, 9rem);
  font-weight: normal;
  font-style: italic;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  line-height: 1;
}

header .tagline {
  font-size: 2.8rem;
  letter-spacing: 0.2em;
  color: #e8a830;
  opacity: 1;
  margin-top: 14px;
  text-transform: lowercase;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: 'Times New Roman', Times, serif;
  font-style: italic;
  transition: text-shadow 0.3s ease, opacity 0.3s ease;
}

header .tagline:hover {
  text-shadow: 0 0 12px rgba(232, 168, 48, 0.8), 0 0 24px rgba(232, 168, 48, 0.4);
  opacity: 1;
}

header .tagline svg {
  width: 26px;
  height: 26px;
  fill: #e8a830;
  opacity: 0.8;
  flex-shrink: 0;
  transition: filter 0.3s ease;
}

header .tagline:hover svg {
  filter: drop-shadow(0 0 6px rgba(232, 168, 48, 0.9));
  opacity: 1;
}

/* ─── Footer ─── */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  height: 56px;
  background: #ffffff;
  border-top: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.footer-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  opacity: 0.3;
  transition: opacity 0.2s ease;
  text-decoration: none;
}

.footer-icon:hover {
  opacity: 1;
}

.footer-icon svg {
  width: 18px;
  height: 18px;
}

/* ─── Scroll Container ─── */
.scroll-container {
  position: fixed;
  bottom: 56px;
  left: 0;
  right: 0;
  height: 320px;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  overflow-x: scroll;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  background: #000000;
}

.scroll-container::-webkit-scrollbar {
  display: none;
}

.scroll-container:active {
  cursor: grabbing;
}

/* ─── Month Divider ─── */
.month-divider {
  min-width: 64px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #2a2a2a;
  flex-shrink: 0;
}

.month-divider span {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: 0.58rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #e8a830;
  opacity: 1;
  font-style: italic;
}

/* ─── Book Card ─── */
.book-card {
  min-width: 200px;
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 18px;
  padding: 16px 22px;
  border-right: 1px solid #1a1a1a;
  text-decoration: none;
  color: #c8862a;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  flex-shrink: 0;
  max-width: 420px;
}

.book-card.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ─── Hover: greyscale + magnify ─── */
.book-card:hover .cover-wrap img {
  filter: grayscale(100%);
  transform: scale(1.06);
}

/* ─── Cover Image ─── */
.cover-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.cover-wrap img {
  height: 260px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  display: block;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
  transition: filter 0.4s ease, transform 0.4s ease;
}

/* ─── Card Text ─── */
.card-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  flex: 1;
}

/* ─── Card Meta ─── */
.card-meta h2 {
  font-size: 1rem;
  font-weight: bold;
  font-style: italic;
  line-height: 1.25;
  color: #c8862a;
  white-space: normal;
  word-wrap: break-word;
}

.card-meta .author {
  font-size: 0.8rem;
  color: #c8862a;
  opacity: 0.7;
}

.card-meta .details {
  font-size: 0.68rem;
  color: #e8a830;
  opacity: 1;
  letter-spacing: 0.03em;
}

/* ─── Medium Badge ─── */
.medium {
  border: 1px solid #e8a830;
  padding: 1px 5px;
  font-style: italic;
  font-size: 0.62rem;
  color: #e8a830;
  letter-spacing: 0.03em;
}

/* ─── Preview Text ─── */
.preview {
  font-size: 0.78rem;
  line-height: 1.6;
  color: #c8862a;
  opacity: 0.65;
  margin-top: 2px;
  white-space: normal;
  word-wrap: break-word;
}

/* ─── Scroll Indicators ─── */
.scroll-btn {
  position: fixed;
  bottom: calc(56px + 160px);
  transform: translateY(50%);
  z-index: 20;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: 'Times New Roman', Times, serif;
  font-style: italic;
  font-size: 1.2rem;
  color: #c8862a;
  padding: 16px 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.scroll-btn.visible {
  opacity: 0.2;
  pointer-events: all;
}

.scroll-btn.visible:hover {
  opacity: 0.9;
}

.scroll-left {
  left: 8px;
}

.scroll-right {
  right: 8px;
}

/* ─── Mobile ─── */
@media (max-width: 768px) {
  header {
    padding: 0 24px;
    height: 8vh;
    justify-content: center;
  }

  header .tagline {
    font-size: clamp(1rem, 5vw, 1.6rem);
    letter-spacing: 0.12em;
  }

  header .tagline svg {
    width: 18px;
    height: 18px;
  }

  .scroll-container {
    top: 8vh;
    bottom: 56px;
    height: auto;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: none;
    scroll-behavior: auto;
  }

  .book-card {
    min-width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 90px;
    border-right: none;
    border-bottom: 1px solid #1a1a1a;
    padding: 14px 20px;
    gap: 16px;
    opacity: 1;
    transform: none;
  }

  .cover-wrap img {
    height: 70px;
    max-width: 46px;
  }

  .month-divider {
    min-width: 100%;
    height: 36px;
    border-right: none;
    border-bottom: 1px solid #2a2a2a;
  }

  .month-divider span {
    writing-mode: horizontal-tb;
    transform: none;
    font-size: 0.55rem;
  }

  .scroll-btn {
    display: none;
  }

  footer {
    gap: 24px;
  }
}
