/* ヨリピタ トップページ（Yoripita Top Page）。body.ypt-front の中だけに効く。 */
body.ypt-front {
  --ypt-green: #0d5541;
  --ypt-green-dark: #0a4636;
  --ypt-text: #26332e;
  --ypt-sub: #5f6b66;
  --ypt-line: #e1e7e4;
  --ypt-pale: #eef5f1;
  --ypt-gray: #f6f8f7;
  margin: 0;
  background: #fff;
  color: var(--ypt-text);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
body.ypt-front *,
body.ypt-front *::before,
body.ypt-front *::after { box-sizing: border-box; }
body.ypt-front a { color: inherit; text-decoration: none; }
body.ypt-front ul { list-style: none; margin: 0; padding: 0; }
body.ypt-front h1, body.ypt-front h2, body.ypt-front p { margin: 0; }
body.ypt-front svg { display: block; }
.ypt-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ypt-skip { position: absolute; left: -9999px; top: 0; }
.ypt-skip:focus { left: 8px; top: 8px; z-index: 1000; background: #fff; padding: 8px 12px; border: 2px solid var(--ypt-green); }
.ypt-wrap { width: 100%; max-width: 1180px; margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; }
body.ypt-front :focus-visible { outline: 3px solid #7fb8a1; outline-offset: 2px; }

/* ---------- ヘッダー・メニュー：1.5.0 から header.css（ホームと記事で共通）。ここにはフッターのロゴの基本だけを残す ---------- */
.ypt-logo { display: inline-flex; align-items: center; flex: 0 0 auto; }
.ypt-logo__img { display: block; height: 40px; width: auto; max-width: none; aspect-ratio: 2172 / 724; }
.ypt-logo__text { font-size: 26px; font-weight: 700; color: var(--ypt-green); letter-spacing: .04em; }

/* ---------- 見出し ---------- */
.ypt-main { padding-top: 28px; }
.ypt-heading { display: flex; align-items: center; gap: 16px; font-size: 24px; font-weight: 700; color: var(--ypt-text); margin-bottom: 18px; letter-spacing: .02em; }
.ypt-heading::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--ypt-line); }
.ypt-heading--light { color: #fff; }
.ypt-heading--light::after { background: rgba(255, 255, 255, .35); }

/* ---------- 画像とカテゴリーラベル（画像は切り取らず全体を表示） ---------- */
.ypt-card__media, .ypt-feature__media { position: relative; display: block; background: var(--ypt-gray); }
body.ypt-front img.ypt-img { display: block; width: 100%; height: auto; max-width: 100%; object-fit: contain; }
.ypt-noimage { display: block; aspect-ratio: 16 / 9; background: var(--ypt-gray); }
.ypt-label { position: absolute; top: 0; left: 0; z-index: 2; max-width: 100%; padding: 4px 10px; background: rgba(13, 85, 65, .65); /* サイトの緑 #0d5541 の背景だけ不透明度65％（文字は不透明） */ color: #fff; font-size: 12px; font-weight: 700; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 注目記事 ---------- */
.ypt-feature { margin-bottom: 40px; }
.ypt-feature__viewport { position: relative; }
.ypt-feature__track { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.ypt-feature__track::-webkit-scrollbar { display: none; }
.ypt-feature__item { flex: 0 0 calc((100% - 40px) / 3); min-width: 0; scroll-snap-align: start; }
.ypt-feature__link, .ypt-feature__link img { -webkit-user-drag: none; user-select: none; }
.ypt-feature__arrow { position: absolute; top: 50%; z-index: 3; width: 44px; height: 44px; margin-top: -22px; border: 1px solid var(--ypt-line); border-radius: 50%; background: #fff; color: var(--ypt-green); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.ypt-feature__arrow[hidden] { display: none; }
.ypt-feature__arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ypt-feature__arrow--prev { left: -18px; }
.ypt-feature__arrow--next { right: -18px; }
.ypt-feature__arrow:disabled { opacity: .35; cursor: default; }
.ypt-feature__arrow:not(:disabled):hover { background: var(--ypt-pale); }
.ypt-feature__link { display: block; }
/* 注目記事のタイトル（1.3.7。2026-11-06ユーザー指示）：画像の内側の下端に、左右と下端に隙間なく接する背景を置き、その中にタイトルを置く。
   背景は下端からフェードが始まり、上へ行くほど薄くなって、背景の上端で透明になるグラデーション（2026-11-06ユーザー指示）。明るい画像でも1行目が読めるよう、中ほどまでは濃さを残し（.88→.8→.66→.32→0）、文字にはやわらかい影を付ける。
   高さは文字量に合わせる（1行なら低く、2行ならその分だけ高く）。画像の広い範囲は暗くしない。
   タイトルは最大2行で、収まらなければ末尾を「…」。文字は縮めない（行の間隔だけ 1.5 → 1.45）。全文は要素の中に残るので、リンクの読み上げは全文。
   下の余白は padding ではなく透明な border で取る（overflow は padding の端で切るので、padding だと次の行の上半分が下の余白にのぞく。背景は background-origin: border-box で border の下まで同じグラデーションを塗る。既定の padding-box だと border の部分でグラデーションが繰り返され、下端に明るい線が出る）。
   変更前（1.3.6）は 3行・padding 48px 16px 14px・広いグラデーション */
.ypt-feature__title { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; margin: 0; padding: 12px 16px 0; border-bottom: 6px solid transparent; color: #fff; font-size: 18px; font-weight: 700; line-height: 1.45; background: linear-gradient(to top, rgba(8, 20, 15, .88) 0%, rgba(8, 20, 15, .8) 30%, rgba(8, 20, 15, .66) 60%, rgba(8, 20, 15, .32) 85%, rgba(8, 20, 15, 0) 100%); background-origin: border-box; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 0 6px rgba(0, 0, 0, .45); }
.ypt-feature__link:hover .ypt-feature__title { text-decoration: underline; }
.ypt-feature__track.is-animating { scroll-snap-type: none; }
.ypt-feature__controls { position: relative; display: flex; justify-content: center; align-items: center; min-height: 32px; margin-top: 8px; }
.ypt-feature__play { position: absolute; right: 0; top: 50%; width: 32px; height: 32px; margin-top: -16px; padding: 0; border: 1px solid var(--ypt-line); border-radius: 50%; background: #fff; color: var(--ypt-green); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ypt-feature__play[hidden] { display: none; }
.ypt-feature__play svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ypt-feature__play .ypt-feature__icon-play { fill: currentColor; stroke-width: 1.5; }
.ypt-feature__play .ypt-feature__icon-play, .ypt-feature__play.is-paused .ypt-feature__icon-pause { display: none; }
.ypt-feature__play.is-paused .ypt-feature__icon-play { display: block; }
.ypt-feature__play:hover { background: var(--ypt-pale); }
.ypt-dots { display: none; justify-content: center; gap: 4px; }
.ypt-dots button { width: 28px; height: 28px; border: 0; background: transparent; padding: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ypt-dots button::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #c9d3ce; }
.ypt-dots button[aria-current="true"]::before { background: var(--ypt-green); }

/* ---------- 新着記事 ---------- */
.ypt-new { margin-bottom: 44px; scroll-margin-top: 12px; }
.ypt-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 20px; }
.ypt-card__link { display: block; }
.ypt-card__title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: 10px; font-size: 15px; font-weight: 700; line-height: 1.55; color: var(--ypt-text); }
.ypt-card__link:hover .ypt-card__title { color: var(--ypt-green); text-decoration: underline; }
.ypt-new__list--sp { display: none; }
.ypt-empty { padding: 24px 0; color: var(--ypt-sub); }
.ypt-empty a { color: var(--ypt-green); text-decoration: underline; }

/* ページ切り替え */
.ypt-pager { margin-top: 32px; }
.ypt-pager ul { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.ypt-pager__num, .ypt-pager__step { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px; border: 1px solid #cfd8d4; border-radius: 4px; background: #fff; color: var(--ypt-text); font-weight: 700; font-size: 15px; }
.ypt-pager a:hover { border-color: var(--ypt-green); color: var(--ypt-green); }
.ypt-pager__num.is-current { background: var(--ypt-green); border-color: var(--ypt-green); color: #fff; }
.ypt-pager__gap { display: inline-flex; min-width: 20px; justify-content: center; color: var(--ypt-sub); }

/* ---------- 人気記事 ---------- */
.ypt-popular { background: var(--ypt-green); padding: 36px 0 40px; margin-bottom: 40px; }
.ypt-popular__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 24px; }
.ypt-card--popular .ypt-card__title { color: #fff; font-size: 16px; }
.ypt-card--popular .ypt-card__link:hover .ypt-card__title { color: #fff; }
.ypt-card--popular .ypt-card__media { background: rgba(255, 255, 255, .08); }

/* ---------- カテゴリーから探す ---------- */
/* 1.6.0（2026-11-19）：注目記事の直後へ移し、淡い緑の均一な背景・角丸の横長ボタンに。アイコンが左・名前が右（左揃え）、上下中央。
   枠・影・グラデーションなし。名前は最大2行（行は ypt_cat_label_html() が決め、1行ずつ折り返さない）。全行を同じ高さにそろえる（grid-auto-rows: 1fr）。
   PC・タブレット（幅600px以上）は3列、スマホは2列（9個目は左に同じ幅）。 */
.ypt-cats { margin-bottom: 44px; }
.ypt-cats__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 12px; }
.ypt-cats__grid li { display: flex; }
.ypt-cats__btn { display: flex; flex: 1 1 auto; align-items: center; justify-content: flex-start; gap: 14px; min-height: 76px; padding: 14px 18px; border: 0; border-radius: 12px; background: #e9f3ee; color: var(--ypt-text); font-size: 16px; font-weight: 700; line-height: 1.4; text-align: left; }
.ypt-cats__btn:hover { background: #dcece4; color: var(--ypt-green); }
.ypt-cats__btn:focus-visible { outline: 3px solid #7fb8a1; outline-offset: 2px; }
.ypt-cats__btn .ypt-icon { width: 34px; height: 34px; color: var(--ypt-green); flex: 0 0 auto; }
.ypt-cats__name { display: block; min-width: 0; }
.ypt-cats__line { display: block; white-space: nowrap; }
/* 1.6.1：幅600px以上は、収まる幅なら1行にする（行の区切りの位置〈「・」の後〉でだけ2行目へ送る。文字は縮めない）。スマホ（599px以下）は従来どおり決めた位置で2行 */
@media (min-width: 600px) {
  .ypt-cats__line { display: inline-block; vertical-align: top; }
}

/* ---------- フッター ---------- */
.ypt-footer { background: var(--ypt-pale); border-top: 1px solid #dbe8e1; padding: 28px 0 24px; }
.ypt-footer__inner { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 28px; }
.ypt-logo--footer .ypt-logo__img { height: 32px; }
.ypt-footer__links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-left: auto; }
.ypt-footer__links a { font-size: 14px; color: var(--ypt-text); padding: 6px 0; display: inline-block; }
.ypt-footer__links a:hover { color: var(--ypt-green); text-decoration: underline; }
.ypt-footer__copy { width: 100%; font-size: 12px; color: var(--ypt-sub); }

/* ---------- タブレット ---------- */
@media (max-width: 1023px) {
  .ypt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 18px; }
  .ypt-card__title { font-size: 16px; }
}
@media (max-width: 899px) {
  .ypt-feature__track { gap: 12px; }
  .ypt-feature__item { flex: 0 0 100%; scroll-snap-stop: always; }
  .ypt-feature__arrow { display: none; }
  .ypt-dots { display: flex; }
  .ypt-feature { margin-bottom: 32px; }
}

/* ---------- スマホ（1列・25件） ---------- */
@media (max-width: 599px) {
  .ypt-wrap { padding-left: 16px; padding-right: 16px; }
  .ypt-main { padding-top: 20px; }
  .ypt-heading { font-size: 21px; margin-bottom: 14px; }
  .ypt-feature__title { font-size: 17px; padding: 10px 14px 0; border-bottom-width: 5px; }
  .ypt-new__list--pc { display: none; }
  .ypt-new__list--sp { display: block; }
  .ypt-new__list--sp .ypt-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  /* スマホの新着記事のタイトル（1.4.2）：17px・行間 1.55 → 16px・1.4（太字はそのまま） */
  .ypt-new__list--sp .ypt-card__title { font-size: 16px; line-height: 1.4; margin-top: 10px; }
  .ypt-label { font-size: 12px; padding: 4px 9px; }
  .ypt-pager ul { gap: 6px; }
  .ypt-pager__num, .ypt-pager__step { min-width: 44px; height: 44px; padding: 0 10px; }
  .ypt-popular { padding: 28px 0 30px; }
  .ypt-popular__grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .ypt-card--popular .ypt-card__link { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 12px; align-items: start; }
  .ypt-card--popular .ypt-card__title { margin-top: 0; font-size: 15px; }
  .ypt-card--popular .ypt-label { font-size: 10px; padding: 2px 6px; }
  .ypt-cats { margin-bottom: 36px; }
  .ypt-cats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ypt-cats__btn { gap: 10px; min-height: 66px; padding: 10px 12px; font-size: 15px; }
  .ypt-cats__btn .ypt-icon { width: 30px; height: 30px; }
  .ypt-footer__inner { flex-direction: column; align-items: flex-start; }
  .ypt-footer__links { margin-left: 0; }
}
@media (min-width: 600px) and (max-width: 1023px) {
  .ypt-popular__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* カテゴリー：タブレットは3列（名前が2行に収まる幅）。アイコンと余白を少し小さく */
  .ypt-cats__btn { gap: 10px; min-height: 70px; padding: 12px 14px; font-size: 15px; }
  .ypt-cats__btn .ypt-icon { width: 30px; height: 30px; }
}
/* 幅359px以下（320pxなど）：文字は縮めず、アイコン・左右の余白・アイコンと文字の間を小さくして2行に収める */
@media (max-width: 359px) {
  .ypt-cats__btn { gap: 6px; padding: 10px 8px; }
  .ypt-cats__btn .ypt-icon { width: 24px; height: 24px; }
}

