:root {
  --bg: #FFFCF7;
  --surface: #FFFFFF;
  --primary: #F08A3C;
  --accent: #D94F30;
  --text: #2E2A26;
  --muted: #9A9188;
  --radius: 18px;
  --font-heading: "Noto Serif SC", "Songti SC", "STSong", serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --shadow: 0 6px 22px rgba(240, 138, 60, 0.10);
  --shadow-hover: 0 12px 30px rgba(240, 138, 60, 0.18);
  --line: #F0E8DD;
}

* { 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.7;
  background-image: radial-gradient(rgba(240,138,60,0.035) 1px, transparent 1px);
  background-size: 22px 22px;
}

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

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

/* ---------- Header ---------- */
.header {
  background: rgba(255, 252, 247, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 64px;
}
.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  letter-spacing: 1px;
}
.logo::after {
  content: "印";
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  color: #fff;
  background: var(--accent);
  border-radius: 4px;
  padding: 1px 4px;
  vertical-align: super;
  font-family: var(--font-body);
}
.nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--text);
  font-size: 14px;
  transition: background .2s, color .2s;
}
.nav a:hover { background: rgba(240,138,60,0.12); color: var(--accent); }

.search-box {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 4px 4px 14px;
  min-width: 200px;
}
.search-box input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  width: 100%;
  color: var(--text);
  font-family: var(--font-body);
}
.search-box button {
  border: none;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background .2s;
}
.search-box button:hover { background: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin: 22px 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
}
.hero-slide {
  position: relative;
  display: none;
  aspect-ratio: 16 / 7;
  background: #f4ece2;
}
.hero-slide:first-child { display: block; }
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 26px 22px;
  background: linear-gradient(to top, rgba(46,42,38,0.82), rgba(46,42,38,0));
  color: #fff;
}
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  margin-bottom: 6px;
}
.hero-info p {
  font-size: 13px;
  opacity: .85;
  max-width: 640px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.btn {
  display: inline-block;
  margin-top: 12px;
  background: var(--primary);
  color: #fff;
  padding: 8px 22px;
  border-radius: 999px;
  font-size: 14px;
  transition: background .2s, transform .2s;
}
.btn:hover { background: var(--accent); transform: translateY(-1px); }

/* ---------- Section ---------- */
.sec { margin: 34px 0; }
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.sec-title {
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 700;
  position: relative;
  padding-left: 14px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 18px;
  border-radius: 3px;
  background: var(--primary);
}
.sec-more {
  font-size: 13px;
  color: var(--muted);
  transition: color .2s;
}
.sec-more:hover { color: var(--accent); }

/* ---------- Grid & Card ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 18px;
}
.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #f4ece2;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.card:hover .card-cover img { transform: scale(1.06); }
.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(217,79,48,0.35);
}
.card-info { padding: 10px 12px 14px; }
.card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  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(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}
.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  transition: border-color .2s, color .2s;
}
.cat-item:hover { border-color: var(--primary); color: var(--accent); }
.cat-count {
  font-size: 12px;
  color: var(--muted);
  background: var(--bg);
  border-radius: 999px;
  padding: 1px 8px;
}

/* ---------- Rank list ---------- */
.rank-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: var(--shadow);
  transition: transform .2s;
}
.rank-item:hover { transform: translateX(3px); }
.rank-num {
  flex: 0 0 26px;
  height: 26px;
  line-height: 26px;
  text-align: center;
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}
.rank-item:nth-child(1) .rank-num { background: var(--accent); color: #fff; }
.rank-item:nth-child(2) .rank-num { background: var(--primary); color: #fff; }
.rank-item:nth-child(3) .rank-num { background: #F6C08A; color: #fff; }
.rank-title {
  flex: 1;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-score {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

/* ---------- Detail ---------- */
.detail { margin: 26px 0; }
.detail-head {
  display: flex;
  gap: 24px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.detail-cover {
  flex: 0 0 200px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: #f4ece2;
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-meta { flex: 1; min-width: 0; }
.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 24px;
  margin-bottom: 10px;
}
.detail-meta p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}
.detail-meta p b { color: var(--text); font-weight: 600; }
.detail-score {
  display: inline-block;
  margin: 10px 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-heading);
}
.detail-body {
  margin-top: 22px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  font-size: 15px;
  line-height: 1.9;
}
.detail-body h2 {
  font-family: var(--font-heading);
  font-size: 18px;
  margin: 18px 0 10px;
  padding-left: 12px;
  border-left: 4px solid var(--primary);
}
.detail-body p { margin-bottom: 12px; }

/* ---------- Tags ---------- */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag {
  font-size: 12px;
  color: var(--accent);
  background: rgba(240,138,60,0.10);
  border-radius: 999px;
  padding: 3px 12px;
  transition: background .2s;
}
.tag:hover { background: rgba(240,138,60,0.22); }

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

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

.footer {
  margin-top: 40px;
  padding: 26px 0 34px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--accent); }

/* ---------- Crumbs ---------- */
.crumbs {
  font-size: 13px;
  color: var(--muted);
  padding: 16px 0 6px;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs span { margin: 0 6px; }

/* ---------- Highlight ---------- */
.hl {
  color: var(--accent);
  background: rgba(240,138,60,0.16);
  border-radius: 3px;
  padding: 0 2px;
}

/* ---------- Responsive ---------- */
@media (min-width: 768px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .rank-list { grid-template-columns: repeat(2, 1fr); }
  .hero-slide { aspect-ratio: 16 / 6; }
  .hero-info h2 { font-size: 30px; }
}

@media (min-width: 1200px) {
  .grid { grid-template-columns: repeat(6, 1fr); }
  .rank-list { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .header .wrap {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 16px;
    gap: 10px;
  }
  .logo { font-size: 19px; }
  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .search-box { min-width: 0; flex: 1; }
  .hero-slide { aspect-ratio: 4 / 3; }
  .hero-info { padding: 30px 16px 16px; }
  .hero-info h2 { font-size: 19px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .rank-list { grid-template-columns: 1fr; }
  .detail-head { flex-direction: column; padding: 16px; }
  .detail-cover { flex: none; width: 140px; margin: 0 auto; }
  .detail-meta h1 { font-size: 20px; text-align: center; }
  .detail-meta p { text-align: center; }
  .detail-score { display: block; text-align: center; }
  .detail-body { padding: 18px; }
  .sec-title { font-size: 18px; }
  .pg { height: 32px; line-height: 30px; min-width: 32px; padding: 0 10px; }
}