:root {
  --bg: #FBF3E6;
  --surface: #FFF9F0;
  --primary: #E63B2E;
  --accent: #F5A623;
  --text: #1E1B16;
  --muted: #8A7E6C;
  --radius: 20px;
  --border: 2px solid var(--text);
  --shadow-hard: 4px 4px 0 var(--text);
  --shadow-soft: 0 10px 30px rgba(230, 59, 46, 0.12);
  --font-heading: 'Playfair Display', 'Noto Serif SC', 'Songti SC', Georgia, serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 20% 10%, rgba(245, 166, 35, 0.08) 0, transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(230, 59, 46, 0.06) 0, transparent 40%);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: var(--border);
  box-shadow: 0 2px 0 rgba(30, 27, 22, 0.05);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}
.logo span { color: var(--primary); }

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

.nav a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.nav a:hover {
  background: var(--primary);
  color: var(--surface);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: var(--border);
  border-radius: 999px;
  padding: 6px 6px 6px 16px;
  flex-shrink: 0;
}
.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  width: 140px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  border: none;
  background: var(--primary);
  color: var(--surface);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s;
}
.search-box button:hover { background: var(--accent); color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin: 32px 0;
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-hard), var(--shadow-soft);
}

.hero-slide {
  position: relative;
  display: block;
  aspect-ratio: 21 / 9;
  overflow: hidden;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(30, 27, 22, 0.85) 0%, rgba(30, 27, 22, 0.15) 55%, transparent 100%);
}

.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 32px;
  max-width: 70%;
  color: var(--surface);
}
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: clamp(24px, 4vw, 44px);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 10px;
  text-shadow: 2px 2px 0 rgba(30, 27, 22, 0.4);
}
.hero-info p {
  font-size: 15px;
  color: rgba(255, 249, 240, 0.85);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-block;
  padding: 10px 26px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--accent);
  border: var(--border);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--text);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover {
  transform: translate(-1px, -1px) rotate(-1deg);
  box-shadow: 5px 5px 0 var(--text);
}
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--text);
}

/* ---------- 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: 3px solid var(--text);
  position: relative;
}
.sec-head::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 64px;
  height: 3px;
  background: var(--primary);
}

.sec-title {
  font-family: var(--font-heading);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.sec-more {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  padding-bottom: 4px;
}
.sec-more:hover { text-decoration: underline; }

/* ---------- Grid & Card ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-hard);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translate(-3px, -3px) rotate(-0.8deg);
  box-shadow: 7px 7px 0 var(--text), var(--shadow-soft);
}

.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 0.3s;
}
.card:hover .card-cover img { transform: scale(1.05); }

.card-score {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 3px 10px;
  font-size: 13px;
  font-weight: 800;
  color: var(--surface);
  background: var(--primary);
  border: 2px solid var(--surface);
  border-radius: 999px;
}

.card-info {
  padding: 12px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Category list ---------- */
.cat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cat-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 700;
  background: var(--surface);
  border: var(--border);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--text);
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
}
.cat-item:hover {
  background: var(--accent);
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--text);
}

.cat-count {
  font-size: 12px;
  font-weight: 800;
  color: var(--surface);
  background: var(--primary);
  padding: 1px 8px;
  border-radius: 999px;
}

/* ---------- Rank list ---------- */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 var(--text);
  transition: transform 0.15s, box-shadow 0.15s;
}
.rank-item:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--text);
}

.rank-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 900;
  color: var(--surface);
  background: var(--text);
  border-radius: 10px;
}
.rank-item:nth-child(1) .rank-num { background: var(--primary); }
.rank-item:nth-child(2) .rank-num { background: var(--accent); color: var(--text); }
.rank-item:nth-child(3) .rank-num { background: var(--muted); }

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

.rank-score {
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
}

/* ---------- Detail ---------- */
.detail { margin: 32px 0; }

.detail-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  padding: 28px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard), var(--shadow-soft);
}

.detail-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: var(--border);
  border-radius: 14px;
  background: var(--bg);
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: clamp(24px, 3.5vw, 38px);
  font-weight: 900;
  line-height: 1.2;
}
.detail-meta p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.9;
}
.detail-meta p strong { color: var(--text); }

.detail-score {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}
.detail-score small {
  font-size: 14px;
  color: var(--muted);
  font-family: var(--font-body);
}

.detail-body {
  margin-top: 24px;
  padding: 28px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  font-size: 15px;
  line-height: 1.9;
}
.detail-body h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 900;
  margin: 20px 0 12px;
}
.detail-body h2:first-child { margin-top: 0; }
.detail-body p { margin-bottom: 12px; color: var(--text); }

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

.tag {
  display: inline-block;
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  border: 2px solid var(--text);
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}
.tag:hover {
  background: var(--primary);
  color: var(--surface);
}

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

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  background: var(--surface);
  border: var(--border);
  border-radius: 12px;
  box-shadow: 2px 2px 0 var(--text);
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
}
.pg:hover {
  background: var(--accent);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--text);
}
.pg.current {
  background: var(--primary);
  color: var(--surface);
  pointer-events: none;
}
.pg.disabled {
  opacity: 0.4;
  pointer-events: none;
  box-shadow: none;
}

/* ---------- Links ---------- */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 24px 0;
}

.link-item {
  font-size: 13px;
  color: var(--muted);
  padding: 4px 12px;
  border: 1px dashed var(--muted);
  border-radius: 999px;
  transition: color 0.2s, border-color 0.2s;
}
.link-item:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 48px;
  padding: 32px 0;
  background: var(--text);
  color: rgba(255, 249, 240, 0.75);
  font-size: 13px;
  text-align: center;
  border-top: 4px solid var(--primary);
}
.footer a { color: var(--accent); }
.footer a:hover { text-decoration: underline; }
.footer p { margin: 6px 0; }

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

/* ---------- Highlight ---------- */
.hl {
  color: var(--surface);
  background: var(--primary);
  padding: 0 4px;
  border-radius: 4px;
  font-weight: 700;
}

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

  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .logo { font-size: 22px; }
  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
  .nav a { padding: 6px 12px; font-size: 14px; }
  .search-box { margin-left: auto; }
  .search-box input { width: 100px; }

  .hero { margin: 20px 0; }
  .hero-slide { aspect-ratio: 4 / 5; }
  .hero-info {
    max-width: 100%;
    padding: 20px;
  }

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

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

  .sec { margin: 28px 0; }
  .rank-item { padding: 10px 14px; gap: 12px; }
  .rank-title { font-size: 14px; }
}