:root {
  --bg: #F2F1EE;
  --surface: #FBFAF7;
  --primary: #C4552B;
  --accent: #1E7F7A;
  --text: #1A1B1C;
  --muted: #8A8B8A;
  --radius: 3px;
  --line: #D8D6D0;
  --font-heading: "Noto Serif JP", "Songti SC", Georgia, serif;
  --font-body: "IBM Plex Mono", "SF Mono", "PingFang SC", system-ui, sans-serif;
}

* {
  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: 13px;
  line-height: 1.7;
  letter-spacing: 0.02em;
}

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 {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.logo::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--primary);
  margin-left: 6px;
  transform: rotate(12deg);
  vertical-align: middle;
}

.nav {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav a:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.search-box {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  flex-shrink: 0;
  overflow: hidden;
}

.search-box input {
  border: none;
  background: transparent;
  padding: 6px 10px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text);
  width: 160px;
  outline: none;
}

.search-box input::placeholder {
  color: var(--muted);
}

.search-box button {
  border: none;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-body);
  font-size: 12px;
  padding: 6px 12px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.search-box button:hover {
  opacity: 0.85;
}

/* ============ Hero ============ */
.hero {
  position: relative;
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.hero-slide {
  position: relative;
  aspect-ratio: 21 / 9;
  overflow: hidden;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9);
  transition: filter 0.4s, transform 0.6s;
}

.hero-slide:hover img {
  filter: saturate(1.1);
  transform: scale(1.02);
}

.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  padding: 32px 28px 24px;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.82), transparent);
  color: #fff;
}

.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.hero-info p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  max-width: 640px;
  margin-bottom: 14px;
}

.btn {
  display: inline-block;
  padding: 7px 18px;
  font-size: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.btn:hover {
  background: transparent;
  color: var(--primary);
  box-shadow: 0 0 0 1px var(--accent);
}

/* ============ Section ============ */
.sec {
  margin: 40px 0;
}

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.sec-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
  position: relative;
  padding-left: 14px;
}

.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) rotate(12deg);
  width: 5px;
  height: 16px;
  background: var(--primary);
}

.sec-more {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  transition: color 0.2s;
}

.sec-more:hover {
  color: var(--accent);
}

/* ============ Grid & Cards ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px 16px;
}

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(30, 127, 122, 0.18);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--bg);
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92);
  transition: filter 0.3s, transform 0.4s;
}

.card:hover .card-cover img {
  filter: saturate(1.08);
  transform: scale(1.03);
}

.card-score {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius);
  transform: rotate(3deg);
  letter-spacing: 0.04em;
}

.card-info {
  padding: 8px 10px 10px;
}

.card-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 4px;
}

.card-title a:hover {
  color: var(--primary);
}

.card-meta {
  font-size: 10px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.03em;
}

/* ============ Cat List ============ */
.cat-list {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 10px 12px;
  font-size: 12px;
  transition: border-color 0.2s, color 0.2s;
}

.cat-item:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.cat-count {
  font-size: 10px;
  color: var(--muted);
}

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  transition: color 0.2s;
}

.rank-item:hover {
  color: var(--primary);
}

.rank-num {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  min-width: 24px;
  text-align: center;
  font-style: italic;
}

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

.rank-score {
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
}

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

.detail-head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 28px;
  margin-bottom: 28px;
}

.detail-cover {
  aspect-ratio: 2 / 3;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.detail-meta .sub {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}

.detail-meta p {
  font-size: 12px;
  margin-bottom: 6px;
  color: var(--text);
}

.detail-meta p span {
  color: var(--muted);
  margin-right: 6px;
}

.detail-score {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  margin: 10px 0;
  font-style: italic;
}

.detail-body {
  font-size: 13px;
  line-height: 1.9;
  color: var(--text);
}

.detail-body p {
  margin-bottom: 14px;
}

.detail-body h2 {
  font-family: var(--font-heading);
  font-size: 17px;
  margin: 24px 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--primary);
}

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

.tag {
  display: inline-block;
  font-size: 11px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  transition: border-color 0.2s, color 0.2s;
}

.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

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

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.pg:hover {
  border-color: var(--primary);
  color: var(--primary);
}

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

.pg.disabled {
  color: var(--muted);
  opacity: 0.5;
  pointer-events: none;
}

/* ============ Links ============ */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.link-item {
  font-size: 11px;
  color: var(--muted);
  transition: color 0.2s;
}

.link-item:hover {
  color: var(--accent);
}

/* ============ Footer ============ */
.footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 28px 0;
  margin-top: 40px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.04em;
}

.footer p {
  margin-bottom: 6px;
}

.footer a:hover {
  color: var(--primary);
}

/* ============ Crumbs ============ */
.crumbs {
  font-size: 11px;
  color: var(--muted);
  padding: 16px 0;
  letter-spacing: 0.04em;
}

.crumbs a {
  color: var(--muted);
  transition: color 0.2s;
}

.crumbs a:hover {
  color: var(--primary);
}

.crumbs span {
  margin: 0 6px;
  color: var(--line);
}

/* ============ Highlight ============ */
.hl {
  color: var(--primary);
  font-weight: 700;
  background: rgba(196, 85, 43, 0.08);
  padding: 0 2px;
  border-radius: 2px;
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .cat-list {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .wrap {
    padding: 0 14px;
  }
  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
  }
  .logo {
    font-size: 17px;
  }
  .nav {
    order: 3;
    width: 100%;
    gap: 16px;
    padding-bottom: 2px;
  }
  .search-box {
    margin-left: auto;
  }
  .search-box input {
    width: 110px;
  }
  .hero-slide {
    aspect-ratio: 16 / 10;
  }
  .hero-info {
    padding: 20px 16px 16px;
  }
  .hero-info h2 {
    font-size: 18px;
  }
  .hero-info p {
    display: none;
  }
  .sec {
    margin: 28px 0;
  }
  .sec-title {
    font-size: 16px;
  }
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 10px;
  }
  .cat-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .rank-list {
    grid-template-columns: 1fr;
  }
  .detail-head {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .detail-cover {
    max-width: 180px;
  }
  .detail-meta h1 {
    font-size: 20px;
  }
  .detail-score {
    font-size: 24px;
  }
  .pager {
    gap: 4px;
  }
  .pg {
    min-width: 28px;
    height: 28px;
    font-size: 11px;
    padding: 0 8px;
  }
}