*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-text: #1a1a1a;
  --color-muted: #6b6b6b;
  --color-accent: #2c3e50;
  --color-bg: #ffffff;
  --color-bg-alt: #f7f5f2;
  --color-border: #e0ddd8;
  --notes-accent: #c0654a;
  --max-width: 960px;
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  font-family: var(--font-serif);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  font-size: 18px;
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 680px; }

.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.logo {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}
.logo:hover { text-decoration: none; }

/* Hamburger menu */
.site-header nav { position: relative; display: flex; align-items: center; }
.nav-toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; background: none; border: none; cursor: pointer;
  padding: 0; align-items: center;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px; background: var(--color-text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-menu {
  position: absolute; top: calc(100% + 8px); right: 0; background: var(--color-bg);
  border: 1px solid var(--color-border); border-radius: 4px; min-width: 190px;
  padding: 8px 0; box-shadow: 0 8px 24px rgba(0,0,0,0.08); display: none; z-index: 200;
}
.nav-menu.open { display: block; }
.nav-menu a {
  display: block; padding: 12px 20px; font-family: var(--font-sans);
  font-size: 15px; color: var(--color-muted);
}
.nav-menu a:hover, .nav-menu a.active {
  color: var(--color-text); background: var(--color-bg-alt); text-decoration: none;
}

.hero {
  text-align: center;
  padding: 100px 24px 80px;
  background: var(--color-bg-alt);
}
.hero h1 {
  font-size: 48px;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.hero-subtitle {
  max-width: 560px;
  margin: 0 auto 36px;
  font-size: 20px;
  color: var(--color-muted);
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  border-radius: 4px;
  transition: opacity 0.2s;
}
.btn:hover { text-decoration: none; opacity: 0.88; }
.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
}
.btn-outline:hover { background: var(--color-accent); color: #fff; }

.section { padding: 72px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-title {
  font-size: 32px;
  font-weight: 400;
  margin-bottom: 40px;
  letter-spacing: -0.01em;
}
.page-title {
  font-size: 42px;
  font-weight: 400;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.page-intro {
  font-size: 20px;
  color: var(--color-muted);
  margin-bottom: 56px;
  max-width: 600px;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.book-card {
  display: block;
  color: inherit;
}
.book-card:hover { text-decoration: none; }
.book-card h3 {
  font-size: 18px;
  font-weight: 400;
  margin: 16px 0 6px;
}
.book-card p {
  font-size: 14px;
  color: var(--color-muted);
  font-family: var(--font-sans);
}

.book-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 4px;
  aspect-ratio: 2 / 3;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  transition: transform 0.2s;
}
.book-card:hover .book-cover { transform: translateY(-4px); }
.book-cover-title {
  color: rgba(255,255,255,0.92);
  font-size: 16px;
  font-weight: 400;
  padding: 16px;
  line-height: 1.3;
}
.book-cover-sm { width: 120px; min-width: 120px; }
.book-cover-sm .book-cover-title { font-size: 13px; }
.book-cover-lg { width: 220px; min-width: 220px; }
.book-cover-lg .book-cover-title { font-size: 22px; }

.book-list { display: flex; flex-direction: column; gap: 40px; }
.book-row {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  color: inherit;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--color-border);
}
.book-row:last-child { border-bottom: none; }
.book-row:hover { text-decoration: none; }
.book-row-info h2 {
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 4px;
}
.book-row-info h2:hover { text-decoration: underline; }
.book-meta {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--color-muted);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.back-link {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--color-muted);
  margin-bottom: 40px;
  display: inline-block;
}
.back-link:hover { color: var(--color-text); text-decoration: none; }
.book-detail {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-bottom: 56px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--color-border);
}
.book-detail-info h1 {
  font-size: 36px;
  font-weight: 400;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.book-tagline {
  font-size: 20px;
  color: var(--color-muted);
  font-style: italic;
  margin-top: 12px;
}

.prose { max-width: 680px; }
.prose h2 {
  font-size: 26px;
  font-weight: 400;
  margin: 40px 0 16px;
  letter-spacing: -0.01em;
}
.prose p { margin-bottom: 20px; }
.prose ul { margin: 0 0 20px 24px; }
.prose li { margin-bottom: 8px; }
.series-list { list-style: none; margin-left: 0; padding-left: 0; }
.series-list li { margin-bottom: 12px; font-size: 18px; }

.about-teaser { max-width: 600px; }
.about-teaser p { font-size: 20px; color: var(--color-muted); margin-bottom: 28px; }

/* Homepage countdown */
.countdown {
  display: flex;
  gap: 14px;
  margin: 8px 0 20px;
  flex-wrap: wrap;
}
.countdown-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  padding: 16px 12px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.countdown-box span {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 400;
  color: var(--color-accent);
  line-height: 1;
}
.countdown-box label {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.countdown-label {
  font-size: 16px;
  color: var(--color-muted);
  margin-bottom: 28px;
  font-style: italic;
}
.countdown-live {
  font-size: 22px;
  color: var(--notes-accent);
  font-weight: 400;
  margin: 12px 0 24px;
}

/* Purchase section (book detail pages) */
.purchase {
  margin: 40px 0;
  padding: 28px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}
.purchase-title {
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 18px;
}
.purchase-option {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--color-border);
}
.purchase-option:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.purchase-option .btn { margin-right: 10px; }
.purchase-note {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--color-muted);
  margin-top: 8px;
}
.purchase-contact {
  font-family: var(--font-sans);
  font-size: 15px;
  margin-top: 8px;
}

/* Author's Notes — playful page */
.notes-hero {
  text-align: center;
  padding: 90px 24px 60px;
  background: linear-gradient(180deg, #fbf3ef 0%, var(--color-bg) 100%);
}
.notes-hero h1 {
  font-size: 54px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  display: inline-block;
}
.notes-hero h1::after {
  content: '';
  display: block;
  height: 4px;
  margin: 14px auto 0;
  background: var(--notes-accent);
  border-radius: 2px;
  animation: noteUnderline 2.4s ease-in-out infinite alternate;
}
@keyframes noteUnderline {
  from { width: 40%; opacity: 0.55; }
  to { width: 72%; opacity: 1; }
}
.notes-tagline {
  font-size: 22px;
  color: var(--color-muted);
  font-style: italic;
  max-width: 560px;
  margin: 0 auto;
  transition: opacity 0.4s ease;
}

.schedule-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin: 36px 0 8px;
}
.schedule-card {
  padding: 18px 26px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  text-align: center;
  min-width: 150px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.schedule-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.07);
}
.schedule-card.first {
  border-color: var(--notes-accent);
  background: #fbf3ef;
}
.schedule-date {
  font-size: 19px;
  font-weight: 400;
}
.schedule-label {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--color-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.notes-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.note-card {
  display: block;
  color: inherit;
  padding: 28px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  animation: noteFadeIn 0.5s ease both;
}
.note-card:hover {
  text-decoration: none;
  transform: translateY(-6px);
  box-shadow: 0 14px 32px rgba(0,0,0,0.08);
  border-color: var(--notes-accent);
}
.note-card h2 {
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 8px;
  transition: color 0.2s ease;
}
.note-card:hover h2 { color: var(--notes-accent); }
.note-card p {
  font-size: 15px;
  color: var(--color-muted);
  font-family: var(--font-sans);
}
@keyframes noteFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.notes-empty {
  text-align: center;
  padding: 48px 24px;
  border: 1px dashed var(--color-border);
  border-radius: 10px;
  background: var(--color-bg-alt);
}
.notes-empty p { font-size: 19px; color: var(--color-text); }
.notes-empty-sub {
  font-size: 15px;
  color: var(--color-muted);
  font-family: var(--font-sans);
  margin-top: 8px;
}

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 32px 0;
  text-align: center;
}
.site-footer p {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--color-muted);
}

@media (max-width: 768px) {
  .book-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .book-card { text-align: center; }
  .book-card .book-cover { margin: 0 auto; max-width: 180px; }
  .hero h1 { font-size: 34px; }
  .hero-subtitle { font-size: 18px; }
  .book-detail { flex-direction: column; align-items: center; text-align: center; }
  .book-row { flex-direction: column; align-items: center; text-align: center; }
  .page-title { font-size: 32px; }
  .section-title { font-size: 26px; }
  .notes-hero h1 { font-size: 40px; }
  .notes-tagline { font-size: 18px; }
  .notes-list { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .book-grid { grid-template-columns: 1fr; }
  .countdown-box { min-width: 64px; }
  .countdown-box span { font-size: 28px; }
}