/* =========================
   基本レイアウト
   ========================= */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: #222;
  background: #fff;
  line-height: 1.6;
  padding-top: 60px; /* ヘッダー分の余白 */
}

#wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* 固定ヘッダー対策：アンカー位置の調整 */
h2, h3, section {
  scroll-margin-top: 80px;
}

/* =========================
   ヘッダー
   ========================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #111;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  z-index: 1000;
  will-change: transform; /* ナビゲーションのパフォーマンス改善 */
}

.site-header .logo {
  font-size: 1.2em;
  font-weight: bold;
}

.site-header .nav ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.site-header .nav ul li { margin-left: 20px; }

.site-header .nav ul li a {
  color: #fff;
  text-decoration: none;
  transition: color 0.25s ease; /* トランジションを限定 */
}

.site-header .nav ul li a:hover { color: #00aaff; }

/* ハンバーガーメニュー */
.menu-toggle {
  display: none;
  font-size: 1.5em;
  cursor: pointer;
}

/* スマホ対応 */
@media (max-width: 768px) {
  .site-header .nav {
    display: none;
    position: absolute;
    top: 60px;
    right: 0;
    background: #111;
    width: 200px;
    padding: 10px 0;
  }
  .site-header .nav ul {
    flex-direction: column;
    text-align: right;
  }
  .site-header .nav ul li { margin: 10px 20px; }
  .menu-toggle { display: block; }
  .site-header.active .nav { display: block; }
}

/* =========================
   スライドショー
   ========================= */
#slideshow {
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin: 24px auto;
  overflow: hidden;
}
#slideshow::before {
  content: "";
  display: block;
  padding-top: 56.25%; /* 16:9 */
}
#slideshow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease; /* トランジション軽量化 */
  image-rendering: auto; /* 画像レンダリング最適化 */
}
#slideshow img.active { opacity: 1; }

/* 動きに弱い人向け（prefers-reduced-motion） */
@media (prefers-reduced-motion: reduce) {
  #slideshow img { transition: none !important; }
}

/* =========================
   ブランド紹介
   ========================= */
.brand-intro {
  text-align: center;
  margin: 40px auto;
  max-width: 800px;
  padding: 0 8px;
}
.brand-intro h2 { font-size: 2.2rem; margin-bottom: 12px; }
.brand-intro p { color:#555; font-size: 1.05rem; }

/* =========================
   おすすめリンク
   ========================= */
#daily-recommend {
  max-width: 900px;
  margin: 36px auto;
  text-align: center;
}
.recommend-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.recommend-item {
  background:#f9f9f9;
  padding:14px;
  border-radius:10px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.06);
}
.recommend-btn {
  display:inline-block;
  background:#ff9900; color:#fff;
  padding:8px 14px; border-radius:6px;
  text-decoration:none; font-weight:600;
  transition: background 0.25s ease;
}
.recommend-btn:hover { background:#e68a00; }

/* Archive details */
#recommend-archive details {
  margin-top:12px;
  border:1px solid #e6e6e6;
  border-radius:6px;
  padding:10px;
}
#recommend-archive summary {
  cursor:pointer;
  font-weight:600;
}

/* =========================
   Short column
   ========================= */
#short-column { max-width:900px; margin:32px auto; padding:18px; }
#short-column h2 { text-align:center; margin-bottom:12px; }
#short-column #old-columns {  }

/* 折りたたみ（初期は閉じる） */
.collapsible {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

/* 開いたとき */
.collapsible.is-open {
  max-height: 1000px; /* 大きめに設定。中身に応じて調整可 */
}

/* ボタンスタイル（任意） */
#show-more {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
}
#show-more:focus { outline: 2px solid #0073e6; }


/* =========================
   Editor's Picks
   ========================= */
