:root {
  --color-primary: #FF6B6B;
  --color-primary-dark: #E84747;
  --color-bg: #FFF5F5;
  --color-surface: #FFFFFF;
  --color-text: #1A1A1A;
  --color-muted: #666666;
  --color-border: #F0E4E4;
  --shadow: 0 8px 28px rgba(232, 71, 71, 0.08);
  --radius: 16px;
  --max: 1120px;
  --font: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,245,245,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; gap: 16px;
}
.brand {
  font-size: 22px; font-weight: 800; color: var(--color-primary-dark);
  letter-spacing: 0.02em;
}
.nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav a {
  font-size: 15px; color: var(--color-muted); font-weight: 500;
}
.nav a:hover, .nav a.active { color: var(--color-primary-dark); }
.nav-toggle {
  display: none; width: 40px; height: 40px; border: 0; background: transparent;
  flex-direction: column; justify-content: center; gap: 5px; cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px; width: 22px; background: var(--color-text); margin: 0 auto;
}

.site-main { padding-bottom: 48px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; border: 0; cursor: pointer; font-weight: 600;
  padding: 12px 22px; transition: 0.2s ease;
}
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-outline {
  background: transparent; color: var(--color-primary-dark);
  border: 1.5px solid var(--color-primary);
}
.btn-outline:hover { background: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.hero {
  padding: 56px 0 40px;
  background:
    radial-gradient(circle at 85% 20%, rgba(255,107,107,0.18), transparent 40%),
    linear-gradient(180deg, #FFF5F5 0%, #FFFFFF 100%);
}
.hero-grid {
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center;
}
.hero-kicker {
  display: inline-block; font-size: 13px; font-weight: 700;
  color: var(--color-primary-dark); background: #ffe4e4;
  padding: 6px 12px; border-radius: 999px; margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(28px, 4vw, 44px); line-height: 1.25; margin-bottom: 16px;
}
.hero h1 em { font-style: normal; color: var(--color-primary-dark); }
.hero-lead { color: var(--color-muted); font-size: 17px; margin-bottom: 24px; max-width: 34em; }
.hero-card {
  background: var(--color-surface); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px; border: 1px solid var(--color-border);
}
.hero-card h2 { font-size: 18px; margin-bottom: 12px; }
.hero-card li { color: var(--color-muted); margin: 8px 0; padding-left: 18px; position: relative; }
.hero-card li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--color-primary);
}

.section { padding: 48px 0; }
.section-head { margin-bottom: 28px; }
.section-head h2 { font-size: 26px; margin-bottom: 8px; }
.section-head p { color: var(--color-muted); }

