/* petee 静的サイト。WordPress(TCD BE)時代の見た目を引き継ぐ:オレンジのメニュー帯・白基調・カード一覧 */
:root {
  --accent: #e55a34;
  --accent-dark: #c9461f;
  --text: #323232;
  --muted: #7d7d7d;
  --bg: #fffefa;
  --card: #fff;
  --line: #e8e4dc;
  --tint: #fbf3ee;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  font-size: 16px; line-height: 1.9;
  line-break: strict; overflow-wrap: break-word;
}
pb-t { word-break: keep-all; }
/* 強調・リンクの境目(文節タグの外)でも勝手に改行しないよう、本文やタイトルの段落ごと keep-all にする。改行は <wbr> と空白の位置だけ */
.post__body :is(p, li, td, th, dd, dt, h2, h3, h4, blockquote), .post__title, .card__title, .slide__title, .mini__title, .pn a { word-break: keep-all; }
/* 段落の最後の数文字は1行にまとめる(「す。」だけの行を作らない。tidy-breaks.py が付ける) */
.post__body .nw { white-space: nowrap; }
h1, h2, h3 { text-wrap: balance; }
a { color: inherit; }
img { max-width: 100%; height: auto; }

/* ヘッダー */
.gnav { background: var(--accent); }
.gnav__in {
  max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: center;
  gap: 4px; padding: 0 12px; overflow-x: auto; scrollbar-width: none;
}
@media (max-width: 959px) { .gnav__in { justify-content: flex-start; } }
.gnav__in::-webkit-scrollbar { display: none; }
.gnav a {
  color: #fff; text-decoration: none; font-size: 14px; padding: 14px 12px; white-space: nowrap; line-height: 1;
  display: flex; align-items: center;
}
.gnav a:hover { background: var(--accent-dark); }
.gnav__search { margin-left: auto; }
.hd__brand { text-align: center; padding: 28px 16px 22px; }
.hd__logo img { width: 173px; height: auto; display: inline-block; }
.hd__desc { margin: 10px 0 0; font-size: 13px; color: var(--text); line-height: 1.6; }