.section-title {
  text-align:center;
  font-size:2em;
  margin:48px 0 24px;
  letter-spacing:1px;
  color:#222;
}
.section-title::after {
  content:"";
  display:block;
  width:80px; height:3px;
  background: linear-gradient(90deg,#0071e3,#00c6ff);
  margin:10px auto 0; border-radius:2px;
}

.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 20px auto;
}
.product-card {
  background:#fff; border-radius:12px; padding:18px;
  box-shadow:0 6px 18px rgba(0,0,0,0.06);
  text-align:center;
  transition: transform .25s ease, box-shadow .25s ease;
  will-change: transform; /* パフォーマンス改善 */
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow:0 10px 26px rgba(0,0,0,0.08);
}
.product-card img {
  width:100%;
  max-width:260px;
  height:160px;
  object-fit:cover;
  display:block;
  margin: 0 auto 12px;
  border-radius:8px;
  aspect-ratio: 260/160; /* CLS対策 */
}
.product-card h3 { font-size:1.05rem; margin:8px 0; }
.product-card p { color:#555; font-size:.95rem; margin-bottom:12px; }

/* ============================
   YouTube サムネイル & シアターモード
============================ */

.iframe-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* PCでは3列 */
  gap: 20px;
  justify-content: center;
  align-items: start;  /* 子要素を上揃え */
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 16px;
  clear: both;
}

/* 各動画カード（必ず高さを持たせる） */
.iframe-container .yt-card {
  width: 100%;
  aspect-ratio: 16/9; /* 高さを保証 */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden; /* 余分なはみ出し防止 */
}

/* lite-youtube の高さを強制 */
.iframe-container lite-youtube,
.iframe-container iframe {
  width: 100%;
  height: 100%; /* 親の aspect-ratio に従って高さ確保 */
  display: block;
  border-radius: 12px;
  background: #000; /* ローディング時に黒背景 */
}

/* モバイルでは縦1列 */
@media (max-width: 768px) {
  .iframe-container {
    grid-template-columns: 1fr;
  }
}


/* yt-trigger（サムネイル + 全面ボタン） */
.yt-trigger {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;   /* 高さを固定して切れ防止 */
  overflow: hidden;
  border-radius: 12px;
  background: #000;
}

.yt-trigger lite-youtube {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: cover;
  pointer-events: none; /* クリックはオーバーレイボタンに渡す */
}

/* 全面を覆う再生ボタン（見た目は再生アイコン） */
.yt-play-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

/* ボタン中央の大きな再生アイコン（装飾） */
.yt-play-overlay::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}

.yt-play-overlay::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-42%, -50%); /* 見栄え調整 */
  border-left: 20px solid #fff;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
}

/* オーバーレイ（初期非表示） */
#theater-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

/* active で表示 */
#theater-overlay.active {
  display: flex;
}

/* プレーヤー領域 */
#theater-player {
  width: 90%;
  max-width: 960px;
  aspect-ratio: 16/9;
}

/* iframe をフルに */
#theater-player iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* 閉じるボタン */
#theater-close {
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 10000;
  background: transparent;
  color: #fff;
  border: none;
  font-size: 28px;
  cursor: pointer;
}

/* モバイル調整 */
@media (max-width: 600px) {
  #theater-player {
    width: 100%;
  }
  #theater-close {
    font-size: 24px;
    top: 12px;
    right: 12px;
  }
}


/* =========================
   Featured Reviews
   ========================= */
