:root {
  --bg: #F7F0E6;
  --surface: #FFFFFF;
  --primary: #B33A2B;
  --accent: #D96C4A;
  --text: #2A2320;
  --muted: #8A7A70;
  --radius: 14px;
  --font-heading: 'Playfair Display', 'Noto Serif SC', Georgia, serif;
  --font-body: 'Inter', 'Noto Sans SC', 'Helvetica Neue', sans-serif;
  --shadow-sm: 0 2px 8px rgba(42, 35, 32, .06);
  --shadow-md: 0 8px 24px rgba(42, 35, 32, .10);
  --shadow-lg: 0 16px 40px rgba(42, 35, 32, .14);
  --glass: rgba(255, 255, 255, .62);
  --glass-border: rgba(255, 255, 255, .55);
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 15% 10%, rgba(217, 108, 74, .10), transparent 40%),
    radial-gradient(circle at 85% 0%, rgba(179, 58, 43, .08), transparent 45%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.045'/%3E%3C/svg%3E");
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  min-height: 100vh;
}

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 20px;
}

/* ============ Header ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 240, 230, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(179, 58, 43, .12);
}
.header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}
.logo {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: .5px;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo span { color: var(--accent); }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.nav a:hover { background: rgba(179, 58, 43, .10); color: var(--primary); }

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid rgba(179, 58, 43, .18);
  border-radius: 999px;
  padding: 4px 4px 4px 16px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.search-box input {
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  width: 150px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  border: none;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  padding: 7px 16px;
  border-radius: 999px;
  transition: background .2s;
}
.search-box button:hover { background: var(--accent); }

/* ============ Button ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s;
  box-shadow: 0 6px 18px rgba(179, 58, 43, .28);
}
.btn:hover { background: var(--accent); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(217, 108, 74, .35); }
.btn.ghost {
  background: var(--glass);
  color: var(--primary);
  border: 1px solid rgba(179, 58, 43, .28);
  box-shadow: none;
}
.btn.ghost:hover { background: rgba(255, 255, 255, .9); }

/* ============ Hero ============ */
.hero {
  position: relative;
  margin: 28px 0;
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-md);
}
.hero-slide {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 32px;
  align-items: center;
  padding: 36px 40px;
}
.hero-info { min-width: 0; }
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 34px;
  line-height: 1.2;
  margin-bottom: 12px;
  color: var(--text);
}
.hero-info p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-info .btn { margin-right: 10px; }
.hero-slide img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

/* ============ Section ============ */
.sec { margin: 40px 0; }
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(179, 58, 43, .22);
}
.sec-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  position: relative;
  padding-left: 14px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 22px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}
.sec-more {
  font-size: 14px;
  color: var(--primary);
  white-space: nowrap;
  transition: color .2s;
}
.sec-more:hover { color: var(--accent); }

/* ============ Grid & Card ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 22px;
}
.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(179, 58, 43, .06);
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.card:hover .card-cover img { transform: scale(1.05); }
.card-score {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(179, 58, 43, .92);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(179, 58, 43, .4);
}
.card-info { padding: 12px 14px 14px; }
.card-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}
.card-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

/* ============ Category List ============ */
.cat-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}
.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
  font-size: 15px;
  transition: transform .2s, box-shadow .2s, color .2s;
}
.cat-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: var(--primary); }
.cat-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: rgba(179, 58, 43, .08);
  padding: 2px 10px;
  border-radius: 999px;
}

/* ============ Rank List ============ */
.rank-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
}
.rank-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.rank-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  color: var(--primary);
  background: rgba(179, 58, 43, .10);
}
.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}
.rank-title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-score {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

/* ============ Detail ============ */
.detail {
  margin: 28px 0;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: calc(var(--radius) + 4px);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-md);
  padding: 32px;
}
.detail-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}
.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
}
.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-heading);
  font-size: 30px;
  line-height: 1.25;
  color: var(--text);
}
.detail-meta p { font-size: 14px; color: var(--muted); }
.detail-meta p b { color: var(--text); font-weight: 600; }
.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
}
.detail-body {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px dashed rgba(179, 58, 43, .22);
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}
.detail-body h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  margin: 20px 0 10px;
  color: var(--primary);
}
.detail-body p { margin-bottom: 12px; color: #4a403a; }

/* ============ Tags ============ */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-block;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(179, 58, 43, .08);
  color: var(--primary);
  border: 1px solid rgba(179, 58, 43, .14);
  transition: background .2s, color .2s;
}
.tag:hover { background: var(--primary); color: #fff; }

/* ============ 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;
  border-radius: 10px;
  font-size: 14px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid rgba(179, 58, 43, .16);
  box-shadow: var(--shadow-sm);
  transition: background .2s, color .2s, transform .2s;
}
.pg:hover { background: rgba(179, 58, 43, .10); color: var(--primary); transform: translateY(-1px); }
.pg.current {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 6px 16px rgba(179, 58, 43, .3);
}
.pg.disabled {
  opacity: .45;
  pointer-events: none;
  background: rgba(255, 255, 255, .5);
}

/* ============ Links & Footer ============ */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px 0;
}
.link-item {
  font-size: 13px;
  color: var(--muted);
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .5);
  border: 1px solid rgba(179, 58, 43, .10);
  transition: color .2s, background .2s;
}
.link-item:hover { color: var(--primary); background: rgba(179, 58, 43, .08); }

.footer {
  margin-top: 48px;
  padding: 32px 0 40px;
  border-top: 1px solid rgba(179, 58, 43, .14);
  background: rgba(247, 240, 230, .6);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.9;
}
.footer a { color: var(--primary); }
.footer a:hover { color: var(--accent); }

/* ============ Crumbs ============ */
.crumbs {
  font-size: 13px;
  color: var(--muted);
  padding: 18px 0 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.crumbs a { color: var(--primary); }
.crumbs a:hover { color: var(--accent); }
.crumbs span { color: var(--muted); }

/* ============ Highlight ============ */
.hl {
  color: var(--primary);
  background: rgba(217, 108, 74, .18);
  border-radius: 4px;
  padding: 0 3px;
}

/* ============ 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: 20px; }
  .nav {
    order: 3;
    width: 100%;
    flex: 0 0 100%;
    padding-bottom: 4px;
  }
  .nav a { padding: 6px 12px; font-size: 13px; }
  .search-box { margin-left: auto; padding-left: 12px; }
  .search-box input { width: 100px; }

  .hero { margin: 18px 0; }
  .hero-slide {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px 18px;
  }
  .hero-slide img { order: -1; }
  .hero-info h2 { font-size: 24px; }

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

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

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

  .rank-list { grid-template-columns: 1fr; }

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

  .pager { gap: 6px; margin: 26px 0; }
  .pg { min-width: 34px; height: 34px; font-size: 13px; }
}