/* スライダー(横スクロール) */
.slider {
  display: grid; grid-auto-flow: column; grid-auto-columns: 74vw; gap: 0;
  max-width: 1100px; margin: 0 auto 32px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.slider .slide { scroll-snap-align: start; }
@media (min-width: 600px) { .slider { grid-auto-columns: 45%; } }
@media (min-width: 900px) { .slider { grid-auto-columns: 25%; } }
.slide { position: relative; display: block; text-decoration: none; color: #fff; aspect-ratio: 300 / 360; overflow: hidden; background: #ddd; }
.slide__img, .slide__img img { width: 100%; height: 100%; }
.slide__img img { object-fit: cover; transition: transform .4s; display: block; }
.slide:hover img { transform: scale(1.05); }
.slide__info {
  position: absolute; inset: auto 0 0 0; padding: 48px 16px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
}
.slide__title {
  margin: 0 0 6px; font-weight: 700; font-size: 15px; line-height: 1.55;
  max-height: 4.65em; overflow: hidden;
}
.slide .card__cat { color: #fff; font-size: 12px; }

/* 2カラム */
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 12px 48px; display: grid; gap: 40px; }
@media (min-width: 960px) { .wrap { grid-template-columns: minmax(0, 1fr) 300px; } }
.primary { min-width: 0; }

/* タブ */
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 3px solid var(--accent); margin-bottom: 20px; }
.tabs__btn {
  font: inherit; font-size: 14px; font-weight: 700; padding: 12px 4px; border: 1px solid var(--line); border-bottom: 0;
  background: #fff; color: var(--text); cursor: pointer; white-space: nowrap;
}
.tabs__btn.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.tabs__panel { display: none; }
.tabs__panel.is-active { display: block; }

/* 記事カード */
.card { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .card { grid-template-columns: 220px 1fr; gap: 22px; } }
.card__img { display: block; aspect-ratio: 1; overflow: hidden; background: #eee; }
@media (min-width: 640px) { .card__img { aspect-ratio: 300 / 210; } }
.card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.card__img:hover img { transform: scale(1.05); }
.card__title { margin: 0 0 6px; font-size: 16px; line-height: 1.6; text-wrap: wrap; }
@media (min-width: 640px) { .card__title { font-size: 18px; } }
.card__title a { text-decoration: none; }
.card__title a:hover { color: var(--accent); }
.card__ex { margin: 0 0 8px; font-size: 13px; line-height: 1.7; color: #555; display: none; }
@media (min-width: 640px) { .card__ex { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } }
.card__meta { margin: 0; font-size: 12px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
.card__cat { color: var(--accent); white-space: nowrap; }
.card__noimg { display: block; width: 100%; height: 100%; background: var(--tint); }

.pager { list-style: none; padding: 0; margin: 28px 0 0; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.pager a, .pager span { display: block; min-width: 40px; padding: 8px 10px; text-align: center; border: 1px solid var(--line); background: #fff; text-decoration: none; line-height: 1.4; }
.pager .is-cur { background: var(--accent); border-color: var(--accent); color: #fff; }

/* サイドバー */
.widget { margin-bottom: 36px; }
.widget__title { margin: 0 0 14px; padding: 10px 14px; background: var(--accent); color: #fff; font-size: 15px; line-height: 1.4; }
.minis, .catlist { list-style: none; margin: 0; padding: 0; }
.mini { display: grid; grid-template-columns: 76px 1fr; gap: 12px; text-decoration: none; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mini__img { aspect-ratio: 1; overflow: hidden; background: #eee; }
.mini__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini__title { margin: 0; font-size: 13px; line-height: 1.6; max-height: 4.8em; overflow: hidden; }
.mini:hover .mini__title { color: var(--accent); }
.catlist a { display: flex; justify-content: space-between; padding: 10px 4px; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 14px; }
.catlist a:hover { color: var(--accent); }
.catlist span { color: var(--muted); font-size: 12px; }

/* パンくず */
.bc { list-style: none; padding: 0; margin: 0 0 18px; font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px; line-height: 1.6; }
.bc li + li::before { content: "›"; margin-right: 4px; }
.bc a { text-decoration: none; }
.bc li:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* 記事 */
.post { background: var(--card); padding: 20px 14px 28px; margin: 0 -4px; }
@media (min-width: 640px) { .post { padding: 36px 44px 44px; } }
.post__cat { display: inline-block; background: var(--accent); color: #fff; font-size: 12px; padding: 4px 10px; text-decoration: none; line-height: 1.4; margin-bottom: 12px; }
.post__title { margin: 0 0 10px; font-size: 22px; line-height: 1.55; }
@media (min-width: 640px) { .post__title { font-size: 27px; } }
.post__date { margin: 0 0 22px; font-size: 13px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
.post__eye { margin: 0 0 28px; }
.post__eye img { width: 100%; display: block; }
.post__body { font-size: 15px; }
@media (min-width: 640px) { .post__body { font-size: 16px; } }
.post__body > *:first-child { margin-top: 0; }
.post__body p { margin: 0 0 1.5em; }
.post__body h2 {
  font-size: 20px; line-height: 1.55; margin: 2.4em 0 1em; padding: 14px 18px;
  background: var(--tint); border-left: 5px solid var(--accent);
}
.post__body h3 { font-size: 18px; line-height: 1.55; margin: 2em 0 .8em; padding-bottom: 8px; border-bottom: 2px solid var(--accent); }
.post__body h4 { font-size: 16px; margin: 1.6em 0 .6em; }
.post__body ul, .post__body ol { padding-left: 1.4em; margin: 0 0 1.5em; }
.post__body li { margin-bottom: .4em; }
.post__body a { color: #1a6fb5; }
.post__body blockquote { margin: 0 0 1.5em; padding: 14px 18px; border-left: 4px solid var(--line); background: #faf9f6; color: #555; }
.post__body img { display: block; margin: 0 auto 1.5em; }
.post__body figure { margin: 0 0 1.5em; }
.post__body figcaption { font-size: 12px; color: var(--muted); text-align: center; }
.post__body dl { margin: 0 0 1.5em; }
.post__body dt { font-weight: 700; }
.post__body dd { margin: 0 0 .8em 1em; }
.tbl { overflow-x: auto; margin: 0 0 1.5em; }
.post__body table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 1.7; min-width: 480px; }
.post__body th, .post__body td { border: 1px solid var(--line); padding: 8px 10px; vertical-align: top; text-align: left; }
.post__body th { background: var(--tint); }
.post__body .red { color: #d02c2c; }
.post__body .flex { display: flex; gap: 12px; flex-wrap: wrap; }
.post__body .flex > * { flex: 1 1 200px; }
.post__body .flex > br, .post__body .flex > wbr { display: none; }

/* 目次 */
.post__body .index { border: 1px solid var(--line); background: #faf9f6; padding: 16px 20px; margin: 0 0 2em; }
.post__body .index > p:first-child { font-weight: 700; margin: 0 0 8px; }
.post__body .index ul { margin: 0; padding-left: 1.2em; }
.post__body .index li { margin: .2em 0; font-size: 14px; }
.post__body .index a { color: var(--text); }

/* 関連記事カード(本文内) */
.post__body h2.related { background: none; border: 0; padding: 0 0 8px; border-bottom: 2px solid var(--accent); }
.post__body .cardlink { display: grid; grid-template-columns: 100px 1fr; gap: 14px; border: 1px solid var(--line); padding: 12px; margin: 0 0 1em; background: #fff; }
.post__body .cardlink_thumbnail img { margin: 0; aspect-ratio: 1; object-fit: cover; width: 100%; }
.post__body .cardlink_timestamp { font-size: 12px; color: var(--muted); }
.post__body .cardlink_title { font-weight: 700; line-height: 1.6; font-size: 15px; }
.post__body .cardlink_title a { color: var(--text); text-decoration: none; }
.post__body .cardlink_excerpt { font-size: 13px; color: #555; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post__body .petee-related { background: var(--tint); padding: 12px 16px; font-size: 14px; }

.post__tags { margin: 28px 0 0; display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.post__tags a { background: var(--tint); padding: 4px 10px; text-decoration: none; white-space: nowrap; }
.post__author { margin: 24px 0 0; font-size: 13px; color: var(--muted); }
.note { background: var(--tint); padding: 14px 18px; }

/* 前後の記事・関連記事 */
.pn { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 28px 0; }
@media (min-width: 640px) { .pn { grid-template-columns: 1fr 1fr; } }
.pn a { display: block; padding: 14px 16px; background: #fff; border: 1px solid var(--line); text-decoration: none; font-size: 13px; line-height: 1.6; }
.pn a span { display: block; color: var(--accent); font-size: 12px; margin-bottom: 4px; }
@media (min-width: 640px) { .pn__next { text-align: right; } }
.rel__title { font-size: 18px; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--accent); }
.rel__list { display: grid; grid-template-columns: 1fr; gap: 8px; }
.rel__list .slide { aspect-ratio: 16 / 9; }
@media (min-width: 480px) { .rel__list { grid-template-columns: repeat(2, 1fr); } .rel__list .slide { aspect-ratio: 3 / 4; } }
@media (min-width: 640px) { .rel__list { grid-template-columns: repeat(4, 1fr); } }

.rel__list .slide__title { font-size: 13px; max-height: 6.2em; }
.rel__list .slide__info { padding: 40px 10px 10px; }

/* アーカイブ・検索 */
.arch__title { font-size: 22px; margin: 0 0 8px; padding-bottom: 10px; border-bottom: 3px solid var(--accent); }
.arch__desc { color: #555; font-size: 14px; }
.search input { width: 100%; font: inherit; padding: 12px 14px; border: 2px solid var(--accent); background: #fff; margin: 12px 0 20px; }

/* フッター */
.ft { background: #fff; border-top: 4px solid var(--accent); }
.ft__in { max-width: 1100px; margin: 0 auto; padding: 36px 16px 20px; display: grid; gap: 28px; }
@media (min-width: 640px) { .ft__in { grid-template-columns: 1fr 1fr; } }
.ft h2 { font-size: 15px; margin: 0 0 10px; }
.ft ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; }
.ft ul a { text-decoration: none; white-space: nowrap; }
.ft ul a:hover { color: var(--accent); }
.ft__ad { max-width: 728px; margin: 0 auto 16px; padding: 0 16px; text-align: center; }
.ft__copy { margin: 0; padding: 16px; text-align: center; font-size: 12px; background: var(--bg); }

/* お問い合わせ(Google フォーム埋め込み) */
.gform iframe { width: 100%; height: 1250px; border: 0; display: block; }
.gform__alt { font-size: 13px; color: var(--muted); }

/* 検索結果は JS で出すので <wbr> が入らない。keep-all だとはみ出すので通常の折り返しにする */
.card__title.is-js { word-break: normal; }
/* Amazon(PR) 記事末尾の本棚 */
.amz { margin: 32px 0 0; padding: 16px; border: 1px solid var(--line); border-radius: 8px; }
.amz__title { margin: 0 0 10px; font-size: 16px; }
.amz__title small { font-size: 11px; font-weight: normal; border: 1px solid currentColor; border-radius: 3px; padding: 0 4px; vertical-align: middle; }
.amz ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.amz li a { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; color: var(--text); }
.amz li a span { color: var(--accent-dark); font-size: 14px; white-space: nowrap; }
.amz__note { margin: 8px 0 0; font-size: 11px; color: var(--muted); }
