:root {
  --bg: #FBF7F2;
  --surface: #FFFFFF;
  --primary: #E86A17;
  --accent: #FF8A3D;
  --text: #2B2B2B;
  --muted: #8A7F76;
  --radius: 24px;
  --radius-sm: 14px;
  --line: #E7DED4;
  --shadow: 0 18px 40px -24px rgba(43, 43, 43, .35);
  --font-heading: 'Playfair Display', 'Songti SC', 'STSong', 'Noto Serif SC', serif;
  --font-body: 'DM Sans', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
button, input { font: inherit; }

.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, 242, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 68px;
}
.logo {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .5px;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo span, .logo em { color: var(--primary); font-style: normal; }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  display: inline-block;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--muted);
  border-radius: 999px;
  white-space: nowrap;
  transition: color .2s, background .2s;
}
.nav a:hover { color: var(--primary); background: rgba(232, 106, 23, .08); }

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 4px 4px 16px;
  box-shadow: 0 6px 18px -14px rgba(43, 43, 43, .4);
}
.search-box input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 150px;
  color: var(--text);
  font-size: 14px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  border: 0;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  transition: background .2s;
}
.search-box button:hover { background: var(--accent); }

/* ===== Hero ===== */
.hero {
  position: relative;
  margin: 28px auto 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #1f1c19;
  box-shadow: var(--shadow);
}
.hero-slide {
  position: relative;
  display: block;
  aspect-ratio: 16 / 7;
  min-height: 240px;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .85;
}
.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 36px 32px;
  background: linear-gradient(to top, rgba(20, 16, 12, .92), rgba(20, 16, 12, 0));
  color: #fff;
}
.hero-info h2, .hero-info h3 {
  font-family: var(--font-heading);
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1.2;
  margin-bottom: 10px;
}
.hero-info p {
  color: rgba(255, 255, 255, .78);
  font-size: 14px;
  max-width: 640px;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 26px;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  transition: transform .2s, background .2s, box-shadow .2s;
  box-shadow: 0 12px 24px -14px rgba(232, 106, 23, .9);
}
.btn:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -14px rgba(232, 106, 23, .9);
}

/* ===== Section ===== */
.sec { margin-top: 52px; }
.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.sec-title {
  font-family: var(--font-heading);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  line-height: 1.2;
  position: relative;
  padding-left: 16px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 4px;
  background: var(--primary);
}
.sec-more {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  transition: color .2s;
}
.sec-more:hover { color: var(--primary); }

/* ===== Grid & Card ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 26px 20px;
}
.card {
  display: block;
  background: var(--surface);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 10px 26px -22px rgba(43, 43, 43, .5);
  transition: transform .25s, box-shadow .25s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 40px -24px rgba(43, 43, 43, .55);
}
.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #efe7dd;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.card:hover .card-cover img { transform: scale(1.05); }
.card-score {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .6);
}
.card-info { padding: 12px 12px 14px; }
.card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .2s;
}
.card:hover .card-title { color: var(--primary); }
.card-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  overflow: hidden;
  white-space: nowrap;
}

/* ===== Category list ===== */
.cat-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: border-color .2s, color .2s, transform .2s;
}
.cat-item:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}
.cat-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: var(--bg);
  padding: 2px 9px;
  border-radius: 999px;
}

/* ===== Rank list ===== */
.rank-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 6px 32px;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
  transition: color .2s;
}
.rank-item:hover { color: var(--primary); }
.rank-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-heading);
}
.rank-item:nth-child(-n+3) .rank-num {
  background: var(--primary);
  color: #fff;
}
.rank-title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-score {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

/* ===== Detail ===== */
.detail { margin-top: 32px; }
.detail-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 36px;
  align-items: start;
  padding: 28px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #efe7dd;
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: clamp(24px, 3.4vw, 38px);
  line-height: 1.2;
  margin-bottom: 14px;
}
.detail-score {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
}
.detail-score small { font-size: 13px; color: var(--muted); font-family: var(--font-body); }
.detail-meta p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
}
.detail-meta p b { color: var(--text); font-weight: 600; }
.detail-body {
  margin-top: 28px;
  padding: 28px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 15px;
  line-height: 1.85;
  color: #4a423b;
}
.detail-body h2, .detail-body h3 {
  font-family: var(--font-heading);
  color: var(--text);
  margin: 22px 0 12px;
}
.detail-body p { margin-bottom: 14px; }
.detail-body img { border-radius: var(--radius-sm); margin: 14px 0; }

/* ===== Tags ===== */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.tag {
  display: inline-block;
  padding: 5px 14px;
  font-size: 12px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color .2s, border-color .2s;
}
.tag:hover { color: var(--primary); border-color: var(--primary); }

/* ===== Pager ===== */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 44px 0 12px;
}
.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: background .2s, color .2s, border-color .2s;
}
.pg:hover { border-color: var(--primary); color: var(--primary); }
.pg.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 700;
}
.pg.disabled {
  opacity: .45;
  pointer-events: none;
  background: var(--bg);
}

/* ===== Links ===== */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.link-item {
  font-size: 13px;
  color: var(--muted);
  transition: color .2s;
}
.link-item:hover { color: var(--primary); }

/* ===== Footer ===== */
.footer {
  margin-top: 64px;
  padding: 40px 0 34px;
  background: #241f1a;
  color: rgba(255, 255, 255, .68);
  font-size: 13px;
  line-height: 1.9;
}
.footer a { color: rgba(255, 255, 255, .68); transition: color .2s; }
.footer a:hover { color: var(--accent); }
.footer .wrap { display: flex; flex-direction: column; gap: 10px; }
.footer strong { color: #fff; font-family: var(--font-heading); font-size: 17px; }

/* ===== Crumbs ===== */
.crumbs {
  padding: 22px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
}
.crumbs a { color: var(--muted); transition: color .2s; }
.crumbs a:hover { color: var(--primary); }
.crumbs span { color: var(--text); }

/* ===== Highlight ===== */
.hl {
  color: var(--primary);
  background: rgba(255, 138, 61, .16);
  border-radius: 4px;
  padding: 0 2px;
  font-style: normal;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .wrap { padding: 0 16px; }

  .header .wrap {
    flex-wrap: wrap;
    height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 10px;
  }
  .logo { font-size: 20px; }
  .search-box { order: 3; width: 100%; }
  .search-box input { width: 100%; flex: 1; }
  .nav {
    order: 4;
    width: 100%;
    flex: none;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .hero { margin-top: 18px; border-radius: 18px; }
  .hero-slide { aspect-ratio: 4 / 5; }
  .hero-info { padding: 24px 20px 22px; }

  .sec { margin-top: 36px; }
  .sec-head { margin-bottom: 18px; }

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

  .cat-list { grid-template-columns: repeat(2, 1fr); }
  .rank-list { grid-template-columns: 1fr; }

  .detail-head {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }
  .detail-cover { max-width: 200px; margin: 0 auto; }
  .detail-body { padding: 20px; }

  .footer { margin-top: 44px; }
}