* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #18202a;
  background: #f6f7fb;
  line-height: 1.7;
}

a {
  color: inherit;
}

.site-header {
  padding: 34px 18px 26px;
  background: #ffffff;
  border-bottom: 1px solid #e6e8ef;
}

.site-header__inner,
.main,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-title {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.site-lead {
  margin: 0;
  color: #546070;
  max-width: 780px;
}

.main {
  padding: 28px 0 46px;
  display: flex;
  flex-direction: column;
}

.notice {
  order: 0;
  padding: 14px 16px;
  margin-bottom: 26px;
  background: #ffffff;
  border: 1px solid #e6e8ef;
  border-radius: 16px;
  color: #546070;
  font-size: 14px;
}

.rank-section {
  order: 3;
  margin: 0 0 38px;
}

.rank-section--review {
  order: 1;
}

.rank-section--sports-guide,
.rank-section--genre-guide {
  order: 1;
}

.rank-section--rating {
  order: 2;
}

.rank-section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.rank-section__title {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  max-width: 100%;
  overflow-wrap: anywhere;
}

.rank-section--review .rank-section__title {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 12px;
  background: #0f766e;
  color: #ffffff;
  font-size: clamp(25px, 3.2vw, 34px);
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.16);
}

.rank-section__note {
  margin: 4px 0 0;
  color: #667282;
  font-size: 14px;
}

.rank-section__guide {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid #d5dde8;
  border-left: 5px solid #0f766e;
  border-radius: 12px;
  background: #ffffff;
  color: #334155;
}

.rank-section--review .rank-section__guide {
  display: none;
}

.rank-section--review .rank-section__guide strong {
  color: #0f766e;
  font-size: 16px;
}

.rank-section--rating .rank-section__guide {
  display: none;
}

.rank-section__guide strong {
  display: block;
  margin-bottom: 5px;
  color: #0f172a;
  font-size: 15px;
}

.rank-section__guide p {
  margin: 0;
  font-size: 13px;
  line-height: 1.75;
}

.comic-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.rank-pagination {
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1px solid #e0e7ef;
  border-radius: 14px;
  background: #ffffff;
}

.rank-pagination__summary {
  margin: 0 0 10px;
  color: #475569;
  font-size: 14px;
}

.rank-pagination__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.rank-pagination__link,
.rank-pagination__ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #1f2937;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.rank-pagination__link:hover {
  border-color: #0f766e;
  color: #0f766e;
}

.rank-pagination__link--current {
  border-color: #0f766e;
  background: #0f766e;
  color: #ffffff;
}

.rank-pagination__ellipsis {
  min-width: auto;
  border-color: transparent;
  background: transparent;
  color: #64748b;
}

.comic-card {
  background: #ffffff;
  border: 1px solid #e7eaf1;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(20, 30, 50, 0.06);
  position: relative;
  min-width: 0;
}

.comic-card--top-rank {
  border-color: #14b8a6;
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.16);
}

.comic-card--top1 {
  border-color: #f59e0b;
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.18);
}

.comic-card__media {
  position: relative;
  background: #eef1f6;
}

.comic-card__ranking-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid #e6e8ef;
  background: #ffffff;
}

.comic-card--top-rank .comic-card__ranking-head {
  background: #f8fffd;
  border-bottom-color: #99f6e4;
}

.comic-card--top1 .comic-card__ranking-head {
  background: #fffbeb;
  border-bottom-color: #fde68a;
}

.comic-card__ranking-text {
  display: grid;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.comic-card__image-link {
  display: block;
  background: #eef1f6;
}

.comic-card__image {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 3.75;
  object-fit: cover;
}

.comic-card__body {
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.comic-card__top-label {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin: 0 0 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.comic-card--review-ranking .comic-card__top-label {
  display: none;
}

.comic-card__rank-basis {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 7px 9px;
  border-radius: 10px;
  background: #ecfeff;
  color: #155e75;
  font-size: 12px;
  line-height: 1.35;
  order: 0;
}

.comic-card--review-ranking .comic-card__rank-basis {
  position: static;
  margin: 0;
  box-shadow: none;
}

.comic-card__rank-basis span {
  font-weight: 800;
}

.comic-card__rank-basis strong {
  color: #0f172a;
  font-size: 13px;
}

.comic-card__title {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.45;
  order: 0;
}

.comic-card__rank-badge {
  position: static;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 40px;
  padding: 6px 13px;
  border-radius: 999px;
  background: #0f766e;
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.35), 0 0 0 2px #ffffff;
}

.comic-card--review-ranking .comic-card__rank-badge {
  background: #0f766e;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.3);
}

.comic-card--top-rank .comic-card__rank-badge {
  min-height: 42px;
  padding: 7px 15px;
  background: #0f172a;
  font-size: 18px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.26);
}

.comic-card--top1 .comic-card__rank-badge {
  background: #b45309;
  box-shadow: 0 8px 20px rgba(180, 83, 9, 0.28);
}

.comic-card--top-rank .comic-card__rank-basis {
  border: 1px solid #99f6e4;
  background: #f0fdfa;
}

.comic-card--review-ranking .comic-card__rank-basis {
  border: 1px solid #99f6e4;
  background: #f0fdfa;
  color: #0f766e;
}

.comic-card--review-ranking .comic-card__rank-basis span {
  font-size: 13px;
}

.comic-card--review-ranking .comic-card__rank-basis strong {
  color: #0f172a;
  font-size: 15px;
}

.comic-card--review-ranking .comic-card__score span:first-child {
  background: #ccfbf1;
  color: #115e59;
  border: 1px solid #5eead4;
  font-size: 15px;
  font-weight: 800;
}

.comic-card--popular-ranking .comic-card__score span:first-child {
  background: #eef2ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
  font-size: 15px;
  font-weight: 800;
}

.comic-card--top1 .comic-card__rank-basis {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.comic-card--top1 .comic-card__rank-basis strong {
  color: #78350f;
}

.comic-card__description {
  margin: 0 0 8px;
  color: #4b5563;
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  display: none;
}

.comic-card__rank-reason {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-left: 3px solid #0f766e;
  border-radius: 8px;
  background: #f0fdfa;
  color: #285f5a;
  font-size: 12px;
  line-height: 1.55;
  display: none;
}

.comic-card__score {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 12px;
  color: #334155;
  order: 1;
}

.comic-card--review-ranking .comic-card__score {
  position: static;
}

.comic-card__score span {
  padding: 2px 7px;
  background: #f1f5f9;
  border-radius: 999px;
}

.comic-card__meta {
  margin: 0 0 12px;
  font-size: 12px;
  color: #5f6b7a;
  display: none;
}

.comic-card__meta div {
  margin-bottom: 4px;
}

.comic-card__meta dt {
  display: inline;
  font-weight: 700;
}

.comic-card__meta dt::after {
  content: "：";
}

.comic-card__meta dd {
  display: inline;
  margin: 0;
}

.comic-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  order: 4;
}

.comic-card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 10px;
  text-align: center;
  text-decoration: none;
  border-radius: 12px;
  background: #1f2937;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.comic-card__button--detail {
  background: #0f766e;
  font-size: 14px;
  box-shadow: 0 6px 14px rgba(15, 118, 110, 0.18);
}

