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

/* ------------------- 答え合わせ（五匹感想) -------------------- */
.matome_header {
  position: relative;
  width: 100%;
  min-height: 150px;

  background-color: transparent;
  background-image: url("../images/header.png");
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 100% 100%;
}
.matome_title-area {
  text-align: center;
  margin-top: 160px; 
  padding: 0 20px;
  margin-bottom:120px;
}
.matome_title-image{
  display: block;
  width: 90%;
  max-width: 700px;
  height: auto;
  margin: 0 auto;
}
.matome_char-section {/*５匹の感想*/
  display: flex;
  flex-direction: column;
  gap: 60px; /* キャラクター同士の縦の間隔を広く */
  margin-bottom: 80px;
  width: 100%;
  max-width: 1200px; /* セクション全体の最大幅 */
  margin-left: auto;
  margin-right: auto;
}
.char-img {
  width: 300px;
  height: 300px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.char-row {/*一匹ぶん*/
  display: flex;
  align-items: center;
  justify-content: center; /* 中央寄せ */
  gap: 30px; /* 画像と吹き出しの間隔 */
  width: 100%;
}
/* ２＆４左右を反転 */
.char-row:nth-child(even) {
  flex-direction: row-reverse;
}
.char-img img {
  width: 100%;
  height: auto;
  object-fit: contain;
}
.wa_bubble {
  flex: 1;
  width: 100%;
  max-width: 600px;
  min-width: 0;
  padding: 28px 32px;

  border-radius: 32px;
  background-color: #754821;
  color: #fff8c3;
}
.wa_bubble p {
  margin: 0;
  font-size: 16px;
  line-height: 1.8;
  text-align: left;
  overflow-wrap: anywhere;/*四角形から逃げない*/
}
/* -------------------- 答えあわせ（一位） -------------------- */
.total-rank-section {/*ランキング全体*/
  width: 100%;
  padding: 0 24px 120px;
  text-align: center;
}

.rank-story {
  height: 320vh;
}

.rank-story-stage {/*スクロール時固定方法*/
  position: sticky;
  top: 0;
  height: 100vh;
  overflow:hidden;

  display: flex;
  flex-direction:column;
  justify-content: center;
  align-items: center;
}

.rank-story-text {/*固定する文字*/
  margin: 0;
  color: #754821;
  font-size: 42px;
  font-weight: bold;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s, transform 0.8s;
}
.rank-story-cats {/*猫横並べ*/
    width: 100%;
    margin-top: 60px;

    display: flex;
    justify-content: center;
    align-items: flex-end;
}
.rank-story-cat {/*最初は左に隠れてる五匹*/
    width: 150px;
    max-width: 19vw;
    height: auto;
    margin-left: -20px;

    opacity: 0;
    transform: translateX(-100vw);
    transition: opacity 0.3s, transform 0.9s;
}
.rank-story-cat:first-child {
    margin-left: 0;
}

/* JavaScriptでis-visibleが付いた後 */
.rank-story.is-visible .rank-story-text {
    opacity: 1;
    transform: translateY(0);
}

.rank-story.is-visible .rank-story-cat {
    opacity: 1;
    transform: translateX(0);
}

/* 猫を順番に登場させる */
.rank-story.is-visible .rank-story-cat:nth-child(1) {
    transition-delay: 0.4s;
}

.rank-story.is-visible .rank-story-cat:nth-child(2) {
    transition-delay: 0.7s;
}

.rank-story.is-visible .rank-story-cat:nth-child(3) {
    transition-delay: 1s;
}

.rank-story.is-visible .rank-story-cat:nth-child(4) {
    transition-delay: 1.3s;
}

.rank-story.is-visible .rank-story-cat:nth-child(5) {
    transition-delay: 1.6s;
}

.winner-cat-name {
    margin-bottom: 0;
    text-align: right;
    font-weight: bold;
}
/* ランキング結果全体のカード */
.total-rank-card {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 48px;

  background-color: #fff8c3;
  border: 5px solid #754821;
  border-radius: 60px;

  color: #754821;
  text-align: center;
}

.winner-effect {
  margin: 0 0 20px;
  color: #ff8e95;
  font-size: 36px;
  font-weight: bold;
}

.winner-effect span {
  color: #ffb75a;
}

.total-rank-name {
  margin: 0 0 50px;
  font-size: 52px;
}

/* 写真と茶色のコメント欄を横並び */
.total-rank-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
}

