/*
 * サイトのデザイン — home（トップページの1ページ目）
 *
 * ヒーロー（ヘッダーの直後・全幅）、ゲームから探す、注目の記事、新着記事。
 * 部品のマークアップは lib/nettoge/design/inc/home.php。値は build/css/tokens-nettoge.css の --ntg2-*。
 */

/* ヒーロー（明るいテーマは紙色の地に絵を右寄せで薄く、暗いテーマは絵を強めに）。
   絵の URL はこのファイルからの相対パスなので、値のファイル（tokens-nettoge.css）ではなくここに置く */
#body_wrap .ntg2-hero {
  --ntg2-hero-art: url("../../../assets/img/nettoge-header-art-light.webp?v=20260808p");
  background:
    var(--ntg2-hero-overlay),
    var(--ntg2-hero-art) right center / auto 100% no-repeat,
    var(--ntg2-hero-base);
  border-bottom: 1px solid var(--ntg2-line);
}

html[data-nettoge-theme="dark"] #body_wrap .ntg2-hero {
  --ntg2-hero-art: url("../../../assets/img/nettoge-header-art-dark.webp?v=20260808p");
}

#body_wrap .ntg2-hero__in {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 210px;
  padding-top: 40px;
  padding-bottom: 36px;
}

#body_wrap .ntg2-hero__eyebrow {
  margin: 0;
  color: var(--ntg2-teal);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

#body_wrap .ntg2-hero__title {
  margin: 6px 0 8px;
  color: var(--ntg2-text);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.4;
}

#body_wrap .ntg2-hero__text {
  max-width: 30em;
  margin: 0;
  color: var(--ntg2-sub);
  font-size: 15px;
  line-height: 1.8;
}

/* ヒーローの下は間を詰める */
#body_wrap .ntg2-hero + #content {
  padding-top: 32px;
}

/* 節の間 */
#body_wrap .ntg2-homeSec + .ntg2-homeSec {
  margin-top: 44px;
}

/* ゲームから探す（写真のタイル。写真なので明るいテーマでも暗いまま） */
#body_wrap .ntg2-games {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

#body_wrap .ntg2-game {
  position: relative;
  display: flex;
  align-items: flex-end;
  aspect-ratio: 2.3 / 1;
  overflow: hidden;
  background: var(--ntg2-img, none) var(--ntg2-img-pos, center) / cover no-repeat, var(--ntg2-tile-base);
  border-radius: var(--ntg2-radius);
  color: var(--ntg2-tile-fg);
  text-decoration: none;
}

#body_wrap .ntg2-game::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ntg2-tile-overlay);
  transition: opacity 0.15s ease;
}

#body_wrap .ntg2-game:hover {
  outline: 2px solid var(--ntg2-teal);
  outline-offset: 2px;
}

#body_wrap .ntg2-game__logo {
  position: absolute;
  top: 42%;
  left: 50%;
  z-index: 1;
  width: auto;
  max-width: 66%;
  height: auto;
  max-height: 46%;
  margin: 0;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
  transform: translate(-50%, -50%);
}

#body_wrap .ntg2-game__word {
  position: absolute;
  top: 42%;
  left: 50%;
  z-index: 1;
  width: 90%;
  color: var(--ntg2-tile-fg);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  transform: translate(-50%, -50%);
}

#body_wrap .ntg2-game__name {
  position: relative;
  z-index: 1;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

/* 新着記事の見出しの右に並び順 */
#body_wrap .ntg2-homeSec--list .ntg2-secHead {
  margin-bottom: 6px;
}

#body_wrap .ntg2-homeSec--list .c-tabBody,
#body_wrap .ntg2-homeSec--list .p-postListTabBody {
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
}

/* SWELL のタブ（1つだけのときは出ない） */
#body_wrap .ntg2-homeSec--list .c-tabList {
  margin: 0 0 12px;
}

@media (min-width: 600px) and (max-width: 959px) {
  #body_wrap .ntg2-games {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (max-width: 599px) {
  #body_wrap .ntg2-hero {
    background:
      var(--ntg2-hero-overlay-sp),
      var(--ntg2-hero-art) right center / auto 100% no-repeat,
      var(--ntg2-hero-base);
  }

  #body_wrap .ntg2-hero__in {
    min-height: 150px;
    padding-top: 26px;
    padding-bottom: 24px;
  }

  #body_wrap .ntg2-hero__title {
    font-size: 22px;
  }

  #body_wrap .ntg2-hero__text {
    font-size: 13px;
  }

  #body_wrap .ntg2-games {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #body_wrap .ntg2-game__name {
    padding: 6px 10px;
    font-size: 12px;
  }

  #body_wrap .ntg2-game__word {
    font-size: 12px;
  }

  #body_wrap .ntg2-pick--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  /* 注目の記事はスマホでも縦長のカード（core の 1 列・横並びにしない） */
  #body_wrap .ntg2-pick--4 .ntg2-card {
    display: block;
  }

  #body_wrap .ntg2-pick--4 .ntg2-card .ntg2-thumb {
    width: auto;
  }
}
