:root {
  --bg: #F7F4EF;
  --surface: #FBF7F1;
  --primary: #C43A2F;
  --accent: #E8A9B8;
  --text: #3B3733;
  --muted: #8A8178;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-out: 6px 6px 14px rgba(180, 168, 152, 0.28), -6px -6px 14px rgba(255, 255, 255, 0.85);
  --shadow-in: inset 3px 3px 8px rgba(180, 168, 152, 0.22), inset -3px -3px 8px rgba(255, 255, 255, 0.9);
  --shadow-hover: 10px 10px 22px rgba(180, 168, 152, 0.34), -8px -8px 20px rgba(255, 255, 255, 0.95);
  --line: rgba(138, 129, 120, 0.18);
  --font-heading: 'Noto Serif SC', 'Songti SC', 'MS Mincho', serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 18% 12%, rgba(232, 169, 184, 0.14), transparent 42%),
    radial-gradient(circle at 82% 78%, rgba(196, 58, 47, 0.06), transparent 46%);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

img { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

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

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 247, 241, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(180, 168, 152, 0.12);
}

.header .wrap {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 68px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.logo::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--primary);
  vertical-align: middle;
  box-shadow: 0 0 0 4px rgba(196, 58, 47, 0.12);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar { display: none; }

.nav a {
  position: relative;
  display: inline-block;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  transition: all 0.22s ease;
}

.nav a:hover {
  color: var(--primary);
  background: rgba(232, 169, 184, 0.22);
}

.search-box {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-in);
}

.search-box input {
  width: 150px;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
}

.search-box input::placeholder { color: var(--muted); }

.search-box button {
  border: 0;
  cursor: pointer;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-family: var(--font-body);
  transition: opacity 0.2s ease;
}

.search-box button:hover { opacity: 0.86; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #a82f26);
  box-shadow: 4px 4px 12px rgba(196, 58, 47, 0.28), -3px -3px 10px rgba(255, 255, 255, 0.7);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 6px 8px 18px rgba(196, 58, 47, 0.34), -4px -4px 12px rgba(255, 255, 255, 0.8);
}

.btn.ghost {
  color: var(--primary);
  background: var(--surface);
  box-shadow: var(--shadow-out);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin: 28px auto 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-out);
}

.hero-slide {
  position: relative;
  display: block;
  aspect-ratio: 21 / 9;
  overflow: hidden;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.hero-slide:hover img { transform: scale(1.04); }

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(30, 26, 24, 0.82) 0%, rgba(30, 26, 24, 0.18) 48%, transparent 78%);
}

.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 26px 30px;
  color: #fff;
}

.hero-info h2 {
  font-size: 26px;
  margin-bottom: 8px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.hero-info p {
  margin: 0 0 14px;
  max-width: 640px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Sections ---------- */
.sec { margin: 46px 0; }

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.sec-title {
  position: relative;
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 700;
  padding-left: 16px;
  color: var(--text);
}

.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 20px;
  border-radius: 3px;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
}

.sec-more {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.sec-more:hover { color: var(--primary); }

.sec-more::after {
  content: "›";
  margin-left: 4px;
  font-size: 16px;
}

/* ---------- Grid & Cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

.card {
  display: block;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-out);
  overflow: hidden;
  transition: transform 0.26s ease, box-shadow 0.26s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(160deg, #efe8de, #e2d9cd);
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-cover img { transform: scale(1.06); }

.card-score {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  min-width: 34px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #9e2d24);
  box-shadow: 0 2px 8px rgba(196, 58, 47, 0.4);
}

.card-info { padding: 11px 12px 13px; }

.card-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  white-space: nowrap;
  overflow: hidden;
}

/* ---------- Categories ---------- */
.cat-list {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 18px 10px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-out);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  transition: transform 0.24s ease, box-shadow 0.24s ease, color 0.24s ease;
}

.cat-item:hover {
  transform: translateY(-4px);
  color: var(--primary);
  box-shadow: var(--shadow-hover);
}

.cat-count {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

/* ---------- Ranking ---------- */
.rank-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 26px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-out);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-hover);
}

.rank-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg);
  box-shadow: var(--shadow-in);
}

.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #a82f26);
  box-shadow: 0 3px 10px rgba(196, 58, 47, 0.35);
}

.rank-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-score {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}

/* ---------- Detail ---------- */
.detail {
  margin: 28px 0;
  padding: 26px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-out);
}