/* Happy Colaの写真 */
.total-rank-image {
  width: 42%;
  max-width: 330px;
  height: auto;
  border-radius: 30px;
}

.total-rank-comment {
  flex: 1;
  padding: 30px;

  background-color: #754821;
  border-radius: 30px;

  color: #fff8c3;
  text-align: left;
}

.winner-comment-title {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: bold;
  text-align: center;
}

.total-rank-comment p {
  line-height: 1.8;
}

.winner-cat-name {
  margin-top: 16px;
  text-align: right;
  font-weight: bold;
}
.winner-link {
    display: inline-block;
    margin-top: 45px;
    padding: 16px 30px;

    border-radius: 40px;
    background-color: #ffb75a;

    color: #754821;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;

    transition:
        transform 0.25s ease,
        background-color 0.25s ease;
}
.winner-link:hover {
    transform: translateY(-5px);
    background-color: #ffca7f;
}
.winner-comment-title {
  margin-bottom: 16px;
  font-size: 24px;
  text-align: center;
}

.total-rank-comment p {
  line-height: 1.8;
}
.matome_footer {
  min-height: 150px;
  padding: 75px 24px 25px;

  background-color: transparent;
  background-image: url("../images/footer.png");
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: 100% 100%;

  display: flex;
  text-align: left;
  flex-direction: column;
justify-content: flex-end;
align-items: flex-start;
}

.matome_footer p {
  margin: 0;
  font-size: 12px;
  font-weight: bold;
}
/* -------------------- 食べ物ページ -------------------- */
body {
    min-height: 100vh;
    overflow-x: hidden;

    background-color: #fff8c3;
    color: #754821;
    font-family: "M PLUS Rounded 1c", sans-serif;
    font-weight: 500;
}
.mo_container, .ha_container, .ri_container, .yu_container, .wa_container {
  position: relative;
  z-index: 1;

  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 10% 80px;
}
/* 記事*/
.mo_section, .ha_section, .ri_section, .yu_section, .wa_section {
    display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "title title"
    "photo comment"
    "rating rating";
  column-gap: 40px;
  row-gap: 24px;
  margin-bottom: 100px;
}

.mo_item-title, .ha_item-title, .ri_item-title, .yu_item-title, .wa_item-title {
  grid-area: title;

  margin-bottom: 25px;
  font-size: 1.5rem;
  line-height: 1.4;
  text-align: center;
}

/* 写真枠 */
.mo_photo-group, .ha_photo-group, .ri_photo-group, .yu_photo-group, .wa_photo-group {
  grid-area: photo;

  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin-bottom: 0;
}

.mo_photo-box, .ha_photo-box, .ri_photo-box, .yu_photo-box, .wa_photo-box {
  display: block;
  width: 100%;
  max-width: 800px;
  height: auto;
  border-radius: 16px;
}

/* コメント枠 */
.mo_cat-comment-box, .ha_cat-comment-box, .ri_cat-comment-box, .yu_cat-comment-box, .wa_cat-comment-box {
grid-area: comment;

  width: 100%;
  margin: 0;
  padding: 40px 25px;

  background-color: #ffffff;
  border: 3px solid #8c766b;
  border-radius: 80px 80px 60px 60px;
  box-shadow: inset 0 -15px 0 var(--page-color);

  text-align: center;
}
.mo_cat-comment-box,
.ha_cat-comment-box,
.ri_cat-comment-box,
.yu_cat-comment-box,
.wa_cat-comment-box {
  grid-area: comment;

  display: flex;
  justify-content: center;
  align-items: center;

  width: 100%;
  height: 100%;
  margin: 0;
  padding: 40px 25px;

  background-color: #ffffff;
  border: 3px solid #8c766b;
  border-radius: 80px 80px 60px 60px;
  box-shadow: inset 0 -15px 0 var(--page-color);

  text-align: center;
}

