/*
Theme Name: GEM_Theme_1125_3（トップにALL追加_FIX）
Description: Converted from HTML to WordPress
Author: ChatGPT
Version: 1.0
*/
@import url('css/main.css');
@import url('css/tailwind.css');


main {
  padding:0 0 40px 0;
}

/* ===== グローバルナビ共通 ===== */

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* メニューリスト（PC時） */
.header-nav__list {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-nav__list > li {
  position: relative;
}

.header-nav__list > li > a {
  display: inline-block;
  padding: 0.25rem 0;
  color: #fff;
  text-decoration: none;
  font-family: "Jost", sans-serif;
}

/* サブメニュー（ドロップダウン） */
.header-nav .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  padding: 8px 0;
  margin-top: 8px;
  list-style: none;
  background: #111;
  border: 1px solid #333;
  border-radius: 4px;
  display: none;
  z-index: 1000;
}

.header-nav .sub-menu li a {
  display: block;
  padding: 6px 14px;
  font-size: 0.85rem;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}

.header-nav .sub-menu li a:hover {
  background: #222;
}

/* 親メニューが開いているとき */
.header-nav__list > li.is-open > .sub-menu {
  display: block;
}

/* ===== ハンバーガー（スマホ用） ===== */

.header-nav__toggle {
  display: none;          /* PCでは非表示 */
  width: 32px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.header-nav__toggle span {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #fff;
  border-radius: 9999px;
  transition: transform .2s ease, top .2s ease, opacity .2s ease;
}

.header-nav__toggle span:nth-child(1) { top: 0; }
.header-nav__toggle span:nth-child(2) { top: 11px; }
.header-nav__toggle span:nth-child(3) { top: 22px; }

/* 開いているときの×アイコン */
.header-nav__toggle.is-open span:nth-child(1) {
  top: 11px;
  transform: rotate(45deg);
}
.header-nav__toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.header-nav__toggle.is-open span:nth-child(3) {
  top: 11px;
  transform: rotate(-45deg);
}

/* ===== スマホレイアウト ===== */

@media (max-width: 768px) {
  /* ハンバーガー表示 */
  .header-nav__toggle {
    display: block;
  }

  /* メニューは縦並びでヘッダ下に展開 */
  .header-nav {
    position: fixed;
    inset: 60px 0 auto 0;      /* ヘッダの高さに合わせて調整 */
    background: rgba(0,0,0,.95);
    transform: translateY(-100%);
    transition: transform .2s ease;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    padding: 12px 16px 24px;
    z-index: 999;
  }

  .header-nav.is-open {
    transform: translateY(0);
  }

  .header-nav__list {
    display: block;
  }

  .header-nav__list > li {
    margin-bottom: 4px;
  }

  .header-nav__list > li > a {
    display: block;
    padding: 8px 0;
  }

  /* サブメニューも縦に */
  .header-nav .sub-menu {
    position: static;
    border: none;
    background: transparent;
    padding: 4px 0 8px;
    margin: 0 0 4px 12px;
    display: none;  /* is-open時だけ表示 */
  }

  .header-nav__list > li.is-open > .sub-menu {
    display: block;
  }

  .header-nav .sub-menu li a {
    padding: 4px 0;
    font-size: 0.85rem;
    opacity: 0.9;
  }
}

/* ===== PCデフォルト表示 ===== */
@media (min-width: 769px) {
  .header-nav {
    display: block;
  }
}

/* ===== スマホ時：デフォルト非表示 ===== */
@media (max-width: 768px) {
  .header-nav {
    position: fixed;
    inset: 60px 0 auto 0;      /* 固定ヘッダの高さに合わせて調整（例：60px） */
    background: rgba(0,0,0,.95);
    transform: translateY(-100%);
    display: none;             /* ★ デフォルトは非表示 */
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    padding: 12px 16px 24px;
    z-index: 999;
  }

  /* ハンバーガーで開いたときだけ表示 */
  .header-nav.is-open {
    display: block;
    transform: translateY(0);
  }

  .header-nav__list {
    display: block;
  }

  .header-nav__list > li {
    margin-bottom: 4px;
  }

  .header-nav__list > li > a {
    display: block;
    padding: 8px 0;
  }
}




/* ====== Manual Slider (content-width 100%) ====== */
.gem-manual-slider .swiper {
  width: 100%; /* 親コンテンツ幅いっぱい（テーマのコンテンツ幅に追従） */
}
.gem-manual-slider .swiper-slide {
  height: auto;
}

/* ====== Media box (16:9・サムネ100%) ====== */
.gem-manual-slider .gem-slide-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 14px;
  background: #f2f4f7;
}
.gem-manual-slider .gem-slide-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gem-manual-slider .gem-thumb-placeholder {
  background: linear-gradient(180deg,#eaecef,#dfe3e8);
  width: 100%;
  height: 100%;
}

/* ====== Category pill (左上) ====== */
.gem-manual-slider .gem-slide-cat {
  position: absolute;
  left: 10px;
  top: 10px;
  display: inline-block;
  font-size: 12px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.65);
  color: #fff;
  backdrop-filter: blur(4px);
  z-index: 2;
}

