:root {
  --bg: #FAF8F4;
  --surface: #FFFFFF;
  --primary: #A63D2F;
  --accent: #C9A15A;
  --text: #1E1B18;
  --muted: #857B70;
  --radius: 6px;
  --font-heading: 'Playfair Display', 'Noto Serif SC', 'Source Han Serif SC', Georgia, serif;
  --font-body: 'Noto Sans SC', 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --line: #E8E2D8;
}

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

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

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

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .2px;
}

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

/* ============ Header ============ */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  letter-spacing: .5px;
  flex-shrink: 0;
}
.logo::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--primary);
  margin-right: 8px;
  vertical-align: middle;
  transform: rotate(45deg);
}

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

.nav a {
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav a:hover {
  color: var(--primary);
  border-bottom-color: var(--accent);
}

.search-box {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  flex-shrink: 0;
}
.search-box input {
  border: 0;
  outline: 0;
  background: transparent;
  padding: 8px 12px;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text);
  width: 150px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  border: 0;
  background: var(--primary);
  color: #fff;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background .2s;
}
.search-box button:hover { background: #8f3226; }

/* ============ Hero ============ */
.hero {
  position: relative;
  margin: 28px auto;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--text);
}
.hero-slide {
  position: relative;
  display: block;
  aspect-ratio: 16 / 7;
  overflow: hidden;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.hero-slide:hover img { transform: scale(1.03); }
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(30,27,24,.85) 0%, rgba(30,27,24,.15) 55%, transparent 100%);
}
.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 28px 32px;
  z-index: 2;
  color: #fff;
  max-width: 70%;
}
.hero-info h2 {
  font-size: 30px;
  margin-bottom: 8px;
  color: #fff;
}
.hero-info p {
  font-size: 14px;
  color: rgba(255,255,255,.82);
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-block;
  padding: 9px 22px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--primary);
  transition: background .2s, color .2s, border-color .2s;
  cursor: pointer;
}
.btn:hover {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

/* ============ Section ============ */
.sec { margin: 40px auto; }

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 22px;
  gap: 16px;
}
.sec-title {
  font-size: 22px;
  color: var(--text);
  position: relative;
  padding-left: 14px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  background: var(--primary);
  border-radius: 2px;
}
.sec-more {
  font-size: 13px;
  color: var(--muted);
  transition: color .2s;
  white-space: nowrap;
}
.sec-more:hover { color: var(--primary); }

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

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid transparent;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(30,27,24,.08);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--bg);
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.card:hover .card-cover img { transform: scale(1.05); }

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: .5px;
  box-shadow: 0 2px 6px rgba(166,61,47,.35);
}

.card-info {
  padding: 10px 12px 12px;
}
.card-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.card-meta {
  font-size: 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============ Cat list ============ */
.cat-list {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 15px;
  color: var(--text);
  transition: border-color .2s, color .2s;
}
.cat-item:hover {
  border-color: var(--accent);
  color: var(--primary);
}
.cat-count {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--muted);
  background: var(--bg);
  padding: 1px 8px;
  border-radius: 10px;
}

/* ============ Rank list ============ */
.rank-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 40px;
  border-top: 1px solid var(--line);
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  transition: color .2s;
}
.rank-item:hover { color: var(--primary); }
.rank-num {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  min-width: 32px;
  text-align: center;
}
.rank-item:nth-child(-n+3) .rank-num { color: var(--primary); }
.rank-title {
  flex: 1;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-score {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
}

/* ============ Detail ============ */
.detail { margin: 32px auto; }

.detail-head {
  display: flex;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.detail-cover {
  flex: 0 0 240px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-meta {
  flex: 1;
  min-width: 0;
}
.detail-meta h1 {
  font-size: 30px;
  margin-bottom: 8px;
}
.detail-meta .sub {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 18px;
}
.detail-meta p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}
.detail-meta p strong {
  color: var(--text);
  font-weight: 600;
  margin-right: 6px;
}
.detail-score {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 4px 14px;
  margin: 14px 0;
  letter-spacing: 1px;
}

.detail-body {
  padding: 28px 0;
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}
.detail-body h2 {
  font-size: 20px;
  margin: 24px 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--primary);
}
.detail-body p { margin-bottom: 14px; color: #3a352f; }

/* ============ Tag list ============ */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}
.tag {
  display: inline-block;
  font-size: 13px;
  color: var(--muted);
  padding: 4px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  transition: border-color .2s, color .2s;
}
.tag:hover {
  border-color: var(--accent);
  color: var(--primary);
}

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

/* ============ Links ============ */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 20px 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: 48px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 32px 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.9;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }

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

/* ============ Highlight ============ */
.hl {
  color: var(--primary);
  font-weight: 600;
  background: rgba(201,161,90,.18);
  padding: 0 2px;
  border-radius: 2px;
}

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

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

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

  .hero { margin: 18px auto; }
  .hero-slide { aspect-ratio: 4 / 5; }
  .hero-info {
    max-width: 100%;
    padding: 18px 20px;
  }
  .hero-info h2 { font-size: 22px; }

  .sec { margin: 28px auto; }
  .sec-title { font-size: 19px; }

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

  .detail-head {
    flex-direction: column;
    gap: 20px;
  }
  .detail-cover {
    flex: none;
    width: 160px;
    margin: 0 auto;
  }
  .detail-meta h1 { font-size: 22px; text-align: center; }
  .detail-meta .sub { text-align: center; }
  .detail-score { display: block; text-align: center; }

  .card-title { font-size: 14px; }
  .pg { min-width: 34px; height: 34px; font-size: 13px; }
}