.mo_comment-content,
.ha_comment-content,
.ri_comment-content,
.yu_comment-content,
.wa_comment-content {
  display: flex;
  justify-content: center;
  align-items: center;

  width: 100%;
  height: 100%;
}
.mo_comment-content p,
.ha_comment-content p,
.ri_comment-content p,
.yu_comment-content p,
.wa_comment-content p {
  margin: 0;

  font-size: 0.85rem;
  font-weight: bold;
  line-height: 1.9;
  text-align: center;
  overflow-wrap: anywhere;
}
.mo_rating-container, .ha_rating-container, .ri_rating-container, .yu_rating-container, .wa_rating-container {
  grid-area: rating;

  display: flex;
  justify-content: center;

  width: 100%;
  margin-top:50px;
}

.mo_rating-list, .ha_rating-list, .ri_rating-list, .yu_rating-list, .wa_rating-list {
  width: 90%;
  max-width: 600px; 
}

.mo_rating-item, .ha_rating-item, .ri_rating-item, .yu_rating-item, .wa_rating-item {
  display: flex;
  align-items: center;
  gap: 15px;

  margin-bottom: 12px;
  font-size: 1rem;
  font-weight: bold;
}

.mo_rating-item dt, .ha_rating-item dt, .ri_rating-item dt, .yu_rating-item dt, .wa_rating-item dt {
  width: 110px;
  flex-shrink: 0;

  letter-spacing: 2px;
  white-space: nowrap;
}

.mo_comment, .ha_comment, .ri_comment, .yu_comment, .wa_comment {
  flex: 1;
  min-width: 0;

  color: #754821;
  font-size: 0.85rem;
  font-weight: normal;
  overflow-wrap: anywhere;
}
/* グレー透明度を60%に */
img[src*="cl_gray.png"] {
  opacity: 0.4;
}

.mo_stars, .ha_stars, .ri_stars, .yu_stars, .wa_stars {
  display: flex;
  align-items: center;
  flex-shrink:0;
  gap: 3px;
}

.mo_clover-img, .ha_clover-img, .ri_clover-img, .yu_clover-img, .wa_clover-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

/* 下の猫 */
.mo_member-section,
.ha_member-section,
.ri_member-section,
.yu_member-section,
.wa_member-section {
position: relative;
  z-index: 2;

  margin-top: 30px;
  transform: translateY(40%);
}

.mo_member-list, .ha_member-list, .ri_member-list, .yu_member-list, .wa_member-list {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 15px;
}

.mo_member-item, .ha_member-item, .ri_member-item, .yu_member-item, .wa_member-item {
   flex: 1;
  min-width: 0;
  max-width: 240px;
}

.mo_cat-img, .ha_cat-img, .ri_cat-img, .yu_cat-img, .wa_cat-img {
  width: 100%;
  height: auto;
  display: block;
}

