/* =====================================================
   HEADER + SLIDER (Refined)
   - Prevent horizontal scroll (clip + hidden fallback)
   - Fix flex overflow (min-width:0)
   - Make slider image fill correctly (no overflow/CLS)
===================================================== */

/* ===== Header shell ===== */
.siteHeader{
  background: var(--bg);
  border-bottom: 1px solid var(--line);

  /* 横方向はヘッダー側でも確実に切る */
  overflow-x: clip;
}
@supports not (overflow: clip){
  .siteHeader{ overflow-x: hidden; }
}

.siteHeader__top{
  height: var(--header-h);
  display: flex;
  align-items: center;
}

/* コンテンツ幅 */
.wrap{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 18px;
  width: 100%;

  /* スライダーがtransformで暴れても内側で切れる保険 */
  overflow: hidden;
}

/* 上段（ロゴ + 検索） */
.topRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;

  /* flexの押し出しを防ぐ（横スクロールの根治） */
  min-width: 0;
}

/* Logo */
.brand{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 250px;
}
.brand__logo{
  height: 68px;
  width: auto;
  display:block;
  object-fit: contain;
  margin: 10px;
}

/* Search */
.search{
  display:flex;
  align-items:center;
  gap:10px;
  flex: 1;
  justify-content: flex-end;

  /* flexの子が縮めず溢れるのを防ぐ */
  min-width: 0;
  margin-top: 15px;
}

.searchForm{
  position: relative;
  width: min(520px, 100%);

  /* これも地味に効く */
  min-width: 0;
}

.searchForm__input{
  width:100%;
  height: 40px;
  border-radius: 999px;
  border: 1px solid #a4a4a4;
  padding: 0 44px 0 14px;
  font-size: 14px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  background:#fff;

  /* iOS/Chromeでの横溢れ防止 */
  min-width: 0;
}
.searchForm__input:focus{
  border-color: #a9b7e6;
  box-shadow: 0 0 0 4px rgba(70,100,255,.10);
}

.searchForm__btn{
  position:absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 0;
  background: #111827;
  color:#fff;
  display:grid;
  place-items:center;
  cursor:pointer;
  transition: transform .12s ease, opacity .12s ease;
}
.searchForm__btn:hover{ opacity: .92; }
.searchForm__btn:active{ transform: translateY(-50%) scale(.98); }

.searchForm__icon{
  width:16px;
  height:16px;
  display:block;
  fill: currentColor;
}

/* ===== Slider ===== */
.headerSlider{
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line-strong);
  background: #fff;

  /* 無限レールのはみ出しを確実にクリップ */
  overflow-x: clip;
}
@supports not (overflow: clip){
  .headerSlider{ overflow-x: hidden; }
}

.sliderFrame{
  position: relative;
  height: var(--slider-h);
  padding: 10px 0;

  /* ここが最重要：動くレールは必ず外枠で隠す */
  overflow: hidden;

  /* transform描画のはみ出しで横スクロールが出る端末対策 */
  contain: paint;

  width: 100%;
}

/* rails */
.sliderRail{
  display:flex;
  gap: 14px;
  will-change: transform;
  transform: translate3d(0,0,0);

  /* まれなサブピクセル溢れ対策 */
  max-width: 100%;
}

.slide{
  position: relative;
  flex: 0 0 auto;
  width: 550px;
  height: calc(var(--slider-h) - 20px);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #f3f4f6;
  user-select: none;

  /* 画像が載っても安定 */
  max-width: 100%;
}

/* slide image (fill) */
.slide__img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slide__label{
  position:absolute;
  left: 10px;
  top: 10px;
  padding: 10px 40px;
  font-size: 14px;
  line-height: 1;
  border-radius: 999px;
  background: rgb(138 138 138 / 90%);
  color:#fff;
  letter-spacing: .02em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid #757575;
}

/* pause hint (optional) */
.sliderHint{
  position:absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 90px;
  pointer-events:none;
  background: linear-gradient(270deg, rgba(255,255,255,1), rgba(255,255,255,0));
}
.sliderHint--left{
  left:0;
  right:auto;
  background: linear-gradient(90deg, rgba(255,255,255,1), rgba(255,255,255,0));
}

/* ===== Global safety (only if you want it here) =====
   “どこか1pxでも溢れたら横スクロール” を根こそぎ止めたい場合は有効
*/
html, body{
  overflow-x: clip;
}
@supports not (overflow: clip){
  html, body{ overflow-x: hidden; }
}

/* ===== Responsive ===== */
@media (max-width: 700px){
  :root{ --header-h: 66px; --slider-h: 150px; }
  .wrap{padding: 0 4%;width: 92%;}
  .brand{ min-width: 120px; }
  .brand__logo{ height: 34px; }
  .searchForm__input{ height: 38px; font-size: 13px; }
  .searchForm__btn{ width: 30px; height: 30px; }
  .slide{width: 250px;border-radius: 14px;height: 240px;}
}

@media (max-width: 420px){
  .topRow{ gap: 10px; }
  .brand{ min-width: 96px; }
  .brand__logo{ height: 30px; }
  .searchForm__input{ padding-left: 12px; }
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce){
  .sliderRail{ transition: none !important; }
}

/* =====================================================
   Below Slider: tagline + "新着記事" + card grid
   - clean, minimal, Apple-ish spacing
===================================================== */

/* イントロ（スライダー直下） */
.homeIntro{
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 26px 0 18px;
}

