/*
  TOP ページ リニューアル用CSS
  担当: dropsyrup
  更新: 2026-04
  ※ このCSSはTOPページ（front-page.php）専用です
*/

/* SP カテゴリナビはPC/タブレットでは非表示 */
.top-sp-catnav { display: none; }

/* ================================================
  変数・共通
================================================ */
:root {
  --top-primary:   #1E3A5F;
  --top-accent:    #F5A623;
  --top-bg-hero:   #FAF8F2;
  --top-bg-gray:   #F7F7F7;
  --top-text:      #333333;
  --top-text-sub:  #666666;
  --top-gold:      #F5C340;
  --top-silver:    #BDBDBD;
  --top-bronze:    #E8834A;
  --top-radius:    12px;
  --top-max-width: 1240px;
  --top-shadow:       0 4px 12px rgba(0,0,0,0.1);
  --top-shadow-press: 0 1px 4px rgba(0,0,0,0.08);
}

/* セクション共通 */
.top-section-inner {
  max-width: var(--top-max-width);
  margin: 0 auto;
  padding: 0 40px;
}

.top-section-title {
  font-size: 28px !important;
  font-weight: 700 !important;
  text-align: center !important;
  color: var(--top-text) !important;
  margin: 0 0 12px !important;
  line-height: 1.4 !important;
  letter-spacing: 0.02em !important;
}

.top-section-sub {
  font-size: 15px !important;
  text-align: center !important;
  color: var(--top-text-sub) !important;
  line-height: 1.8 !important;
  margin: 0 0 48px !important;
}

/* ================================================
  ヒーロー
================================================ */
.top-hero {
  background-color: var(--top-bg-hero);
  padding: 40px 40px 32px;
}

.top-hero__inner {
  max-width: var(--top-max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.top-hero__text {
  width: 100%;
}

.top-hero__heading {
  font-family: 'Kiwi Maru', serif !important;
  font-size: 48px !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  color: var(--top-text) !important;
  margin: 0 0 24px !important;
  letter-spacing: 0.01em !important;
}

.top-hero__heading-em {
  color: var(--top-accent) !important;
}

.top-hero__img {
  width: 100%;
  max-width: 680px;
  margin: 0 auto 20px;
}

.top-hero__img img {
  max-width: 100%;
  max-height: 342px;
  height: auto;
  width: auto;
  display: block;
  margin: 0 auto;
}

.top-hero__sub {
  font-size: 16px !important;
  color: var(--top-text-sub) !important;
  line-height: 1.8 !important;
  margin: 0 !important;
}

/* ================================================
  保険の探し方を選ぶ
================================================ */
.top-find {
  padding: 80px 20px;
  background: #fff;
}

.top-find__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: var(--top-max-width);
  margin: 0 auto;
}

.top-find__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  background: #fff;
  border: 2px solid var(--top-primary);
  border-radius: var(--top-radius);
  padding: 40px 32px 36px;
  text-decoration: none;
  box-shadow: 0 5px 0 #142b47;
  transition: box-shadow 0.1s ease, transform 0.1s ease;
  gap: 20px;
  min-height: 304px;
}

.top-find__item:hover {
  box-shadow: 0 0px 0 #333;
  transform: translateY(5px);
}

.top-find__item img {
  width: auto;
  max-width: 260px;
  height: auto;
  max-height: 200px;
  object-fit: contain;
  flex: 1;
}

.top-find__label {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: var(--top-text) !important;
  text-align: center !important;
}

/* ================================================
  人気保険ランキング（CSS-onlyスライダー）
  2ページ構成：各ページに3保険種を横並び表示
================================================ */
.top-ranking {
  background: var(--top-bg-hero);
  padding: 80px 20px;
}

.top-ranking__radio {
  display: none;
}

.top-ranking__note {
  text-align: center;
  font-size: 13px;
  color: var(--top-text-sub);
  margin: -32px 0 48px;
}

/* ---- スライダー本体 ---- */
.top-ranking__slider {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: var(--top-max-width);
  margin: 0 auto;
}