.mo_member-item a, .ha_member-item a, .ri_member-item a, .yu_member-item a, .wa_member-item a {
  display: block;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.mo_member-item a:hover, .ha_member-item a:hover, .ri_member-item a:hover, .yu_member-item a:hover, .wa_member-item a:hover {
  transform: translateY(-6px);
}
/* =====背景===== */

.mo_body {
    --page-color: #fff0e2;
}

.ha_body {
    --page-color: #ffebeb;
}

.ri_body {
    --page-color: #e2eaf5;
}

.wa_body {
    --page-color: #e5f9e3;
}

.yu_body {
    --page-color: #ffe5df;
}

.mo_body,
.ha_body,
.ri_body,
.wa_body,
.yu_body {
    background-color: var(--page-color);
}
.mo_container .mo_bg-character,
.ri_container .ri_bg-character,
.wa_container .wa_bg-character,
.ha_container .ha_bg-character,
.yu_container .yu_bg-character {
    position: absolute;
    top: 55%;
    left: 0;

    width: 2000px;
    height: auto;

    transform: translate(-65%, -50%) rotate(90deg);
    transform-origin: center center;

    opacity: 0.4;
    z-index: 1;
    pointer-events: none;
}
.mo_container > *,
.ha_container > *,
.ri_container > *,
.wa_container > *,
.yu_container > * {
    position: relative;
    z-index: 2;
}
.ha_header,
.mo_header,
.ri_header,
.wa_header,
.yu_header {
    position: relative;
    width: 100%;
    aspect-ratio: 1496 / 378;

    background-repeat: no-repeat;
    background-position: center top;
    background-size: 100% auto;
}

.ha_header {
    background-image: url("../images/header_ha.png");
}

.mo_header {
    background-image: url("../images/header_mo.png");
}

.ri_header {
    background-image: url("../images/header_ri.png");
}

.wa_header {
    background-image: url("../images/header_wa.png");
}

.yu_header {
    background-image: url("../images/header_yu.png");
}

.ha_header-inner,
.mo_header-inner,
.ri_header-inner,
.wa_header-inner,
.yu_header-inner {
    position: absolute;
    inset: 0;
}

.ha_header-inner > a,
.mo_header-inner > a,
.ri_header-inner > a,
.wa_header-inner > a,
.yu_header-inner > a {
    position: absolute;
    top: 40px;
    left: 24px;
}
.ha_title-area,
.mo_title-area,
.ri_title-area,
.wa_title-area,
.yu_title-area {
    margin-bottom: 80px;
    text-align: center;
}

.ha_title-image,
.mo_title-image,
.ri_title-image,
.wa_title-image,
.yu_title-image {
    display: block;
    width: 100%;
    max-width: 900px;
    height: auto;
    margin: 0 auto;
}
.ha_footer,
.mo_footer,
.ri_footer,
.wa_footer,
.yu_footer {
 position: relative;
  z-index: 1;

  width: 100%;
  aspect-ratio: 1440 / 187;
  padding: 75px 24px 25px;

  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: 100% auto;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  text-align: left;
}

.ha_footer p,
.mo_footer p,
.ri_footer p,
.wa_footer p,
.yu_footer p {
  margin: 0;
  font-size: 12px;
  font-weight: bold;
}

.creators {
  margin-bottom: 6px;
  line-height: 1.6;
}

.ha_footer {
    background-image: url("../images/footer_ha.png");
}

.mo_footer {
    background-image: url("../images/footer_mo.png");
}

.ri_footer {
    background-image: url("../images/footer_ri.png");
}

.wa_footer {
    background-image: url("../images/footer_wa.png");
}

.yu_footer {
    background-image: url("../images/footer_yu.png");
}

article[id] {
  scroll-margin-top: 30px;
}

/* ---------------小さい画面用------------------ */
@media (max-width: 700px) {
  .mo_section,
  .ha_section,
  .ri_section,
  .yu_section,
  .wa_section {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "photo"
      "comment"
      "rating";

    row-gap: 30px;
    margin-bottom: 80px;
  }
  .mo_cat-comment-box,
  .ha_cat-comment-box,
  .ri_cat-comment-box,
  .yu_cat-comment-box,
  .wa_cat-comment-box {
    min-height: 240px;
    padding: 35px 24px;
    border-radius: 70px 70px 50px 50px;
  }

  .mo_rating-container,
  .ha_rating-container,
  .ri_rating-container,
  .yu_rating-container,
  .wa_rating-container {
    margin-top: 20px;
  }

  .mo_rating-list,
  .ha_rating-list,
  .ri_rating-list,
  .yu_rating-list,
  .wa_rating-list {
    width: 100%;
  }
}
@media (max-width: 700px) {
  .matome_char-section {
    gap: 70px;
    padding: 0 24px;
  }

  .char-row,
  .char-row:nth-child(even) {
    flex-direction: column;
    gap: 20px;
  }

  .char-img {
    width: 220px;
    height: auto;
  }

  .wa_bubble {
    width: 100%;
    max-width: 500px;
    padding: 24px;
  }

  .wa_bubble p {
    font-size: 14px;
    line-height: 1.8;
  }

  /* まとめページ：ランキングカード */
  .total-rank-section {
    padding: 0 16px 80px;
  }

  .total-rank-card {
    padding: 40px 20px;
    border-radius: 40px;
  }

  .winner-effect {
    font-size: 26px;
  }

  .total-rank-name {
    margin-bottom: 30px;
    font-size: 38px;
  }

  .total-rank-content {
    flex-direction: column;
    gap: 30px;
  }

  .total-rank-image {
    width: 100%;
    max-width: 330px;
  }

  .total-rank-comment {
    width: 100%;
    padding: 24px;
  }

  .winner-comment-title {
    font-size: 21px;
  }

  .total-rank-comment p {
    font-size: 14px;
  }

  .winner-link {
    width: 100%;
    max-width: 330px;
    margin-top: 30px;
    padding: 15px 20px;
  }
}