/* ====== Title overlay box（左下固定・黒70%） ====== */
.gem-manual-slider .gem-title-box {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.7); /* 70% Black */
  padding: 18px 24px;             /* 余白はお好みで調整 */
  z-index: 1;
}
.gem-manual-slider .gem-slide-title {
  margin: 0;
  /* 少し大きめ */
  font-size: clamp(20px, 3.24vw, 26px);
  line-height: 1.35;
  font-weight: 800;
  color: #fff;                     /* 背景黒に対して白文字 */
}

.gem-manual-slider .gem-slide-title a,
.gem-manual-slider .gem-slide-title a:hover {
  text-decoration: none!important;
  -webkit-transition: all .3s ease-out;
  -moz-transition: all .3s ease-out;
  -ms-transition: all .3s ease-out;
  transition: all .3s ease-out;
}
.gem-manual-slider .gem-slide-title a:hover {
  opacity: 0.8;
  text-decoration: none!important;
  border:none;
}

/* ====== Link block ====== */
.gem-manual-slider .gem-slide {
  text-decoration: none;
  display: block;
}
.gem-manual-slider .gem-slide:hover .gem-slide-title {
}

/* ====== Swiper UI ====== */
.gem-manual-slider .swiper-button-prev,
.gem-manual-slider .swiper-button-next {
  color: #111827;
}
.gem-manual-slider .swiper-pagination-bullet { opacity: .4; }
.gem-manual-slider .swiper-pagination-bullet-active { opacity: 1; }

/* 微調整（多段表示時の間隔） */
@media (min-width: 768px) {
  .gem-manual-slider .swiper { padding-bottom: 8px; }

}

@media (max-width: 767px) {
  .gem-manual-slider .gem-slide-title {
    font-size: clamp(16px, 2.25vw, 20px);
    line-height: 1.35;                /* 背景黒に対して白文字 */
  }

  .gem-manual-slider .gem-slide-media {
    border-radius: 0px;
  }
}