/* ---- 矢印ボタン ---- */
.top-ranking__nav {
  flex-shrink: 0;
  width: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.top-ranking__nav-btn {
  display: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #E0E0E0;
  box-shadow: var(--top-shadow);
  font-size: 32px;
  line-height: 1;
  color: var(--top-text) !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  user-select: none;
}

.top-ranking__nav-btn:hover {
  background: var(--top-primary);
  border-color: var(--top-primary);
  color: #fff !important;
  box-shadow: none;
}

/* ページ1のとき：右矢印のみ表示 */
.top-ranking:has(#rpage-1:checked) .top-ranking__nav-btn--from-1 { display: flex; }
/* ページ2のとき：左矢印のみ表示 */
.top-ranking:has(#rpage-2:checked) .top-ranking__nav-btn--from-2 { display: flex; }

/* ---- パネル ---- */
.top-ranking__panels {
  flex: 1;
  min-width: 0;
}

.top-ranking__panel {
  display: none;
}

.top-ranking:has(#rpage-1:checked) .top-ranking__panel--1 { display: block; }
.top-ranking:has(#rpage-2:checked) .top-ranking__panel--2 { display: block; }

/* ---- 3カラムグリッド ---- */
.top-ranking__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.top-ranking__col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

/* items ラッパー（PCは flex column、SPは横スクロール） */
.top-ranking__items {
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}

.top-ranking__col-title {
  font-size: 18px !important;
  font-weight: 700 !important;
  text-align: center !important;
  color: var(--top-text) !important;
  padding-bottom: 14px !important;
  border-bottom: 2px solid var(--top-primary) !important;
  margin: 0 !important;
}

.top-ranking__col-title a {
  color: var(--top-text) !important;
  text-decoration: none !important;
}

.top-ranking__col-title a:hover {
  color: var(--top-primary) !important;
}

/* ---- ランキングカード ---- */
.top-ranking__item {
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: var(--top-radius);
  padding: 14px 16px;
  display: grid;
  grid-template-rows: 64px 88px auto;
  gap: 10px;
  min-height: 0;
  height: 100%;
  box-shadow: var(--top-shadow);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.top-ranking__item:hover {
  box-shadow: var(--top-shadow-press);
  transform: translateY(4px);
}

/* ---- ランキング内CTAカード（ランキングデータがない枠に使用） ---- */
.top-ranking__item--cta {
  display: flex;
  flex-direction: column;
  background: linear-gradient(145deg, #fefef9 0%, #fdf8e8 100%);
  border-color: #e8cf80;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.top-ranking__item--cta:hover {
  box-shadow: var(--top-shadow);
  transform: none;
}

.top-ranking__item--cta-sub {
  background: linear-gradient(145deg, #f7f9fc 0%, #eef4fb 100%);
  border-color: #c8d8eb;
}

.top-ranking__cta-icon {
  width: 44px;
  height: 44px;
  background: var(--top-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.top-ranking__cta-text {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: var(--top-text) !important;
  line-height: 1.7 !important;
  margin: 0 !important;
}

.top-ranking__cta-btn {
  display: inline-block;
  background: #fff;
  border: 2px solid #c8a840;
  border-radius: 8px;
  box-shadow: 0 4px 0 #c8a840;
  color: var(--top-primary) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  padding: 9px 16px;
  text-decoration: none !important;
  transition: box-shadow 0.1s ease, transform 0.1s ease;
  white-space: nowrap;
}

.top-ranking__cta-btn:hover {
  box-shadow: 0 0px 0 #c8a840;
  transform: translateY(4px);
  color: var(--top-primary) !important;
}

.top-ranking__cta-btn--secondary {
  background: #fff;
  color: var(--top-primary) !important;
  border-color: #aec3da;
  box-shadow: 0 4px 0 #aec3da;
}

.top-ranking__cta-btn--secondary:hover {
  color: var(--top-primary) !important;
  box-shadow: 0 0px 0 #aec3da;
}

.top-ranking__meta {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  height: 64px;
  min-height: 64px;
}

.top-ranking__crown {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  font-size: 28px;
  line-height: 1;
}

.top-ranking__crown::before {
  content: "♛";
}

.top-ranking__crown--gold   { color: var(--top-gold);   }
.top-ranking__crown--silver { color: var(--top-silver); }
.top-ranking__crown--bronze { color: var(--top-bronze); }

.top-ranking__info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.top-ranking__company {
  font-size: 12px !important;
  color: var(--top-text-sub) !important;
  margin: 0 !important;
  line-height: 1.35 !important;
}

.top-ranking__product {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: var(--top-text) !important;
  margin: 0 !important;
  line-height: 1.45 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.top-ranking__logo {
  text-align: center;
  height: 88px;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
}

.top-ranking__logo img {
  width: auto;
  max-width: 100%;
  max-height: 80px;
  object-fit: contain;
}


.top-ranking__link {
  font-size: 13px !important;
  color: var(--top-primary) !important;
  text-align: right !important;
  text-decoration: none !important;
  display: block !important;
  margin-top: auto;
}

.top-ranking__link:hover {
  text-decoration: underline !important;
}

.top-ranking__more {
  display: block;
  text-align: center;
  font-size: 14px;
  color: var(--top-text-sub);
  text-decoration: underline;
  margin-top: auto;
  transition: color 0.2s;
}

.top-ranking__more:hover {
  color: var(--top-primary);
}

/* ---- ドットインジケーター ---- */
.top-ranking__dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}

.top-ranking__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #D0D0D0;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.top-ranking__dot:hover {
  background: var(--top-primary);
}

/* アクティブなドット */
.top-ranking:has(#rpage-1:checked) label[for="rpage-1"].top-ranking__dot,
.top-ranking:has(#rpage-2:checked) label[for="rpage-2"].top-ranking__dot {
  background: var(--top-primary);
  transform: scale(1.3);
}

/* ================================================
  保険の種類から探す
================================================ */
.top-insurance-types {
  background: #fff;
  padding: 80px 20px;
}

.top-insurance-types__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 16px;
}

.top-insurance-types__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 2px solid var(--top-primary);
  border-radius: var(--top-radius);
  padding: 24px 8px 20px;
  text-decoration: none;
  box-shadow: 0 4px 0 #142b47;
  transition: box-shadow 0.1s ease, transform 0.1s ease;
}

.top-insurance-types__item:hover {
  box-shadow: 0 0px 0 #333;
  transform: translateY(4px);
}

.top-insurance-types__item img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.top-insurance-types__item span {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: var(--top-text) !important;
  text-align: center !important;
  line-height: 1.4 !important;
}

/* ================================================
  新着コラム
================================================ */
.top-column {
  background: var(--top-bg-gray);
  padding: 80px 20px;
}

.top-column__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 32px;
}

.top-column__item {
  display: flex;
}

.top-column__item a {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-decoration: none;
  color: var(--top-text);
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: var(--top-radius);
  overflow: hidden;
  box-shadow: var(--top-shadow);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.top-column__item a:hover {
  box-shadow: var(--top-shadow-press);
  transform: translateY(4px);
}

.top-column__thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.top-column__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-column__body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.top-column__date {
  font-size: 13px !important;
  color: var(--top-text-sub) !important;
  display: block !important;
  margin-bottom: 10px !important;
}

.top-column__title {
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.6 !important;
  margin: 0 0 10px !important;
}

.top-column__excerpt {
  font-size: 13px !important;
  color: var(--top-text-sub) !important;
  line-height: 1.7 !important;
  margin: 0 !important;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* もっと見るリンク共通 */
.top-more-link {
  text-align: right;
}

.top-more-link__text {
  font-size: 14px !important;
  color: var(--top-text-sub) !important;
  text-decoration: underline !important;
  transition: color 0.2s;
}

.top-more-link__text:hover {
  color: var(--top-primary) !important;
}

/* ================================================
  保険の基礎知識
================================================ */
.top-knowledge {
  background: #fff;
  padding: 80px 20px;
}

/* カテゴリブロック */
.top-knowledge__category {
  margin-top: 40px;
}

.top-knowledge__cat-title {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--top-primary) !important;
  margin: 0 0 16px !important;
  padding: 0 0 10px !important;
  border-bottom: 2px solid var(--top-primary) !important;
}

.top-knowledge__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.top-knowledge__cat-link {
  margin-top: 14px;
  text-align: right;
}

.top-knowledge__cat-link a {
  font-size: 13px !important;
  color: var(--top-primary) !important;
  text-decoration: underline !important;
}

.top-knowledge__item {
  display: flex;
}

.top-knowledge__item a {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-decoration: none;
  color: var(--top-text);
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: var(--top-radius);
  overflow: hidden;
  box-shadow: var(--top-shadow);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.top-knowledge__item a:hover {
  box-shadow: var(--top-shadow-press);
  transform: translateY(4px);
}

.top-knowledge__thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.top-knowledge__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-knowledge__title {
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.6 !important;
  margin: 0 !important;
  padding: 14px !important;
}

/* ================================================
  エコスマほけんが選ばれる理由
================================================ */
.top-reasons {
  display: none;
}

.top-reasons__list {
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: var(--top-radius);
  padding: 8px 0;
  max-width: 860px;
  margin: 0 auto;
  box-shadow: var(--top-shadow);
}

.top-reasons__item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px 32px;
  border-bottom: 1px solid #F0F0F0;
  transition: background 0.2s;
}

.top-reasons__item:last-child {
  border-bottom: none;
}

.top-reasons__item:hover {
  background: #FAFAFA;
}

.top-reasons__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background-color: var(--top-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.top-reasons__icon::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 11px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 13px 0 0 #fff;
}

.top-reasons__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 9px;
  width: 16px;
  height: 8px;
  transform: translateX(-50%);
  border-bottom: 3px solid #fff;
  border-radius: 0 0 16px 16px;
}

.top-reasons__body {
  flex: 1;
}

.top-reasons__text {
  font-size: 15px !important;
  line-height: 1.8 !important;
  color: var(--top-text) !important;
  margin: 0 0 8px !important;
}

.top-reasons__attr {
  font-size: 13px !important;
  color: var(--top-text-sub) !important;
  text-align: right !important;
  margin: 0 !important;
}

/* ================================================
  マーキー：一覧リンク
================================================ */
.top-marquee__list-link {
  text-align: center;
  margin-top: 20px;
  padding-bottom: 4px;
}

.top-marquee__list-link a {
  font-size: 14px !important;
  color: var(--top-text-sub) !important;
  text-decoration: underline !important;
  transition: color 0.2s;
}

.top-marquee__list-link a:hover {
  color: var(--top-primary) !important;
}

/* ================================================
  CTA（相談・資料請求）
================================================ */
.top-cta {
  display: none;/* 一旦非表示 */
  background: var(--top-bg-gray);
  padding: 80px 20px;
}

.top-cta__heading {
  font-size: 22px !important;
  font-weight: 700 !important;
  text-align: center !important;
  line-height: 1.8 !important;
  color: var(--top-text) !important;
  margin: 0 0 48px !important;
}

.top-cta__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: var(--top-max-width);
  margin: 0 auto;
}

.top-cta__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  background: #fff;
  border: 2px solid var(--top-primary);
  border-radius: var(--top-radius);
  padding: 40px 32px 36px;
  text-decoration: none;
  box-shadow: 0 5px 0 #142b47;
  transition: box-shadow 0.1s ease, transform 0.1s ease;
  gap: 20px;
  min-height: 304px;
}

.top-cta__item:hover {
  box-shadow: 0 0px 0 #333;
  transform: translateY(5px);
}

.top-cta__item img {
  width: 180px;
  height: 180px;
  object-fit: contain;
}

.top-cta__label {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: var(--top-text) !important;
  text-align: center !important;
}

/* ================================================
  取り扱い保険会社（マーキー）
================================================ */
.top-marquee {
  background: #fff;
  padding: 80px 0;
}

.top-marquee .top-section-inner {
  padding: 0 40px 0;
}

.top-marquee .top-section-sub {
  margin: 0 0 40px !important;
}

.top-marquee__wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.top-marquee__row {
  overflow: hidden;
}

.top-marquee__track {
  display: flex;
  width: max-content;
}

.top-marquee__track--left {
  animation: marquee-left 40s linear infinite;
}

.top-marquee__track--right {
  animation: marquee-right 40s linear infinite;
}

/* ホバーで一時停止 */
.top-marquee__row:hover .top-marquee__track {
  animation-play-state: paused;
}

.top-marquee__set {
  display: flex;
  align-items: center;
  gap: 56px;
  padding: 12px 28px;
}

.top-marquee__set img {
  width: 160px;
  height: 56px;
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
  filter: grayscale(30%);
  opacity: 0.8;
  transition: filter 0.25s ease, opacity 0.25s ease;
}

.top-marquee__set img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

@keyframes marquee-left {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes marquee-right {
  0%   { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* ================================================
  取り扱い保険会社一覧
================================================ */
.top-companies {
  background: var(--top-bg-gray);
  padding: 80px 20px;
}

.top-companies__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.top-companies__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 8px 14px;
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: var(--top-radius);
  box-shadow: var(--top-shadow);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

/* ロゴなし会社：テキストを上下左右センター */
.top-companies__item--no-logo {
  justify-content: center;
}

.top-companies__item--no-logo span {
  font-size: 12px !important;
  color: var(--top-text-sub) !important;
}

/* リンクあり会社：沈む動き＋ネイビーテキスト */
a.top-companies__item--link {
  text-decoration: none !important;
  cursor: pointer;
  box-shadow: 0 4px 0 #c8d0da;
}

a.top-companies__item--link span {
  color: var(--top-primary) !important;
}

a.top-companies__item--link:hover {
  box-shadow: 0 0px 0 #c8d0da !important;
  transform: translateY(4px);
}

.top-companies__item img {
  width: 100%;
  max-width: 110px;
  height: 44px;
  object-fit: contain;
  object-position: center;
}

.top-companies__item span {
  font-size: 11px !important;
  color: var(--top-text-sub) !important;
  text-align: center !important;
  line-height: 1.4 !important;
}

/* ================================================
  レスポンシブ ― タブレット（〜1024px）
================================================ */
@media (max-width: 1024px) {

  /* 共通 */
  .top-section-inner { padding: 0 24px; }

  /* ヒーロー */
  .top-hero { padding: 64px 24px 48px; }
  .top-hero__heading { font-size: 40px !important; }

  /* 保険の探し方 */
  .top-find { padding: 64px 24px; }
  .top-find__item { padding: 32px 24px 28px; gap: 16px; min-height: 240px; }
  .top-find__item img { max-width: 200px; max-height: 160px; width: auto; height: auto; }
  .top-find__label { font-size: 16px !important; }

  /* ランキング */
  .top-ranking { padding: 64px 24px; }
  .top-ranking__cols { gap: 20px; }

  /* 保険の種類 */
  .top-insurance-types { padding: 64px 24px; }
  .top-insurance-types__grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
  }

  /* コラム */
  .top-column { padding: 64px 24px; }
  .top-column__grid { grid-template-columns: repeat(2, 1fr); }

  /* 基礎知識 */
  .top-knowledge { padding: 64px 24px; }
  .top-knowledge__grid { grid-template-columns: repeat(2, 1fr); }

  /* 選ばれる理由 */
  .top-reasons { padding: 64px 24px; }

  /* CTA */
  .top-cta { padding: 64px 24px; }
  .top-cta__item { padding: 32px 24px 28px; gap: 16px; min-height: 240px; }
  .top-cta__item img { width: 140px; height: 140px; }
  .top-cta__label { font-size: 16px !important; }

  /* マーキー */
  .top-marquee { padding: 64px 0; }
  .top-marquee .top-section-inner { padding: 0 24px 0; }

  /* 保険会社一覧 */
  .top-companies { padding: 64px 24px; }
  .top-companies__grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
}

/* ================================================
  レスポンシブ ― スマートフォン（〜767px）
================================================ */
@media (max-width: 767px) {

  /* ---- ヘッダー SP調整（TOPページのみ） ---- */

  /* ヘッダーを常時固定表示（スクロールで消えないように） */
  .l-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
    padding: 0 !important;
    min-height: 60px !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
  }

  /* cloneヘッダーはSPでは不要なので非表示 */
  .l-header-clone {
    display: none !important;
  }

  /* ヘッダー内コンテナも縦中央に */
  .l-header .l-inner,
  .l-header__inner,
  .l-header > div {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
  }

  /* ヘッダー下の白い隙間を完全に除去 */
  .l-headerBottom {
    display: none !important;
  }

  /* ---- SP カテゴリナビ（TOPページのみ・ヘッダー直下に固定） ---- */
  .top-sp-catnav {
    display: flex !important;
    position: fixed !important;
    top: 60px !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9998 !important;
    background: #fff !important;
    border-bottom: 1px solid #E8E8E8 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06) !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    flex-wrap: nowrap !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .top-sp-catnav::-webkit-scrollbar {
    display: none !important;
  }

  .top-sp-catnav a {
    flex-shrink: 0 !important;
    display: block !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: var(--top-text) !important;
    white-space: nowrap !important;
    padding: 9px 14px !important;
    border-right: 1px solid #F0F0F0 !important;
    text-decoration: none !important;
  }

  /* ---- 共通 ---- */
  /* section-inner が横余白を担当するので、各セクション外側の横paddingは0に */
  .top-section-inner { padding: 0 16px; }

  .top-find,
  .top-insurance-types,
  .top-column,
  .top-knowledge,
  .top-reasons,
  .top-cta,
  .top-companies {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* ランキングは内部で独自のpadding管理 */
  .top-ranking {
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow: hidden;
  }

  /* ヒーローは section-inner を使わないので直接指定 */
  .top-hero {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .top-section-title {
    font-size: 22px !important;
    margin: 0 0 10px !important;
  }

  .top-section-sub {
    font-size: 14px !important;
    line-height: 1.7 !important;
    margin: 0 0 32px !important;
  }

  /* ---- ヒーロー ---- */
  /* 固定ヘッダー60px＋カテゴリナビ37px＝97px分をmargin-topで確保 */
  .top-hero { padding: 6px 16px 20px; margin-top: 90px; }

  .top-hero__heading {
    font-size: 28px !important;
    line-height: 1.55 !important;
    margin: 0 0 20px !important;
  }

  .top-hero__img {
    max-width: 260px;
    margin: 0 auto 24px;
  }

  .top-hero__sub { font-size: 13px !important; }

  /* ---- 保険の探し方 ---- */
  .top-find { padding: 48px 16px; }

  .top-find__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .top-find__item {
    justify-content: flex-start;
    padding: 20px 14px 16px;
    gap: 12px;
    min-height: auto;
  }

  .top-find__item img {
    width: auto;
    max-width: 90px;
    height: auto;
    max-height: 70px;
  }

  .top-find__label {
    font-size: 13px !important;
    line-height: 1.45 !important;
  }

  /* ---- ランキング ---- */
  .top-ranking {
    padding: 48px 16px;
    overflow: hidden;
  }

  /* スライダーを縦積みに変更、サイド矢印を非表示 */
  .top-ranking__slider { flex-direction: column; gap: 0; }
  .top-ranking__nav    { display: none; }

  /* 3カラム → 1カラムに変更（各カラムが1行に） */
  .top-ranking__cols {
    grid-template-columns: 1fr;
    gap: 24px;
    min-width: 0;
  }

  /* 各カラムを1ブロックとしてまとめる */
  .top-ranking__col {
    background: #fff;
    border-radius: var(--top-radius);
    box-shadow: var(--top-shadow);
    padding: 16px 0 16px;
    gap: 0;
    min-width: 0;
    overflow: hidden;
  }

  .top-ranking__col-title {
    font-size: 16px !important;
    padding: 0 16px 12px !important;
    text-align: left !important;
    margin-bottom: 12px !important;
  }

  /* items ラッパー：3列グリッド（1〜3位を同時表示） */
  .top-ranking__items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto;
    gap: 8px;
    padding: 0 12px 8px;
    overflow: visible;
  }

  /* 各カード（PCのgrid-template-rows/heightをリセット） */
  .top-ranking__item {
    display: flex;
    flex-direction: column;
    grid-template-rows: unset;
    height: auto;
    width: auto;
    min-width: 0;
    flex-shrink: unset;
    scroll-snap-align: none;
    padding: 10px 8px;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  }

  .top-ranking__crown    { font-size: 16px; width: 22px; height: 22px; }
  .top-ranking__meta     { height: auto; min-height: 0; gap: 4px; }
  .top-ranking__company  { font-size: 9px !important; }
  .top-ranking__product  { font-size: 11px !important; line-height: 1.4 !important; }
  .top-ranking__logo     { height: 44px; min-height: 44px; padding: 0; }
  .top-ranking__logo img { max-height: 44px; max-width: 90px; }
  .top-ranking__link     { font-size: 10px !important; }
  /* もっと見るリンク */
  .top-ranking__more {
    padding: 10px 16px 0;
    text-align: right;
    margin-top: 12px;
    padding-right: 16px;
  }

  /* ドットを大きくしてタップしやすく */
  .top-ranking__dots  { gap: 14px; margin-top: 24px; }
  .top-ranking__dot   { width: 12px; height: 12px; }

  /* CTAカード（3列グリッド内に収まるよう縮小） */
  .top-ranking__item--cta {
    padding: 10px 6px;
    gap: 6px;
  }
  .top-ranking__cta-text {
    font-size: 11px !important;
  }
  .top-ranking__cta-btn {
    font-size: 10px !important;
    padding: 6px 8px;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
    box-shadow: 0 3px 0 #c8a840;
  }
  .top-ranking__cta-btn:hover {
    box-shadow: 0 0px 0 #c8a840;
  }

  /* ---- 保険の種類 ---- */
  .top-insurance-types { padding: 48px 16px; }

  .top-insurance-types__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .top-insurance-types__item {
    min-width: 0;
    padding: 14px 6px 12px;
    gap: 8px;
    box-shadow: 0 3px 0 #142b47;
  }

  .top-insurance-types__item img {
    width: 40px;
    height: 40px;
  }

  .top-insurance-types__item span {
    font-size: 11px !important;
    line-height: 1.3 !important;
    word-break: keep-all;
  }

  /* ---- 新着コラム ---- */
  .top-column { padding: 48px 16px; }

  .top-column__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .top-column__thumb { aspect-ratio: 4 / 3; }

  .top-column__body { padding: 12px; }

  .top-column__date {
    font-size: 11px !important;
    margin-bottom: 8px !important;
  }

  .top-column__title {
    font-size: 13px !important;
    line-height: 1.55 !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .top-column__excerpt { display: none; } /* スマホでは抜粋非表示 */

  /* ---- 保険の基礎知識 ---- */
  .top-knowledge { padding: 48px 16px; }

  .top-knowledge__category { margin-top: 28px; }

  .top-knowledge__cat-title { font-size: 14px !important; margin-bottom: 12px !important; }

  .top-knowledge__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .top-knowledge__cat-link { margin-top: 10px; }
  .top-knowledge__cat-link a { font-size: 12px !important; }

  .top-knowledge__title { font-size: 12px !important; padding: 10px !important; }

  /* ---- 選ばれる理由 ---- */
  .top-reasons { padding: 48px 16px; }

  .top-reasons__list { border-radius: 8px; }

  .top-reasons__item {
    padding: 16px 16px;
    gap: 12px;
  }

  .top-reasons__icon {
    width: 32px;
    height: 32px;
    font-size: 16px;
    flex-shrink: 0;
  }

  .top-reasons__text { font-size: 13px !important; }
  .top-reasons__attr { font-size: 12px !important; }

  /* ---- CTA ---- */
  .top-cta { padding: 48px 16px; }

  .top-cta__heading {
    font-size: 18px !important;
    margin: 0 0 28px !important;
  }

  .top-cta__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .top-cta__item {
    justify-content: flex-start;
    padding: 20px 14px 16px;
    gap: 12px;
    min-height: auto;
    box-shadow: 0 4px 0 #142b47;
  }

  .top-cta__item:hover {
    box-shadow: 0 0px 0 #333;
    transform: translateY(4px);
  }

  .top-cta__item img {
    width: 64px;
    height: 64px;
  }

  .top-cta__label {
    font-size: 13px !important;
    line-height: 1.45 !important;
  }

  /* ---- 保険会社一覧 ---- */
  .top-companies { padding: 48px 16px; }
  .top-companies__grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .top-companies__item { padding: 12px 6px 10px; gap: 8px; min-height: 90px; }
  .top-companies__item img { height: 36px; }
  .top-companies__item span { font-size: 10px !important; }

  /* ---- マーキー ---- */
  .top-marquee { padding: 48px 0; }

  .top-marquee .top-section-inner { padding: 0 16px 0; }

  .top-marquee__wrapper { gap: 12px; }

  .top-marquee__set {
    gap: 28px;
    padding: 8px 14px;
  }

  .top-marquee__set img {
    width: 100px;
    height: 36px;
  }
}

@media (max-width: 520px) {
  .top-column__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .top-insurance-types__item span {
    font-size: 10px !important;
  }
}
