:root {
  --bg: #F7F4EE;
  --surface: #FFFFFF;
  --primary: #1A1A1A;
  --accent: #FF4D6D;
  --text: #1A1A1A;
  --muted: #7A7A7A;
  --radius: 16px;
  --border: 2px solid #1A1A1A;
  --shadow: 0 4px 0 #1A1A1A;
  --font-h: 'Playfair Display', 'Noto Serif SC', Georgia, serif;
  --font-b: 'Inter', 'Noto Sans SC', -apple-system, Helvetica, sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-b);
  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; }

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

/* ---------- Header ---------- */
.header {
  background: var(--surface);
  border-bottom: var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

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

.logo::after {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  margin-left: 4px;
  vertical-align: super;
}

.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: 6px 14px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 999px;
  transition: background .2s, color .2s;
}
.nav a:hover {
  background: var(--accent);
  color: #fff;
}

.search-box {
  display: flex;
  align-items: center;
  border: var(--border);
  border-radius: 999px;
  background: var(--bg);
  overflow: hidden;
  flex-shrink: 0;
  height: 40px;
}
.search-box input {
  border: none;
  background: transparent;
  padding: 0 14px;
  font-size: 14px;
  font-family: var(--font-b);
  outline: none;
  width: 160px;
  color: var(--text);
}
.search-box button {
  border: none;
  background: var(--accent);
  color: #fff;
  height: 100%;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-b);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin: 32px 0;
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
  aspect-ratio: 21 / 9;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .6s ease;
  display: flex;
  align-items: flex-end;
}
.hero-slide.active { opacity: 1; }
.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.1) 55%, transparent 100%);
}
.hero-info {
  position: relative;
  z-index: 2;
  padding: 40px;
  color: #fff;
  max-width: 640px;
}
.hero-info h2 {
  font-family: var(--font-h);
  font-size: 40px;
  line-height: 1.15;
  font-weight: 900;
  margin-bottom: 12px;
}
.hero-info p {
  font-size: 15px;
  opacity: .85;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-block;
  padding: 10px 26px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  border: var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 0 6px 0 #1A1A1A;
}

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

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--primary);
}
.sec-title {
  font-family: var(--font-h);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.5px;
  position: relative;
  padding-left: 16px;
}
.sec-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 6px;
  background: var(--accent);
  border-radius: 3px;
}
.sec-more {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  transition: color .2s;
}
.sec-more:hover { color: var(--accent); }

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

.card {
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .18s, box-shadow .18s;
  box-shadow: 0 3px 0 rgba(26,26,26,.9);
}
.card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 var(--accent);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #eee;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  padding: 3px 9px;
  border-radius: 8px;
  border: 2px solid #1A1A1A;
  transform: rotate(6deg);
  box-shadow: 2px 2px 0 #1A1A1A;
}

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

.card-title {
  font-family: var(--font-h);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  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;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------- Cat List ---------- */
.cat-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  font-weight: 700;
  transition: background .2s, color .2s, transform .15s;
}
.cat-item:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-3px);
}
.cat-count {
  font-size: 12px;
  font-weight: 600;
  background: var(--bg);
  color: var(--primary);
  padding: 2px 10px;
  border-radius: 999px;
  border: 2px solid var(--primary);
}
.cat-item:hover .cat-count {
  background: #fff;
  border-color: #fff;
}

/* ---------- Rank List ---------- */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  transition: transform .15s, box-shadow .15s;
}
.rank-item:hover {
  transform: translateX(4px);
  box-shadow: -4px 4px 0 var(--accent);
}
.rank-num {
  font-family: var(--font-h);
  font-size: 26px;
  font-weight: 900;
  color: var(--accent);
  min-width: 40px;
  text-align: center;
}
.rank-title {
  flex: 1;
  font-weight: 700;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-score {
  font-weight: 800;
  color: var(--accent);
  font-size: 15px;
}

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

.detail-head {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
  padding: 32px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.detail-cover {
  aspect-ratio: 2 / 3;
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.detail-meta h1 {
  font-family: var(--font-h);
  font-size: 36px;
  font-weight: 900;
  line-height: 1.2;
}
.detail-score {
  display: inline-block;
  align-self: flex-start;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  padding: 6px 18px;
  border-radius: 12px;
  border: var(--border);
  transform: rotate(-3deg);
  box-shadow: 3px 3px 0 #1A1A1A;
}
.detail-meta p {
  color: var(--muted);
  font-size: 14px;
}
.detail-body {
  margin-top: 32px;
  padding: 32px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  line-height: 1.9;
  font-size: 15px;
}
.detail-body h2 {
  font-family: var(--font-h);
  font-size: 24px;
  margin: 24px 0 12px;
}
.detail-body p { margin-bottom: 14px; }

/* ---------- Tag List ---------- */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.tag {
  display: inline-block;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
  background: var(--bg);
  border: 2px solid var(--primary);
  border-radius: 999px;
  transition: background .2s, color .2s;
}
.tag:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ---------- Pager ---------- */
.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 48px 0;
}
.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 700;
  background: var(--surface);
  border: var(--border);
  border-radius: 12px;
  transition: background .2s, color .2s, transform .15s;
}
.pg:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}
.pg.current {
  background: var(--primary);
  color: #fff;
  pointer-events: none;
}
.pg.disabled {
  opacity: .4;
  pointer-events: 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: 2px solid transparent;
  border-radius: 999px;
  transition: color .2s, border-color .2s;
}
.link-item:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 64px;
  padding: 40px 0;
  background: var(--primary);
  color: #fff;
  border-top: var(--border);
}
.footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}
.footer p {
  font-size: 13px;
  opacity: .7;
}
.footer a { color: var(--accent); }

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

/* ---------- Highlight ---------- */
.hl {
  background: var(--accent);
  color: #fff;
  padding: 0 3px;
  border-radius: 4px;
}

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

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

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

  .hero { aspect-ratio: 4 / 5; margin: 20px 0; }
  .hero-info { padding: 24px 20px; }
  .hero-info h2 { font-size: 26px; }

  .sec { margin: 36px 0; }
  .sec-title { font-size: 22px; }

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

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

  .detail-head {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 20px;
  }
  .detail-cover { max-width: 220px; margin: 0 auto; }
  .detail-meta h1 { font-size: 26px; }
  .detail-body { padding: 20px; }

  .rank-num { font-size: 20px; min-width: 32px; }
  .rank-title { font-size: 14px; }

  .pg { min-width: 38px; height: 38px; font-size: 13px; }
}