#featured-reviews {
  max-width:1100px;
  margin: 40px auto;
  padding: 0 12px;
}
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.review-card {
  background:#fafafa;
  border:1px solid #e6e6e6;
  border-radius:12px;
  padding:16px;
  transition: transform .25s ease, box-shadow .25s ease;
  will-change: transform;
}
.review-card:hover {
  transform: translateY(-6px);
  box-shadow:0 10px 20px rgba(0,0,0,0.08);
}
.review-card img {
  display:block;
  width:100%;
  height:180px;
  object-fit: cover;
  border-radius:8px;
  margin-bottom:12px;
  aspect-ratio: 16/9; /* CLS対策 */
}
.review-content h3 { font-size:1.05rem; margin:6px 0 8px; }
.review-content p { font-size:.95rem; color:#333; margin-bottom:12px; }

/* =========================
   Hard-to-Get Collection
   ========================= */
#hard-to-get {
  max-width: 1100px;
  margin: 60px auto;
  padding: 0 20px;
}
#hard-to-get .rare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}
.rare-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  will-change: transform;
}
.rare-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}
.rare-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  aspect-ratio: 3/2; /* CLS対策 */
}
.rare-content { padding: 15px 20px; }
.rare-content h3 { font-size: 1.2em; margin-bottom: 10px; }
.rare-content p {
  font-size: 0.9em;
  color: #333;
  margin-bottom: 15px;
  line-height: 1.5;
}
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.buy-btn {
  flex: 1;
  background: #0073e6;
  color: #fff;
  padding: 10px;
  text-align: center;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.25s ease;
}
.buy-btn:hover { background: #005bb5; }
.sub-btn {
  flex: 1;
  background: #f5f5f5;
  color: #333;
  padding: 10px;
  text-align: center;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.85em;
  transition: background 0.25s ease;
}
.sub-btn:hover { background: #e2e2e2; }

/* =========================
   フッター
   ========================= */
footer {
  padding:26px 12px;
  text-align:center;
  color:#666;
  font-size:.9rem;
  margin-top:30px;
}

/* =========================
   モバイル最適化
   ========================= */
@media (max-width: 900px) {
  .review-card img { height:150px; }
  .product-card img { height:140px; max-width:220px; }
  .iframe-container iframe,
  .iframe-container lite-youtube { flex: 1 1 100%; max-width: 100%; }
}
@media (max-width: 600px) {
  #wrapper { padding: 0 10px; }
  .review-card img { height:130px; }
  .product-card img { height:120px; max-width:100%; }
  .reviews-grid { gap:16px; }
  .products { gap:16px; }
  .section-title { font-size:1.6rem; }
  .brand-intro h2 { font-size:1.6rem; }
  .figure-container { flex-direction:column; align-items:center; }
}

/* =========================
   記事ページデザイン
   ========================= */

/* ── 記事ヘッダー ── */
.article-header {
  text-align: center;
  margin: 40px auto 20px;
  padding: 0 15px;
}

.article-header h1 {
  font-size: 2em;
  margin-bottom: 10px;
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif; /* フォールバック追加 */
}

.article-header .subtitle {
  font-size: 1em;
  color: #555;
}

/* ── 記事本文 ── */
.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  line-height: 1.7;
  font-family: sans-serif;
}

.article-content h2 {
  font-size: 1.4em;
  margin: 25px 0 15px;
  border-left: 4px solid #0073e6;
  padding-left: 10px;
}

/* h3 見出し用（招待制販売など） */
.article-content h3 {
  font-size: 1.2em;
  margin: 20px 0 10px;
  color: #0073e6;
}

/* リスト */
.article-content ul {
  margin: 15px 0 25px 20px;
  list-style: disc inside;
}

/* 注意文（赤文字） */
.notice {
  color: red;
  font-weight: bold;
  margin: 15px 0;
}

/* ── 記事内画像 ── */
.article-img {
  width: 100%;
  max-width: 700px;
  margin: 20px auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ── 購入ボタン ── */
.buy-box {
  margin: 20px 0;
  text-align: center;
}

/* 基本ボタン */
.buy-btn {
  display: inline-block;
  padding: 14px 22px;
  border-radius: 8px;
  font-size: 1.1em;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
  background: #ff9900; /* Amazonカラー */
  color: #fff;
}

/* 任天堂公式ボタン */
.buy-btn.official {
  background: #e60012; /* 任天堂の赤 */
}

/* ホバー効果（両方に適用） */
.buy-btn:hover {
  opacity: 0.85;
  background: #005bb5;
}

/* ボタン間の余白 */
.buy-box + .buy-box {
  margin-top: 15px;
}

/* ── 記事フッター ── */
.article-footer {
  text-align: center;
  margin: 40px 0 20px;
  font-size: 0.9em;
  color: #666;
}
