@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;600;700&display=swap");

:root {
  --bg: #f2f5fa;
  --surface: #ffffff;
  --surface-muted: #f3f6fa;
  --text: #1b2433;
  --text-muted: #5b6780;
  --accent: #2956d8;
  --accent-hover: #1f44b2;
  --border: #d6deeb;
  --shadow: 0 14px 36px rgba(21, 36, 63, 0.08);
  --radius: 14px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8faff 0%, #eef2f9 100%);
  line-height: 1.6;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-hover);
}

.site-shell {
  width: min(1100px, 100% - 2rem);
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.site-header {
  margin-bottom: 1.75rem;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100vw;
  margin: -2rem 0 1rem calc(50% - 50vw);
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 20px rgba(20, 31, 51, 0.08);
  backdrop-filter: blur(8px);
}

.top-nav a {
  text-decoration: none;
  font-weight: 600;
}

.top-nav-brand {
  font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

.top-nav-links {
  margin-left: auto;
  display: flex;
  gap: 0.6rem;
}

.top-nav-links a {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
}

.site-title {
  margin: 0;
  font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 700;
}

.site-subtitle {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1rem, 2.5vw, 2rem);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.books-grid {
  align-items: stretch;
}

.books-grid .card-link {
  display: flex;
}

.books-grid .card {
  width: 100%;
  height: 100%;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.card-link:hover {
  color: inherit;
}

.card-link:hover .card {
  border-color: #bec9dc;
  transform: translateY(-1px);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #ffffff;
  padding: 0.5rem;
}

.card-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-content h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.35;
}

.card-content h2 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.25;
}

.card-meta {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.93rem;
}

.button {
  display: inline-block;
  margin-top: 0.85rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}

.card-content .button {
  margin-top: auto;
  align-self: flex-start;
}

.button:hover {
  background: var(--accent-hover);
  color: #fff;
}

.split {
  display: grid;
  grid-template-columns: minmax(170px, 280px) 1fr;
  gap: 1.5rem;
  align-items: start;
}

.detail-cover {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 20px rgba(20, 31, 51, 0.08);
}

.badge {
  display: inline-block;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 0.84rem;
  margin-bottom: 0.7rem;
}

.section-title {
  margin: 1.3rem 0 0.45rem;
  font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
}

.notice {
  border-left: 4px solid var(--accent);
  padding: 0.8rem 1rem;
  border-radius: 8px;
  background: #fff1ed;
}

.site-footer {
  margin-top: 2rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.nav-link {
  margin-right: 0.8rem;
}

.home-card .card-cover {
  height: 480px;
  aspect-ratio: auto;
}

.home-card .card-content {
  padding: 0.75rem 1rem 0.9rem;
}

@media (max-width: 720px) {
  .split {
    grid-template-columns: 1fr;
  }
}