.detail-head {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.detail-cover {
  flex-shrink: 0;
  width: 230px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-out);
  background: linear-gradient(160deg, #efe8de, #e2d9cd);
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta {
  flex: 1 1 auto;
  min-width: 0;
}

.detail-meta h1 {
  font-size: 26px;
  margin-bottom: 10px;
  color: var(--text);
}

.detail-meta p {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--muted);
}

.detail-meta p strong {
  color: var(--text);
  font-weight: 500;
}

.detail-score {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin: 10px 0 14px;
  padding: 6px 16px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  background: var(--bg);
  box-shadow: var(--shadow-in);
}

.detail-score small {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.detail-body {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}

.detail-body h2,
.detail-body h3 {
  font-size: 18px;
  margin: 20px 0 10px;
  color: var(--text);
}

.detail-body p { margin: 0 0 14px; }

/* ---------- Tags ---------- */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

.tag {
  display: inline-block;
  padding: 4px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--muted);
  background: var(--bg);
  box-shadow: var(--shadow-in);
  transition: all 0.2s ease;
}

.tag:hover {
  color: var(--primary);
  background: rgba(232, 169, 184, 0.25);
}

/* ---------- Pager ---------- */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 36px 0 8px;
}

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 11px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-out);
  transition: all 0.2s ease;
}

.pg:hover {
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.pg.current {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #a82f26);
  box-shadow: 0 4px 12px rgba(196, 58, 47, 0.32);
  cursor: default;
}

.pg.disabled {
  color: var(--muted);
  opacity: 0.55;
  pointer-events: none;
  box-shadow: var(--shadow-in);
}

/* ---------- Links ---------- */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-out);
}

.link-item {
  font-size: 13px;
  color: var(--muted);
  padding: 3px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.link-item:hover {
  color: var(--primary);
  background: rgba(232, 169, 184, 0.2);
}

/* ---------- Crumbs ---------- */
.crumbs {
  margin: 20px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
}

.crumbs a { color: var(--muted); }

.crumbs a:hover { color: var(--primary); }

.crumbs span { color: var(--text); }

/* ---------- Highlight ---------- */
.hl {
  color: var(--primary);
  font-weight: 700;
  background: rgba(232, 169, 184, 0.28);
  border-radius: 3px;
  padding: 0 2px;
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 60px;
  padding: 34px 0 28px;
  border-top: 1px solid var(--line);
  background: linear-gradient(to bottom, rgba(251, 247, 241, 0), rgba(232, 169, 184, 0.1));
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 2;
}

.footer a { color: var(--muted); }

.footer a:hover { color: var(--primary); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .cat-list { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
  body { font-size: 14px; }

  .wrap { padding: 0 16px; }

  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .logo { font-size: 19px; }

  .nav {
    order: 3;
    width: 100%;
    flex: 1 1 100%;
    gap: 2px;
    padding-bottom: 2px;
  }

  .nav a { padding: 6px 11px; font-size: 13px; }

  .search-box {
    margin-left: auto;
    padding: 5px 10px;
  }

  .search-box input { width: 96px; font-size: 13px; }

  .search-box button { padding: 3px 9px; font-size: 12px; }

  .hero { margin-top: 18px; border-radius: 14px; }

  .hero-slide { aspect-ratio: 16 / 10; }

  .hero-info { padding: 16px 18px; }

  .hero-info h2 { font-size: 18px; margin-bottom: 5px; }

  .hero-info p { font-size: 12.5px; margin-bottom: 10px; }

  .btn { padding: 8px 18px; font-size: 13px; }

  .sec { margin: 30px 0; }

  .sec-head { margin-bottom: 14px; padding-bottom: 9px; }

  .sec-title { font-size: 17px; padding-left: 13px; }

  .sec-title::before { width: 4px; height: 16px; }

  .grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }

  .card { border-radius: 12px; }

  .card-info { padding: 8px 9px 10px; }

  .card-title { font-size: 12.5px; }

  .card-meta { font-size: 11px; gap: 3px 6px; }

  .card-score { top: 7px; right: 7px; font-size: 11px; padding: 1px 6px; min-width: 28px; }

  .cat-list { grid-template-columns: repeat(3, 1fr); gap: 10px; }

  .cat-item { padding: 13px 8px; font-size: 13.5px; border-radius: 12px; }

  .rank-list { grid-template-columns: 1fr; gap: 9px; }

  .rank-item { padding: 9px 12px; gap: 10px; }

  .rank-num { width: 26px; height: 26px; font-size: 12.5px; border-radius: 7px; }

  .rank-title { font-size: 13px; }

  .detail { padding: 18px 16px; margin: 18px 0; border-radius: 14px; }

  .detail-head { flex-direction: column; gap: 16px; }

  .detail-cover { width: 150px; align-self: center; }

  .detail-meta h1 { font-size: 20px; }

  .detail-meta p { font-size: 13px; }

  .detail-score { font-size: 18px; padding: 5px 13px; }

  .detail-body { margin-top: 18px; padding-top: 16px; font-size: 14px; }

  .tag { padding: 3px 10px; font-size: 12px; }

  .pg { min-width: 34px; height: 34px; font-size: 13px; border-radius: 9px; }

  .links { padding: 16px; gap: 8px 10px; }

  .footer { margin-top: 40px; padding: 24px 0 20px; font-size: 12px; }
}

@media (max-width: 380px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .cat-list { grid-template-columns: repeat(2, 1fr); }
}