.book-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.book-card {
  background: var(--color-surface); border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--color-border);
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.book-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.book-cover {
  aspect-ratio: 3/4; background: #ffeaea; display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-body { padding: 14px 16px 18px; }
.book-emotion {
  display: inline-block; font-size: 12px; font-weight: 700; color: #fff;
  padding: 3px 10px; border-radius: 999px; margin-bottom: 8px;
}
.book-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.book-meta { font-size: 13px; color: var(--color-muted); }

.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plan-card {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 24px; box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.plan-card.featured {
  border-color: var(--color-primary);
  box-shadow: var(--shadow);
}
.plan-name { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.plan-price { font-size: 36px; font-weight: 800; color: var(--color-primary-dark); }
.plan-price span { font-size: 14px; font-weight: 500; color: var(--color-muted); }
.plan-desc { color: var(--color-muted); margin: 12px 0 20px; min-height: 3em; }

.filters {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; align-items: center;
}
.filters input, .filters select {
  border: 1px solid var(--color-border); border-radius: 999px;
  padding: 10px 14px; background: #fff; font: inherit;
}
.filters input { min-width: 200px; }

.detail-layout {
  display: grid; grid-template-columns: 280px 1fr; gap: 36px; padding-top: 36px;
}
.detail-cover {
  border-radius: var(--radius); overflow: hidden; background: #ffeaea;
  aspect-ratio: 3/4; box-shadow: var(--shadow);
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.badge {
  display: inline-block; color: #fff; font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; margin-bottom: 10px;
}
.panel {
  background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 18px 20px; margin-top: 18px;
}
.panel h3 { font-size: 16px; margin-bottom: 10px; }
.panel li { color: var(--color-muted); margin: 6px 0; }

.reader-stage, .watch-stage {
  max-width: 900px; margin: 28px auto; background: #fff;
  border-radius: var(--radius); border: 1px solid var(--color-border);
  box-shadow: var(--shadow); overflow: hidden;
}
.reader-toolbar, .watch-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; border-bottom: 1px solid var(--color-border); gap: 12px;
}
.reader-frame {
  min-height: 420px; display: flex; align-items: center; justify-content: center;
  background: #111; color: #fff; position: relative;
}
.reader-frame img { max-height: 70vh; width: auto; margin: 0 auto; }
.reader-nav {
  display: flex; justify-content: space-between; padding: 14px 18px; gap: 12px;
}
.watch-player { background: #000; aspect-ratio: 9/16; max-height: 80vh; margin: 0 auto; }
.watch-player video { width: 100%; height: 100%; object-fit: contain; }
.gate {
  text-align: center; padding: 48px 24px; color: var(--color-muted);
}
.gate strong { display: block; color: var(--color-text); font-size: 20px; margin-bottom: 8px; }

.auth-box, .me-box {
  max-width: 440px; margin: 40px auto; background: #fff;
  border-radius: var(--radius); border: 1px solid var(--color-border);
  padding: 28px; box-shadow: var(--shadow);
}
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: var(--color-muted); margin-bottom: 6px; }
.form-group input {
  width: 100%; border: 1px solid var(--color-border); border-radius: 12px;
  padding: 12px 14px; font: inherit;
}
.form-msg { color: var(--color-primary-dark); font-size: 14px; min-height: 1.4em; margin: 8px 0; }
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tabs button {
  flex: 1; border: 1px solid var(--color-border); background: #fff;
  border-radius: 999px; padding: 10px; cursor: pointer; font-weight: 600;
}
.tabs button.active { background: var(--color-primary); color: #fff; border-color: transparent; }

.prose { max-width: 760px; }
.prose h1 { font-size: 32px; margin: 28px 0 16px; }
.prose h2 { font-size: 22px; margin: 28px 0 12px; }
.prose p, .prose li { color: var(--color-muted); margin-bottom: 10px; }
.prose ul { padding-left: 1.2em; list-style: disc; }
.prose a { color: var(--color-primary-dark); text-decoration: underline; }

.site-footer {
  background: #2b2222; color: #f5eaea; padding: 48px 0 24px; margin-top: 40px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 28px; margin-bottom: 28px;
}
.footer-brand { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.footer-title { font-weight: 700; margin-bottom: 10px; }
.footer-desc, .site-footer p { color: #cbb; font-size: 14px; margin-bottom: 8px; }
.site-footer a { display: block; color: #eee; font-size: 14px; margin: 6px 0; opacity: 0.9; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.08); padding-top: 16px; font-size: 13px; color: #aaa;
}
.footer-bottom a { display: inline; color: #aaa; }

.empty { text-align: center; color: var(--color-muted); padding: 48px 0; }

@media (max-width: 960px) {
  .hero-grid, .detail-layout, .plan-grid, .book-grid, .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .book-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 64px;
    background: #fff; flex-direction: column; align-items: stretch;
    padding: 12px 20px 20px; border-bottom: 1px solid var(--color-border);
  }
  .nav.open { display: flex; }
  .hero-grid, .detail-layout, .plan-grid, .footer-grid, .book-grid {
    grid-template-columns: 1fr;
  }
  .hero { padding-top: 36px; }
}