.homeIntro__tagline{
  margin: 0;
  text-align: center;
  font-size: 12px;
  letter-spacing: .06em;
  color: #3b82f6; /* screenshotの青っぽさ */
  font-weight: 700;
}

.homeIntro__title{
  margin: 14px 0 0;
  text-align: center;
  font-size: 28px;
  letter-spacing: .02em;
  line-height: 1.2;
}

/* グリッド背景（うっすい水色） */
.homeGrid{
  padding: 22px 0 46px;
  background: linear-gradient(180deg, rgba(96,165,250,.16), rgba(96,165,250,.10) 35%, rgba(96,165,250,.08));
}

/* グリッド */
.homeGrid__grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

/* カード */
.postCard{
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* カード全体リンク */
.postCard__link{
  display: block;
  color: inherit;
  text-decoration: none;
}

/* サムネ */
.postCard__thumb{
  position: relative;
  aspect-ratio: 4 / 3; /* スクショっぽい */
  background: #f3f4f6;
  overflow: hidden;
}

.postCard__img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: translateZ(0);
}

/* NEWバッジ */
.postCard__badge{
  position: absolute;
  left: 10px;
  top: 10px;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(17,24,39,.92);
  color: #fff;
  letter-spacing: .03em;
}

/* 本文 */
.postCard__body{
  padding: 12px 12px 12px;
}

/* タグ行 */
.postCard__meta{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.postCard__chip{
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 8px;
  line-height: 1;
  border: 1px solid rgba(0,0,0,.06);
  background: #f8fafc;
  color: #111827;
  font-weight: 700;
}

/* 色は“やりすぎない”程度に */
.postCard__chip--a{ background: #ede9fe; }
.postCard__chip--b{ background: #e0f2fe; }
.postCard__chip--c{ background: #dcfce7; }
.postCard__chip--d{ background: #fee2e2; }
.postCard__chip--e{ background: #fef9c3; }

/* タイトル */
.postCard__headline{
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: .01em;

  /* 2行省略 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* フッター（作者 + like） */
.postCard__footer{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,.06);
}

.postCard__author{
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.postCard__avatar{
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(17,24,39,.18), rgba(17,24,39,.06));
  border: 1px solid rgba(0,0,0,.06);
  flex: 0 0 auto;
}

.postCard__name{
  font-size: 12px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* like */
.postCard__like{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #ef4444;
  font-weight: 800;
  flex: 0 0 auto;
}

.postCard__heart{
  font-size: 14px;
  line-height: 1;
}

.postCard__count{
  color: #ef4444;
}

/* Hover（Apple系：控えめ） */
@media (hover:hover){
  .postCard{
    transition: transform .16s ease, box-shadow .16s ease;
  }
  .postCard:hover{
    transform: translateY(-2px);
    box-shadow: 0 14px 38px rgba(0,0,0,.08);
  }
}

/* ===== Responsive ===== */
@media (max-width: 980px){
  .homeGrid__grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px){
  .homeIntro{
    padding: 20px 0 14px;
  }
  .homeIntro__title{
    font-size: 22px;
  }
  .homeGrid__grid{
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .postCard__thumb{
    aspect-ratio: 16 / 9; /* スマホは横長のほうが気持ちいい */
  }
}

/* 読了時間 */
.postCard__readtime{
  margin-top: 12px;
  padding-bottom: 10px;
  text-align: right;
  font-size: 12px;
  color: #6b7280;
  letter-spacing: .01em;
  display: block;
  overflow: hidden;
  width: 100%;
}

.postCard__readtimeNum{
  font-weight: 700;
  color: #111827;
  margin: 0 2px;
}

.loadMore{
  margin-top: 18px;
  display: grid;
  gap: 10px;
  justify-items: center;
}

.loadMore__btn{
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.10);
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}

.loadMore__btn:disabled{
  opacity: .55;
  cursor: not-allowed;
}

.loadMore__status{
  font-size: 12px;
  color: #6b7280;
}

.loadMore__sentinel{
  width: 1px;
  height: 1px;
}

/* ===== Slide body (title area) ===== */
.slide{
  position: relative;
}

/* 下部グラデーション＋余白 */
.slide__body{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  padding: 16px 18px 18px;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,.35) 45%,
    rgba(0,0,0,.55) 100%
  );
}

/* タイトル */
.slide__title{
  margin: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: .02em;

  /* 2行で止める */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;

  text-shadow: 0 2px 8px rgba(0,0,0,.45);
}

/* ===== Brand block (logo + description) ===== */

.brand{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.brand__link{
  display: inline-block;
}

.brand__logo{
  display: block;
}

/* description text */
.brand__desc{
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  max-width: none;
  font-size: 10px;
  margin-bottom: 10px;
}

@media (max-width: 700px){
  .brand__desc{
    font-size: 10px;
    max-width: 180px;
  }
}

.siteFooter{
  padding: 28px 0 34px;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,.08);
}

.siteFooter__copyright{
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: #6b7280;
  letter-spacing: .02em;
}



/* スマホ調整 */
@media (max-width: 700px){
  .slide__body{
    padding: 12px 14px 14px;
  }
  .slide__title{
    font-size: 14px;
  }
	
	.sliderFrame{
		height: 240px;
	}
	
	.homeIntro__tagline{
		font-size: 1.1em;
	}

.siteFooter{
  padding: 28px 0 34px;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,.08);
}

.siteFooter__copyright{
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: #6b7280;
  letter-spacing: .02em;
}
	
	
}