.comic-card__button--detail-primary {
  margin: 0 0 9px;
  padding: 10px 12px;
  border: 2px solid #0f766e;
  background: #0f766e;
  font-size: 15px;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.2);
  width: 100%;
  order: 2;
}

.comic-card--review-ranking .comic-card__button--detail-primary {
  position: static;
  width: 100%;
  margin: 0 0 9px;
}

.comic-card--top-rank .comic-card__button--detail {
  padding: 10px 12px;
  background: #0f766e;
  font-size: 15px;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.22);
}

.comic-card__button--official {
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
  font-size: 12px;
  font-weight: 700;
}

.comic-card__button--secondary {
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #cbd5e1;
}

.site-footer {
  padding: 24px 0 40px;
  color: #667282;
  font-size: 13px;
}

@media (max-width: 1024px) {
  .comic-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .comic-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .rank-pagination {
    padding: 12px;
  }

  .rank-pagination__links {
    gap: 7px;
  }

  .rank-pagination__link,
  .rank-pagination__ellipsis {
    min-width: 36px;
    min-height: 36px;
    padding: 6px 10px;
  }

  .site-title {
    font-size: 28px;
    line-height: 1.28;
    word-break: break-all;
  }

  .rank-section__head {
    display: block;
  }

  .rank-section--review .rank-section__title {
    display: inline-block;
    width: 100%;
    max-width: 100%;
    font-size: 23px;
    line-height: 1.35;
    word-break: break-all;
  }

  .comic-card__ranking-head {
    flex-wrap: wrap;
  }

  .comic-card__rank-basis {
    min-width: 0;
  }

  .comic-card__rank-badge {
    min-width: 48px;
    min-height: 34px;
    padding: 5px 9px;
    font-size: 15px;
  }

  .site-header__inner,
  .main,
  .site-footer {
    width: min(100% - 20px, 1180px);
  }

  .comic-card__body {
    padding: 10px;
  }
}

.genre-links-section {
  margin-bottom: 30px;
}

.genre-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.genre-links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid #d9dee8;
  border-radius: 999px;
  background: #ffffff;
  color: #1f2937;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.genre-links a:hover {
  background: #f1f5f9;
}

.genre-feature-link {
  display: grid;
  gap: 6px;
  margin: 14px 0 18px;
  padding: 14px 16px;
  border: 1px solid #99f6e4;
  border-left: 5px solid #0f766e;
  border-radius: 12px;
  background: #f0fdfa;
}

.genre-feature-link a {
  color: #0f766e;
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
}

.genre-feature-link a:hover {
  text-decoration: underline;
}

.genre-feature-link span {
  color: #334155;
  font-size: 14px;
}

.genre-links .genre-links__featured {
  border-color: #0f766e;
  background: #0f766e;
  color: #ffffff;
}

.genre-links .genre-links__featured:hover {
  background: #115e59;
}

.info-page {
  max-width: 920px;
}

.info-section {
  margin: 0 0 22px;
  padding: 20px;
  background: #ffffff;
  border: 1px solid #e6e8ef;
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(20, 30, 50, 0.04);
}

.info-section h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.info-section p {
  margin: 0 0 10px;
  color: #485465;
}

.info-lead {
  font-weight: 700;
  color: #1f2937 !important;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 0 0 14px;
}

.footer-links a {
  color: #334155;
  text-decoration: none;
  font-weight: 700;
}

.footer-links a:hover {
  text-decoration: underline;
}
