:root {
  --bg: #F5F2EB;
  --surface: #FFFFFF;
  --primary: #A67C2E;
  --accent: #1C1B18;
  --text: #161512;
  --muted: #7A7469;
  --radius: 0px;
  --font-heading: 'Helvetica Neue', 'Arial Black', 'Noto Sans SC', sans-serif;
  --font-body: 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
  --line: #E3DDD1;
  --shadow: 6px 6px 0 rgba(28, 27, 24, 0.9);
}

* { 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; }

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

/* ---------- Header ---------- */
.header {
  background: var(--accent);
  color: #F5F2EB;
  border-bottom: 4px solid var(--primary);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #fff;
  white-space: nowrap;
  text-transform: uppercase;
}
.logo span { color: var(--primary); }

.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 14px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #CFC9BC;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color .2s, border-color .2s;
}
.nav a:hover { color: #fff; border-bottom-color: var(--primary); }

.search-box {
  display: flex;
  align-items: center;
  background: #2A2823;
  border: 1px solid #3C3931;
  height: 38px;
  min-width: 200px;
}
.search-box input {
  flex: 1;
  border: 0;
  background: transparent;
  color: #F5F2EB;
  font-family: var(--font-body);
  font-size: 14px;
  padding: 0 12px;
  outline: none;
  min-width: 0;
}
.search-box input::placeholder { color: #7A7469; }
.search-box button {
  border: 0;
  background: var(--primary);
  color: #1C1B18;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 1px;
  height: 100%;
  padding: 0 16px;
  cursor: pointer;
  font-family: var(--font-heading);
}
.search-box button:hover { background: #C09240; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin: 40px auto;
  max-width: 1200px;
  padding: 0 24px;
}

.hero-slide {
  position: relative;
  display: none;
  background: var(--accent);
  overflow: hidden;
  border: 3px solid var(--accent);
  box-shadow: var(--shadow);
}
.hero-slide:first-child,
.hero-slide.active { display: block; }

.hero-slide img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  opacity: 0.55;
  animation: heroZoom 18s ease-in-out infinite alternate;
}

@keyframes heroZoom {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 40px 48px;
  max-width: 640px;
  background: linear-gradient(to top, rgba(28,27,24,.92), rgba(28,27,24,0));
  color: #fff;
}
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 42px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}
.hero-info p {
  font-size: 14px;
  color: #CFC9BC;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  background: var(--primary);
  color: #1C1B18;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 2px solid var(--primary);
  transition: background .2s, color .2s;
}
.btn:hover { background: transparent; color: var(--primary); }

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

.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 28px;
  border-bottom: 3px solid var(--accent);
}

.sec-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1;
  position: relative;
  padding-left: 16px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 6px;
  background: var(--primary);
}

.sec-more {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
  border-bottom: 1px solid var(--primary);
  padding-bottom: 2px;
}
.sec-more:hover { color: var(--primary); }

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

.card {
  background: var(--surface);
  border: 2px solid var(--accent);
  transition: transform .25s ease, box-shadow .25s ease;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

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

.card-score {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--primary);
  color: #1C1B18;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 13px;
  padding: 4px 10px;
  letter-spacing: 0.5px;
}

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

.card-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-title:hover { color: var(--primary); }

.card-meta {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.3px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Category 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: 2px solid var(--accent);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 15px;
  transition: background .2s, color .2s;
}
.cat-item:hover { background: var(--accent); color: #F5F2EB; }

.cat-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.5px;
}

/* ---------- Rank list ---------- */
.rank-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 40px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.rank-item:hover .rank-title { color: var(--primary); }

.rank-num {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 900;
  color: var(--primary);
  min-width: 40px;
  text-align: center;
  line-height: 1;
}

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

.rank-score {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 900;
  color: var(--muted);
}

/* ---------- Detail ---------- */
.detail { margin: 40px auto; }

.detail-head {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  padding: 32px;
  background: var(--surface);
  border: 3px solid var(--accent);
  box-shadow: var(--shadow);
}

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

.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.detail-score {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 900;
  color: #1C1B18;
  background: var(--primary);
  padding: 2px 12px;
  margin-bottom: 20px;
}

.detail-meta p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.detail-meta p strong { color: var(--text); font-weight: 700; }

.detail-body {
  margin-top: 36px;
  padding: 32px;
  background: var(--surface);
  border: 2px solid var(--accent);
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}
.detail-body h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 900;
  margin: 8px 0 16px;
  padding-left: 14px;
  border-left: 5px solid var(--primary);
}
.detail-body p { margin-bottom: 14px; }

/* ---------- Tags ---------- */
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.tag {
  display: inline-block;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  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: 48px 0;
}

.pg {
  display: inline-block;
  min-width: 42px;
  padding: 10px 14px;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  background: var(--surface);
  border: 2px solid var(--accent);
  transition: background .2s, color .2s;
}
.pg:hover { background: var(--accent); color: #F5F2EB; }

.pg.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #1C1B18;
}

.pg.disabled {
  color: #C4BEB2;
  border-color: var(--line);
  pointer-events: none;
  background: transparent;
}

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

.link-item {
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.link-item:hover { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------- Crumbs ---------- */
.crumbs {
  font-size: 13px;
  color: var(--muted);
  padding: 20px 0 0;
  letter-spacing: 0.3px;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }
.crumbs span { color: var(--text); font-weight: 700; }

/* ---------- Highlight ---------- */
.hl {
  background: var(--primary);
  color: #1C1B18;
  padding: 0 2px;
  font-weight: 700;
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 72px;
  background: var(--accent);
  color: #CFC9BC;
  border-top: 4px solid var(--primary);
  padding: 48px 0 32px;
}
.footer .wrap { display: flex; flex-direction: column; gap: 20px; }
.footer p { font-size: 13px; color: #8F897C; line-height: 1.8; }
.footer a { color: #CFC9BC; }
.footer a:hover { color: var(--primary); }

/* ---------- 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: 28px; }
}

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

  .header .wrap {
    flex-wrap: wrap;
    height: auto;
    padding: 14px 16px;
    gap: 12px;
  }
  .logo { font-size: 18px; }
  .nav {
    order: 3;
    width: 100%;
    flex: 0 0 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .nav a { padding: 6px 10px; font-size: 13px; }
  .search-box { flex: 1; min-width: 0; height: 34px; }

  .hero { margin: 24px auto; padding: 0 16px; }
  .hero-slide img { height: 300px; }
  .hero-info { padding: 24px 20px; max-width: 100%; }
  .hero-info h2 { font-size: 26px; }
  .hero-info p { font-size: 13px; }

  .sec { margin: 36px auto; }
  .sec-title { font-size: 22px; }
  .sec-more { font-size: 12px; }

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

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

  .rank-list { grid-template-columns: 1fr; gap: 0; }
  .rank-num { font-size: 20px; min-width: 32px; }
  .rank-title { font-size: 14px; }

  .detail-head {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }
  .detail-cover { max-width: 200px; }
  .detail-meta h1 { font-size: 24px; }
  .detail-body { padding: 20px; margin-top: 24px; }
  .detail-body h2 { font-size: 18px; }

  .pager { margin: 32px 0; gap: 6px; }
  .pg { min-width: 36px; padding: 8px 10px; font-size: 13px; }

  .footer { padding: 32px 0 24px; margin-top: 48px; }
}