:root {
  --bg: #F3EDE4;
  --surface: #FBF7F0;
  --primary: #E2574C;
  --accent: #3B8C8A;
  --text: #2E2A26;
  --muted: #8C8377;
  --radius: 18px;
  --font-heading: "Hiragino Mincho ProN", "Songti SC", "Noto Serif SC", Georgia, serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  --shadow-soft: 0 2px 6px rgba(46, 42, 38, 0.06), 0 12px 28px rgba(46, 42, 38, 0.08);
  --shadow-lift: 0 4px 10px rgba(46, 42, 38, 0.08), 0 18px 40px rgba(46, 42, 38, 0.12);
  --line: rgba(46, 42, 38, 0.1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; margin: 0; }

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

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 247, 240, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(226, 87, 76, 0.18);
}

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

.nav a {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}
.nav a:hover { color: var(--text); background: rgba(59, 140, 138, 0.1); }
.nav a.active { color: var(--primary); background: rgba(226, 87, 76, 0.1); }

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 6px 4px 14px;
  box-shadow: inset 0 1px 2px rgba(46, 42, 38, 0.04);
}
.search-box input {
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text);
  width: 140px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  border: 0;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--font-body);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  border: 0;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(226, 87, 76, 0.28);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(226, 87, 76, 0.34); }
.btn.ghost {
  background: rgba(251, 247, 240, 0.6);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin: 26px 0 8px;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(120deg, rgba(59, 140, 138, 0.16), rgba(226, 87, 76, 0.12));
  box-shadow: var(--shadow-soft);
}

.hero-slide {
  position: relative;
  display: block;
  aspect-ratio: 21 / 9;
  min-height: 260px;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(46, 42, 38, 0.72) 0%, rgba(46, 42, 38, 0.28) 46%, rgba(46, 42, 38, 0) 78%);
}

.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 32px 36px;
  max-width: 560px;
  color: #fff;
}
.hero-info h2 {
  font-size: 26px;
  line-height: 1.3;
  margin-bottom: 10px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.hero-info p {
  margin: 0 0 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Section ---------- */
.sec { margin: 40px 0; }

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

.sec-title {
  font-size: 20px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sec-title::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--accent);
}

.sec-more {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
  white-space: nowrap;
  transition: color 0.2s;
}
.sec-more:hover { color: var(--primary); }

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

.card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(59, 140, 138, 0.08);
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.card:hover .card-cover img { transform: scale(1.05); }

.card-score {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  min-width: 38px;
  height: 30px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  border-radius: 999px 999px 999px 4px;
  box-shadow: 0 4px 10px rgba(226, 87, 76, 0.4);
}

.card-info { padding: 12px 14px 16px; }

.card-title {
  font-family: var(--font-heading);
  font-size: 15px;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  letter-spacing: 0.02em;
}

/* ---------- Category list ---------- */
.cat-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.cat-item:hover {
  border-color: rgba(59, 140, 138, 0.4);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.cat-count {
  font-size: 11px;
  color: var(--accent);
  background: rgba(59, 140, 138, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- Rank list ---------- */
.rank-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 24px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border-bottom: 1px dashed var(--line);
  transition: background 0.2s;
}
.rank-item:hover { background: rgba(251, 247, 240, 0.9); }

.rank-num {
  flex: 0 0 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  background: rgba(46, 42, 38, 0.05);
  border-radius: 8px;
}
.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num {
  color: #fff;
  background: var(--primary);
}

.rank-title {
  flex: 1;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-score {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

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

.detail-head {
  display: flex;
  gap: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.detail-cover {
  flex: 0 0 220px;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }

.detail-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.detail-meta h1 {
  font-size: 26px;
  line-height: 1.3;
}
.detail-meta p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.detail-meta p b { color: var(--text); font-weight: 500; }

.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 700;
  color: var(--primary);
}

.detail-body {
  padding-top: 22px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--text);
}
.detail-body h2 {
  font-size: 17px;
  margin: 22px 0 10px;
}
.detail-body p { margin: 0 0 12px; }

/* ---------- Tags ---------- */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--accent);
  background: rgba(59, 140, 138, 0.08);
  border: 1px solid rgba(59, 140, 138, 0.2);
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}
.tag:hover { background: var(--accent); color: #fff; }

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

.pg {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.pg:hover { border-color: var(--accent); color: var(--accent); }

.pg.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 14px rgba(226, 87, 76, 0.28);
}

.pg.disabled {
  color: var(--muted);
  opacity: 0.5;
  pointer-events: none;
}

/* ---------- Links ---------- */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.link-item {
  font-size: 12px;
  color: var(--muted);
  transition: color 0.2s;
}
.link-item:hover { color: var(--accent); }

/* ---------- Crumbs ---------- */
.crumbs {
  font-size: 12px;
  color: var(--muted);
  padding: 16px 0 0;
  letter-spacing: 0.02em;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }
.crumbs span { margin: 0 6px; opacity: 0.6; }

/* ---------- Highlight ---------- */
.hl {
  color: var(--primary);
  background: rgba(226, 87, 76, 0.1);
  padding: 0 2px;
  border-radius: 3px;
  font-weight: 600;
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 50px;
  padding: 30px 0 40px;
  border-top: 1px solid var(--line);
  background: rgba(251, 247, 240, 0.6);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.9;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }

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

@media (max-width: 768px) {
  .wrap { padding: 0 14px; }

  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .logo { font-size: 18px; }
  .nav {
    order: 3;
    width: 100%;
    flex: 0 0 100%;
    gap: 2px;
    padding-bottom: 2px;
  }
  .search-box { margin-left: auto; }
  .search-box input { width: 100px; }

  .hero { margin-top: 16px; }
  .hero-slide { aspect-ratio: 4 / 3; min-height: 0; }
  .hero-slide::after {
    background: linear-gradient(0deg, rgba(46, 42, 38, 0.78) 0%, rgba(46, 42, 38, 0.2) 60%, rgba(46, 42, 38, 0) 100%);
  }
  .hero-info { padding: 20px 18px; max-width: 100%; }
  .hero-info h2 { font-size: 19px; }
  .hero-info p { font-size: 12px; -webkit-line-clamp: 2; }

  .sec { margin: 28px 0; }
  .sec-title { font-size: 17px; }

  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-info { padding: 10px 10px 12px; }
  .card-title { font-size: 13px; }
  .card-meta { font-size: 11px; }

  .cat-list { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-item { padding: 12px; font-size: 13px; }

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

  .detail { padding: 18px 14px; }
  .detail-head { flex-direction: column; gap: 16px; }
  .detail-cover { flex: none; width: 140px; }
  .detail-meta h1 { font-size: 20px; }
  .detail-score { font-size: 24px; }

  .pg { min-width: 32px; height: 32px; padding: 0 9px; font-size: 12px; }
}