.cat-tabs {
  --tab-fg: var(--gem-tab-fg, #1a202c);
  --tab-bg: var(--gem-tab-bg, #f1f5f9);
  --tab-active-fg: var(--gem-tab-active-fg, #fff);
  --tab-active-bg: var(--gem-tab-active-bg, #111827);
  --tab-border: var(--gem-tab-border, #e5e7eb);
  --link-fg: var(--gem-link-fg, #111827);
  --link-hover: var(--gem-link-hover, #0ea5e9);
  --muted: var(--gem-muted, #6b7280);
  --line: var(--gem-line, #e5e7eb);

  margin: clamp(16px, 3vw, 28px) auto;
  padding: 0 clamp(12px, 2.5vw, 20px);
  max-width: 1100px;
}

.screen-reader-text {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Tabs */
.cat-tabs__tablist {
  display: flex; gap: 8px;
  flex-wrap: nowrap; overflow-x: auto;
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}
.cat-tabs__tab {
  appearance: none;
  border: 1px solid var(--tab-border);
  background: var(--tab-bg); color: var(--tab-fg);
  border-radius: 9999px;
  padding: 8px 14px;
  font: 600 14px/1.2 system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
  white-space: nowrap; cursor: pointer;
  font-family: "Jost", sans-serif;
}
.cat-tabs__tab.is-active,
.cat-tabs__tab:focus-visible {
  outline: none;
  background: var(--tab-active-bg);
  color: var(--tab-active-fg);
  border-color: var(--tab-active-bg);
}

/* Panels */
.cat-tabs__panels { padding-top: 14px; }
.cat-tabs__panel[hidden] { display: none; }

/* Title list */
.post-titles {
  list-style: decimal;
  margin: 0;
  padding-left: 1.25em;
  display: grid; gap: 8px;
}
.post-titles__item {
  display: flex; gap: 8px; align-items: baseline;
  border-bottom: 1px dashed var(--line);
  padding: 8px 0;
}

/* 記事リスト：バッジをタイトルの上に（PCもスマホと同じ縦並びに） */
.post-titles__item {
  display: flex;
  flex-direction: column;   /* ← バッジ → タイトル → 日付を縦並び */
  align-items: flex-start;
  gap: 0.15rem;             /* 各要素の間に少し余白 */
}
/* バッジの下にちょっとだけ余白 */
.post-titles__item .cat-badge {
  margin-bottom: 0.15rem;
}

/* タイトルは1行ブロックにしておくとレイアウトが安定 */
.post-titles__item .post-titles__link {
  display: block;
}

.post-titles__link {
  flex: 1;
  text-decoration: none;
  color: var(--link-fg);
  font-weight: 600;
}
.post-titles__link:hover,
.post-titles__link:focus-visible {
  text-decoration: underline;
  color: var(--link-hover);
  outline: none;
}
.post-titles__date {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.post-titles__more { margin-top: 10px; text-align: right; }
.post-titles__more-link {
  font-weight: 600; text-decoration: none; border-bottom: 2px solid currentColor;
}

.titles-fallback__heading {
  font: 700 18px/1.2 system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
  margin: 8px 0 12px;
}

/* Dark scheme */
@media (prefers-color-scheme: dark) {
  .cat-tabs {
    --tab-fg:#e5e7eb; --tab-bg:#111827; --tab-border:#1f2937;
    --tab-active-fg:#111827; --tab-active-bg:#e5e7eb;
    --link-fg:#e5e7eb; --link-hover:#38bdf8; --muted:#9ca3af; --line:#1f2937;
  }
}

/* ===== Mobile: badge above title, date below title ===== */
@media (max-width: 640px){
  /* 1行レイアウト → 縦積み */
  .post-titles__item{
    flex-direction: column;
    align-items: flex-start !important;
    text-align: left !important;
    gap: 3px;               /* モバイルは少し詰める */
    padding: 10px 0;
  }

  /* タイトルはブロック化して改行しやすく */
  .post-titles__link{
    display: block;
    line-height: 1.35;
    order: 1;               /* バッジの次、日付の前 */
    margin: 0;              /* 余白は下で調整 */
  }

  /* バッジは最上段に。横→縦で余白も調整 */
  .cat-badge{
    order: 0;
    margin: 0 0 4px 0;      /* 右余白→下余白に変更 */
  }

  /* 日付はタイトルの下に */
  .post-titles__date{
    order: 2;
    display: block;
    margin-top: 4px;
  }
}
/* ===== Mobile: badge above title, date below title ===== */
@media (max-width: 640px){
  /* 1行レイアウト → 縦積み */
  .post-titles__item{
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;               /* モバイルは少し詰める */
    padding: 10px 0;
  }

  /* タイトルはブロック化して改行しやすく */
  .post-titles__link{
    display: block;
    line-height: 1.35;
    order: 1;               /* バッジの次、日付の前 */
    margin: 0;              /* 余白は下で調整 */
  }

  /* バッジは最上段に。横→縦で余白も調整 */
  .cat-badge{
    order: 0;
    margin: 0 0 4px 0;      /* 右余白→下余白に変更 */
  }

  /* 日付はタイトルの下に */
  .post-titles__date{
    order: 2;
    display: block;
    margin-top: 4px;
  }
}






/* ===== Category Tabs (Titles Only) ===== */
.cat-tabs {
  --tab-fg: var(--gem-tab-fg, #1a202c);
  --tab-bg: var(--gem-tab-bg, #f1f5f9);
  --tab-active-fg: var(--gem-tab-active-fg, #fff);
  --tab-active-bg: var(--gem-tab-active-bg, #111827);
  --tab-border: var(--gem-tab-border, #e5e7eb);
  --link-fg: var(--gem-link-fg, #111827);
  --link-hover: var(--gem-link-hover, #0ea5e9);
  --muted: var(--gem-muted, #6b7280);
  --line: var(--gem-line, #e5e7eb);

  margin: clamp(16px, 3vw, 28px) auto;
  padding: 0 clamp(12px, 2.5vw, 20px);
  max-width: 1100px;
}

.screen-reader-text {
  position: absolute !important;
  height: 1px; width: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

/* Tabs */
.cat-tabs__tablist {
  display: flex; gap: 8px;
  flex-wrap: nowrap; overflow-x: auto;
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}
.cat-tabs__tab {
  appearance: none;
  border: 1px solid var(--tab-border);
  background: var(--tab-bg); color: var(--tab-fg);
  border-radius: 9999px;
  padding: 8px 14px;
  font: 600 14px/1.2 system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
  white-space: nowrap; cursor: pointer;
  font-family: "Jost", sans-serif;
}
.cat-tabs__tab.is-active,
.cat-tabs__tab:focus-visible {
  outline: none;
  background: var(--tab-active-bg);
  color: var(--tab-active-fg);
  border-color: var(--tab-active-bg);
}

/* Panels */
.cat-tabs__panels { padding-top: 14px; }
.cat-tabs__panel[hidden] { display: none; }

/* Titles */
.post-titles {
  list-style: decimal;
  margin: 0; padding-left: 1.25em;
  display: grid; gap: 8px;
}
/* .post-titles__item {
  display: flex; gap: 10px; align-items: center;
  border-bottom: 1px dashed var(--line);
  padding: 8px 0;
} */
.post-titles__link {
  flex: 1; min-width: 0;
  text-decoration: none;
  color: var(--link-fg);
  font-weight: 600;
}
.post-titles__link:hover,
.post-titles__link:focus-visible {
  text-decoration: underline;
  color: var(--link-hover);
  outline: none;
}
.post-titles__date {
  color: var(--muted);
  font-size: 12px; white-space: nowrap;
}
.post-titles__more { margin-top: 10px; text-align: right; }
.post-titles__more-link { font-weight: 600; text-decoration: none; border-bottom: 2px solid currentColor; }
.post-titles__empty { color: var(--muted); }
.titles-fallback__heading {
  font: 700 18px/1.2 system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
  margin: 8px 0 12px;
}

/* ===== Category badge (Gray background always) ===== */
.cat-badge{
  --badge-bg: #e5e7eb;   /* グレー背景（固定） */
  --badge-fg: #111827;   /* 文字色は濃いグレー */
  --badge-dot: #9ca3af;  /* デフォルトのドット色（親カテゴリのみ等） */

  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  margin-right: 8px;
  border-radius: 9999px;
  background: var(--badge-bg);
  color: var(--badge-fg);
  font: 700 11px/1 system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
  letter-spacing: .02em;
  white-space: nowrap;
  flex-shrink: 0;
}
.cat-badge__dot{
  width: 8px; height: 8px; border-radius: 9999px;
  background: var(--badge-dot); /* 子カテゴリありなら各色に上書き（inline style） */
  opacity: 1;
}
.cat-badge__text{ transform: translateY(.5px); }

/* Dark scheme */
@media (prefers-color-scheme: dark) {
  .cat-tabs {
    --tab-fg:#e5e7eb; --tab-bg:#111827; --tab-border:#1f2937;
    --tab-active-fg:#111827; --tab-active-bg:#e5e7eb;
    --link-fg:#e5e7eb; --link-hover:#38bdf8; --muted:#9ca3af; --line:#1f2937;
  }
}


/* ===== ページャー共通デザイン（カテゴリ用） ===== */

/* paginate_links(type=list) の <ul class="page-numbers"> 対応 */
.category ul.page-numbers {
  display: flex;           /* 横並び */
  flex-wrap: wrap;
  justify-content: center; /* 中央寄せ */
  gap: 8px;                /* ボタン同士の余白 */
  list-style: none;        /* 先頭の「・」を消す */
  padding: 0;
  margin: 24px 0;
}

.category ul.page-numbers li {
  margin: 0;
}

/* 「次の12件」と同じボタン風デザインにする部分 */
/* ここは実際の「次の12件」ボタンのスタイルに合わせて色など調整してください */
.category ul.page-numbers a,
.category ul.page-numbers span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;      /* 丸いボタン */
  font-size: 0.875rem;
  text-decoration: none;
  border: 1px solid #111827;  /* 「次の12件」と同系の色に変更してください */
  background: #111827;        /* ここも同じ色に */
  color: #fff;                /* 文字色も合わせる */
  box-sizing: border-box;
}

/* ========================================
   WINTER SPORTS カテゴリ専用ヒーロー
   ======================================== */
.winter-hero {
  background: radial-gradient(circle at top left, #1e293b 0, #020617 55%, #000 100%);
  color: #f9fafb;
  padding: 40px 0 32px;
  margin-bottom: 40px;
  font-size: 16px; /* 全体のベース文字サイズをやや大きめに */
}

.winter-hero__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* 上段 */
.winter-hero__intro {
  margin-bottom: 28px;
}

.winter-hero__label {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.winter-hero__label-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  margin-right: 8px;
}

.winter-hero__title {
  font-size: 28px;
  line-height: 1.25;
  font-weight: 800;
  margin: 0 0 12px;
}

@media (min-width: 768px) {
  .winter-hero__title {
    font-size: 34px;
  }
}

@media (min-width: 1024px) {
  .winter-hero__title {
    font-size: 40px;
  }
}

.winter-hero__lead {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(226, 232, 240, 0.96);
  max-width: 720px;
  margin: 0 0 18px;
}

.winter-hero__lead-strong {
  font-weight: 600;
}

/* 基本情報3つのボックス */
.winter-hero__info-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

@media (min-width: 640px) {
  .winter-hero__info-row {
    flex-direction: row;
  }
}

.winter-info {
  flex: 1 1 0;
  background: #020617;
  border-radius: 12px;
  border: 1px solid #1e3a8a;
  padding: 12px 14px;
}

.winter-info__label {
  font-size: 12px;
  color: #cbd5f5;
  margin: 0 0 4px;
}

.winter-info__main {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}

.winter-info__sub {
  font-size: 12px;
  color: #cbd5f5;
  margin: 4px 0 0;
}

/* ボタン類 */
.winter-hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.winter-btn {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}

.winter-btn--main {
  padding: 8px 16px;
  background: #22c55e;
  color: #020617;
  box-shadow: 0 8px 18px rgba(16, 185, 129, 0.35);
}

.winter-btn--main:hover {
  background: #4ade80;
  transform: translateY(-1px);
}

.winter-btn--sub {
  padding: 7px 14px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.7);
}

.winter-btn--sub:hover {
  background: rgba(30, 64, 175, 0.75);
  border-color: #60a5fa;
}

.winter-btn__icon {
  width: 16px;
  height: 16px;
  margin-left: 6px;
}

/* 下段カード群：flex で PC 時3列 */
.winter-hero__cards {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* カード本体 */
.winter-card {
  flex: 1 1 260px;
  background: #0b1b3a; /* 濃いブルー */
  border-radius: 16px;
  border: 1px solid #1d4ed8;
  padding: 16px 16px 18px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.55);
}

.winter-card--para {
  border-color: #10b981;
}

@media (min-width: 1024px) {
  .winter-card {
    flex-basis: calc(33.333% - 12px); /* PC 時は最大3列想定 */
  }
}

.winter-card__label {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  padding: 3px 9px;
  border-radius: 999px;
}

.winter-card__label--sky {
  background: rgba(59, 130, 246, 0.2);
  color: #bfdbfe;
}

.winter-card__label--para {
  background: rgba(16, 185, 129, 0.18);
  color: #a7f3d0;
}

.winter-card__title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px;
}

.winter-card__text {
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 8px;
  color: #e5e7eb;
}

.winter-card__list {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.7;
}

.winter-card__list li {
  margin-bottom: 3px;
}

.winter-card__note {
  font-size: 12px;
  color: #cbd5f5;
  margin-top: 4px;
}

/* 実施競技タグ（改行させない） */
.winter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.winter-tags__item {
  display: inline-block;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #020617;
  border: 1px solid #1f2937;
  color: #e5e7eb;
  white-space: nowrap; /* ← 1タグの中で改行しない */
}






/* ================================
   Home 2-Column + Ads/Ranking/PR
   ================================ */
.home-layout{
  display:grid; grid-template-columns:1fr; gap:clamp(16px,2vw,28px); align-items:start;
}
@media (min-width:1024px){
  .home-layout{ grid-template-columns:minmax(0,1fr) 336px; }
}
.home-layout > *{ min-width:0; }
.home-main{ min-width:0; }

/* Sticky sidebar（ヘッダ高に合わせて調整） */
.home-aside{
  display:grid; gap:16px;
  position:sticky; top:110px;
  min-width:0;
}

/* ---------- Ad slots ---------- */
.ad-slot{
  display:flex; justify-content:center; align-items:center; text-align:center;
  font:700 14px/1.2 system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial,"Noto Sans JP",sans-serif;
  color:#6b7280;
  background:repeating-linear-gradient(45deg,#f3f4f6,#f3f4f6 10px,#e5e7eb 10px,#e5e7eb 20px);
  border:1px dashed #cbd5e1; border-radius:8px;
}
.ad-300x250{ width:300px; height:250px; margin:0 auto; }
.ad-300x600{ width:300px; height:600px; margin:0 auto; }
.ad-160x600{ width:160px; height:600px; margin:0 auto; }
.ad-728x90 { width:728px; height:90px;  margin:0 auto; }
/* サイドバーではワイド広告は隠す（本文側に出す） */
.home-aside .ad-728x90{ display:none !important; }

/* 本文側のフル幅ワイド広告（必要な場合のみ使用） */
.wide-ad-row{ margin-top:12px; }
.wide-ad-row .ad-728x90{ width:100%; max-width:100%; height:90px; margin:0 auto; }
@media (max-width:767.98px){ .wide-ad-row{ display:none; } }

/* ---------- Sidebar: Ranking ---------- */
.sidebar-ranking{
  display:grid; gap:10px; padding:12px;
  background:#f8fafc; border:1px solid #e5e7eb; border-radius:10px;
}
.sidebar-ranking__title{
  margin:0; color:#0f172a;
  font:700 20px/1.2 system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial,"Noto Sans JP",sans-serif;
  font-family: "Jost", sans-serif;
}
.sidebar-ranking__list{ list-style:none; margin:0; padding:0; display:grid; gap:8px; }
.sidebar-ranking__item{ display:grid; grid-template-columns:28px 1fr; gap:8px; align-items:start; }
.sidebar-ranking__no{
  width:28px; height:28px; border-radius:50%; display:grid; place-items:center;
  font-weight:800; font-size:12px; color:#fff; background:#111827;
}
.sidebar-ranking__link{ display:block; text-decoration:none; color:#111827; font-weight:600; line-height:1.35; }
.sidebar-ranking__link:hover, .sidebar-ranking__link:focus-visible{ text-decoration:underline; color:#0ea5e9; outline:none; }

/* ---------- Sidebar: Affiliate ---------- */
.affiliate-block{
  display:grid; gap:12px; padding:12px;
  background:#f8fafc; border:1px solid #e5e7eb; border-radius:10px;
}
.affiliate-block__title{
  margin:0 0 6px; color:#0f172a;
  font:700 14px/1.2 system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial,"Noto Sans JP",sans-serif;
}
.affiliate-card{
  display:grid; grid-template-columns:120px 1fr; gap:10px; align-items:center;
  text-decoration:none; background:#fff; border:1px solid #e5e7eb; border-radius:8px; padding:8px;
}
.affiliate-card:hover{ border-color:#94a3b8; }
.affiliate-card__img{
  width:120px; height:120px; display:grid; place-items:center;
  color:#6b7280; background:#f1f5f9; border:1px dashed #cbd5e1; border-radius:6px; font-weight:700;
}
.affiliate-card__body{ display:grid; gap:4px; }
.affiliate-card__label{ font-weight:700; color:#111827; }
.affiliate-card__desc{ font-size:12px; color:#6b7280; }

/* ---------- Feature banners (under list) ---------- */
.feature-banners{ margin-top:clamp(16px,2vw,28px); }
.feature-banners__title{
  margin:0 0 10px; color:#0f172a;
  font:700 16px/1.2 system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial,"Noto Sans JP",sans-serif;
}
.feature-banners__grid{ display:grid; grid-template-columns:1fr; gap:14px; }
@media (min-width:768px){ .feature-banners__grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:640px){.feature-banners{ margin-top:clamp(16px,2vw,28px); padding:0 10px;}}
.feature-banner{ display:grid; gap:6px; text-decoration:none; }
.feature-banner__img{
  min-height:160px; display:grid; place-items:center; font-weight:700; color:#64748b;
  background:linear-gradient(135deg,#eef2f7,#e8eef7); border:1px solid #dbe3ee; border-radius:10px;
}
.feature-banner__label{ font-weight:700; color:#111827; }



/* ---------- Dark polish for sidebar blocks ---------- */
@media (prefers-color-scheme:dark){
  .sidebar-ranking,
  .affiliate-block{ background:#0b1220; border-color:#1f2937; }
  .sidebar-ranking__title, .sidebar-ranking__link{ color:#e5e7eb; }
}


/* ===== Ranking number as icon badges ===== */
.sidebar-ranking__no{
  width: 32px; height: 32px;
  border-radius: 9999px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 13px;
  color: #111;
  background: radial-gradient(circle at 30% 30%, #ffffff 0%, #e9eef5 40%, #cfd8e3 100%);
  box-shadow:
    inset 0 2px 4px rgba(255,255,255,.45),
    inset 0 -2px 6px rgba(0,0,0,.12),
    0 1px 2px rgba(0,0,0,.18);
  position: relative;
  isolation: isolate; /* crownなどの重なりのため */
  border: 1px solid rgba(0,0,0,.08);
}

/* 1位：Gold + 小さなクラウン */
.sidebar-ranking__item:nth-child(1) .sidebar-ranking__no{
  background:
    radial-gradient(circle at 30% 30%, #fff7d1 0%, #f7e6a6 45%, #d9b238 100%);
  color: #3b2f00;
  box-shadow:
    inset 0 3px 6px rgba(255,255,255,.55),
    inset 0 -3px 10px rgba(120,85,0,.2),
    0 4px 10px rgba(0,0,0,.25);
  border-color: rgba(164,127,16,.4);
}
.sidebar-ranking__item:nth-child(1) .sidebar-ranking__no::after{
  content: "";
  position: absolute;
  top: -6px; left: 50%;
  width: 16px; height: 10px;
  transform: translateX(-50%);
  /* シンプルなクラウン形状（CSSのみ） */
  background:
    linear-gradient(#f7e38a, #e0c353);
  clip-path: polygon(0% 100%, 0% 60%, 20% 30%, 40% 60%, 50% 25%, 60% 60%, 80% 30%, 100% 60%, 100% 100%);
  border: 1px solid rgba(128,96,0,.35);
  border-bottom: none;
  border-radius: 2px 2px 0 0;
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
  z-index: 2;
}

/* 2位：Silver */
.sidebar-ranking__item:nth-child(2) .sidebar-ranking__no{
  background:
    radial-gradient(circle at 30% 30%, #ffffff 0%, #f0f3f7 40%, #cdd5df 100%),
    linear-gradient(#f6f7f9, #c7cfda);
  color: #1f2937;
  border-color: rgba(110,120,135,.35);
  box-shadow:
    inset 0 3px 6px rgba(255,255,255,.6),
    inset 0 -3px 10px rgba(70,80,95,.18),
    0 3px 8px rgba(0,0,0,.22);
}

/* 3位：Bronze */
.sidebar-ranking__item:nth-child(3) .sidebar-ranking__no{
  background:
    radial-gradient(circle at 30% 30%, #ffe7d8 0%, #f2c3a3 45%, #c38558 100%);
  color: #3a2416;
  border-color: rgba(140,90,55,.45);
  box-shadow:
    inset 0 3px 6px rgba(255,255,255,.55),
    inset 0 -3px 10px rgba(90,50,20,.18),
    0 3px 8px rgba(0,0,0,.22);
}

/* 4位以降：ニュートラル（控えめなアイコン） */
.sidebar-ranking__item:nth-child(n+4) .sidebar-ranking__no{
  background:
    radial-gradient(circle at 30% 30%, #ffffff 0%, #eef2f7 45%, #d7dfea 100%);
  color: #0f172a;
  border-color: rgba(120,130,150,.25);
}

/* 端子の視認性を少し強化（ダークモード） */
@media (prefers-color-scheme: dark){
  .sidebar-ranking__no{
    color: #0b0f1a;
    background: radial-gradient(circle at 30% 30%, #e8edf6 0%, #cfd7e6 45%, #b9c3d6 100%);
    border-color: rgba(30,40,60,.35);
    box-shadow:
      inset 0 2px 4px rgba(255,255,255,.4),
      inset 0 -2px 6px rgba(0,0,0,.25),
      0 1px 2px rgba(0,0,0,.35);
  }
  .sidebar-ranking__item:nth-child(1) .sidebar-ranking__no::after{
    box-shadow: 0 1px 2px rgba(0,0,0,.3);
  }
}

/* アニメ演出を抑える（ユーザー設定に追従） */
@media (prefers-reduced-motion: reduce){
  .sidebar-ranking__no{ transition: none !important; }
}


/* === レイアウト崩れ・押し広げ対策（最少差分パッチ） === */

/* 1) PC時の2カラムを強制安定化（右カラムを必ず2列目に） */
@media (min-width:1024px){
  .home-layout{
    max-width: 1280px;           /* テーマ幅に合わせて調整可 */
    margin-inline: auto;
    padding-inline: 16px;
    grid-template-columns: minmax(0,1fr) 336px !important;
  }
  .home-main{ grid-column: 1; }
  .home-aside{
    grid-column: 2 !important;
    grid-row: 1;                 /* ヒーロー等があっても先頭から開始 */
    align-self: start;
  }
}

/* 2) 右サイドが前面に出て重なるのを回避（z-indexの整理） */
.home-main{ position: relative; z-index: 1; }
.home-aside{ position: sticky; z-index: 0; } /* stickyは維持しつつ背面へ */

/* 3) ランキング内の長文で横に膨らまないように */
.sidebar-ranking__link{
  overflow-wrap: anywhere;   /* とにかく折り返す */
  word-break: break-word;
  white-space: normal;
}

/* 4) ランキングボックス自体の視覚的まとまりと影響範囲を限定 */
.sidebar-ranking{
  position: relative;
  z-index: 0;                /* ヒーローやスライダーの矢印より背面 */
  max-width: 100%;
}

/* 5) もしスライダーの矢印が重なる場合は（任意） */
.slider, .hero-slick, .slick-slider{
  position: relative;
  z-index: 2;                /* こちらを前面に */
}

/* 6) 特集バナーの横はみ出し防止（狭幅時の左右余白を確保） */
@media (max-width: 640px){
  .feature-banners{ padding-inline: 10px; }
}


/* === 2カラムとヒーローの幅合わせ & サイドバー安定化（ホットフィックス） === */

/* 1) ページ内コンテナ幅を統一（ヒーローと同等に） */
:root{
  --gem-container-max: 1280px; /* ヒーローの実幅に合わせてここだけ調整可 */
  --gem-page-pad: 16px;
}
.home-layout,
.cat-tabs{
  max-width: var(--gem-container-max);
  margin-inline: auto;
  padding-inline: var(--gem-page-pad);
}

/* 2) PC時の2カラム定義を固定（右=2列目、左=1列目） */
@media (min-width: 1024px){
  .home-layout{
    display: grid;
    grid-template-columns: minmax(0,1fr) 336px !important;
    align-items: start;
    gap: clamp(16px, 2vw, 28px);
  }
  .home-main{ grid-column: 1; min-width: 0; }
  .home-aside{ grid-column: 2 !important; grid-row: 1; min-width: 0; }
}

/* 3) サイドバーの sticky をいったん無効化（重なり・せり上がり対策） */
.home-aside{
  position: static !important;  /* まずは確実に被りを止める */
  top: auto !important;
}

/* 4) ランキング内の長文でも横に膨らまない */
.sidebar-ranking{ max-width: 100%; }
.sidebar-ranking__link{
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

/* 5) (任意) ヒーローの前後の重なりを明示的に解消 */
.hero-slick, .slick-slider, .slider{ position: relative; z-index: 1; }
.home-layout{ position: relative; z-index: 2; }

/* ===== Hero slider: PC=元比率のまま, SP=4:3固定・トリミング ===== */

/* スライド枠（各スライド） */
.hero-slick .hero-slide{
  position: relative;
  width: 100%;
  /* PCは高さを持たせない（画像の自然比率で決まる） */
}

/* 画像の初期化（テーマやimg要素のheight属性の影響を無効化） */
.hero-slick .hero-slide img{
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
}

/* --- SPは4:3固定でobject-fit: cover（はみ出しを自然にトリミング） --- */
@media (max-width: 767px){
  .hero-slick .hero-slide{
    aspect-ratio: 4 / 3;                /* 近代ブラウザ */
    height: auto;
  }
  /* aspect-ratioが効かない環境向けのフォールバック */
  .hero-slick .hero-slide::before{
    content: "";
    display: block;
    padding-top: calc(100% * 3 / 4);    /* 4:3 */
  }
  .hero-slick .hero-slide > *{
    position: absolute;
    inset: 0;
  }
  .hero-slick .hero-slide img{
    width: 100%;
    height: 100%;
    object-fit: cover;                   /* トリミングで4:3に収める */
  }
}

/* slickの高さ固定が残っている場合のリセット */
.hero-slick .slick-list,
.hero-slick .slick-track{
  height: auto !important;
}

/* 矢印などの重なり調整（任意） */
.hero-slick{ position: relative; }
.hero-slick .slick-prev,
.hero-slick .slick-next{ z-index: 3; }


/* ===== Slider media sizing (PC: natural, SP: 4:3 cover) ===== */

/* 共通：枠とメディアの初期化 */
.gem-slide-media{ position: relative; width: 100%; }
.gem-slide-media img,
.gem-slide-media picture,
.gem-slide-media picture img,
.gem-slide-media video{
  display: block;
  width: 100%;
  height: auto;           /* PCは自然比率 */
  object-fit: contain;    /* 画像/videoが潰れないよう初期はcontain */
}

/* SPは4:3でトリミング（cover） */
@media (max-width: 767px){
  .gem-slide-media{
    aspect-ratio: 4 / 3;             /* 近代ブラウザ */
    height: auto;
  }
  /* aspect-ratio非対応環境のフォールバック */
  .gem-slide-media::before{
    content: ""; display: block; padding-top: 75%;
  }
  .gem-slide-media > img,
  .gem-slide-media > picture,
  .gem-slide-media > picture img,
  .gem-slide-media > video{
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;               /* 4:3に収めて自然にトリミング */
  }
}

/* Slickの高さ固定を解除（テーマが固定している場合の保険） */
.slick-list, .slick-track{ height: auto !important; }
.slick-slide{ display: block; }

/* 矢印がメディアの下に潜らないよう（任意） */
.slick-slider{ position: relative; }
.slick-prev, .slick-next{ z-index: 3; }



/* ===== Bottom CONTENTS – Category Banners ===== */
.contents-section{
  margin: clamp(24px, 4vw, 48px) auto 0;
  max-width: var(--gem-container-max, 1120px);
  padding-inline: var(--gem-page-pad, 16px);
}
.contents-section__title{
  margin: 0 0 14px;
  font: 800 18px/1.2 system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial,"Noto Sans JP",sans-serif;
  letter-spacing: .08em;
  color: #e5e7eb;
  font-family: "Jost", sans-serif;
}
@media (prefers-color-scheme: light){
  .contents-section__title{ color: #0f172a; }
}
.contents-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 640px){
  .contents-grid{ grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px){
  .contents-grid{ grid-template-columns: 1fr 1fr 1fr; }
}

.content-card{
  display: grid;
  grid-template-rows: auto auto;
  gap: 8px;
  text-decoration: none;
  background: transparent;
}
.content-card__media{
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #0b1220, #111827);
  border: 1px solid rgba(255,255,255,.08);
}
.content-card__media img{
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.content-card__ph{
  width: 100%; height: 100%;
  display: grid; place-items: center;
  color: #94a3b8;
  background: repeating-linear-gradient(45deg,#0f172a,#0f172a 12px,#111827 12px,#111827 24px);
}
.content-card__label{
  position: absolute; left: 10px; bottom: 10px;
  padding: 6px 10px;
  background: rgba(0,0,0,.55);
  color: #fff;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,.18);
  font: 700 12px/1 system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial,"Noto Sans JP",sans-serif;
}
.content-card__desc{
  color: #cbd5e1;
  font: 500 13px/1.4 system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial,"Noto Sans JP",sans-serif;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding-left: 2px;
}
@media (prefers-color-scheme: light){
  .content-card__desc{ color: #334155; }
}
.content-card:hover .content-card__media{ transform: translateY(-1px); transition: transform .2s ease; }
.content-card:hover .content-card__label{ background: rgba(0,0,0,.7); }




/* ===== Sidebar: おすすめ（ランキングと同系統・数字なし） ===== */
.sidebar-recommend{
  display:grid; gap:10px; padding:12px;
  background:#f8fafc; border:1px solid #e5e7eb; border-radius:10px;
}
.sidebar-recommend__title{
  margin:0; color:#0f172a;
  font:700 20px/1.2 system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial,"Noto Sans JP",sans-serif;
  font-family: "Jost", sans-serif;
}
.sidebar-recommend__list{ list-style:none; margin:0; padding:0; display:grid; gap:8px; }
.sidebar-recommend__item{
  display:grid; grid-template-columns:16px 1fr; gap:8px; align-items:start;
}
.sidebar-recommend__dot{
  width:10px; height:10px; border-radius:50%;
  background: radial-gradient(circle at 30% 30%, #94a3b8 0%, #64748b 80%);
  margin-top: 4px;
}
.sidebar-recommend__link{
  text-decoration:none; color:#111827; font-weight:600; line-height:1.35;
  overflow-wrap:anywhere; word-break:break-word; white-space:normal;
}
.sidebar-recommend__link:hover,.sidebar-recommend__link:focus-visible{
  text-decoration:underline; color:#0ea5e9; outline:none;
}
/* 子カテゴリ名の小さなタグ（右揃えで回り込み防止） */
.sidebar-recommend__cat{
  grid-column:2; justify-self:start; margin-top:2px;
  display:inline-block; padding:2px 8px; border-radius:9999px;
  font:700 10px/1 system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial,"Noto Sans JP",sans-serif;
  text-decoration:none; color:#111827; background:#e5e7eb;
}
.sidebar-recommend__cat:hover{ background:#d1d5db; }

/* ダークモード調整（ランキングと足並み） */
@media (prefers-color-scheme: dark){
  .sidebar-recommend{ background:#0b1220; border-color:#1f2937; }
  .sidebar-recommend__title, .sidebar-recommend__link{ color:#e5e7eb; }
  .sidebar-recommend__cat{ color:#0b1220; background:#cbd5e1; }
}
