/* ==================================================================
   インテリアウォッチャー — 旧Cocoonテーマの見た目を再現したスタイル
   ================================================================== */

:root {
  --bg:          #f2f2f2;
  --surface:     #ffffff;
  --ink:         #333333;
  --ink-soft:    #777777;
  --line:        #e5e5e5;
  --accent:      #4f8ac9;   /* H3の縦線・リンク */
  --accent-warm: #ff8c42;   /* ショップボタン */
  --h2-bg:       #ebebeb;
  --marker:      #fff4a3;
  --measure:     1200px;
  --radius:      4px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.9;
}

img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- ヘッダー ---------- */
.site-header {
  background: var(--surface);
  padding: 24px 20px 0;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.site-title {
  display: inline-block;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--ink);
}
.site-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 40px;
  margin-top: 18px;
}
.site-nav a {
  display: block;
  padding: 14px 4px;
  font-size: 14px;
  color: var(--ink);
}

/* ---------- レイアウト ---------- */
.wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  max-width: var(--measure);
  margin: 24px auto;
  padding: 0 20px;
}
.main { min-width: 0; }

/* ---------- パンくず ---------- */
.breadcrumb { font-size: 12px; color: var(--ink-soft); margin: 0 0 10px; }
.breadcrumb a { color: var(--ink-soft); }

/* ---------- 記事一覧（カード2列） ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card-label {
  align-self: flex-start;
  margin: 10px 0 0 10px;
  padding: 2px 10px;
  background: #555;
  color: #fff;
  font-size: 11px;
  border-radius: 2px;
}
.card-thumb { margin: 10px 0 0; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.card-body { padding: 12px 14px 14px; flex: 1; display: flex; flex-direction: column; }
.card-title { font-size: 15px; font-weight: 700; line-height: 1.6; margin: 0 0 6px; }
.card-title a { color: var(--ink); }
.card-excerpt { font-size: 12.5px; color: var(--ink-soft); margin: 0; line-height: 1.7; }
.card-dates {
  margin-top: auto;
  padding-top: 10px;
  text-align: right;
  font-size: 11.5px;
  color: var(--ink-soft);
}
.card-dates time + time { margin-left: 10px; }

/* ---------- ページャ ---------- */
.pager { display: flex; justify-content: center; gap: 6px; margin: 28px 0; }
.pager a, .pager span {
  min-width: 34px; padding: 6px 10px; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 2px;
  font-size: 14px; color: var(--ink);
}
.pager .current { background: #ddd; }

/* ---------- 記事本文 ---------- */
.post {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 34px 40px;
}
.post-title { font-size: 26px; line-height: 1.5; margin: 0 0 12px; }
.post-meta { font-size: 12.5px; color: var(--ink-soft); text-align: right; margin: 0 0 24px; }
.post-meta time + time::before { content: "更新 "; }
.post-meta time + time { margin-left: 12px; }

.post-eyecatch { margin: 0 0 28px; }
.post-eyecatch img { width: 100%; aspect-ratio: 802 / 437; object-fit: cover; border-radius: 2px; }

.post-body { font-size: 16px; }
.post-body > *:first-child { margin-top: 0; }

.post-body h2 {
  background: var(--h2-bg);
  font-size: 20px;
  line-height: 1.6;
  margin: 48px 0 22px;
  padding: 14px 18px;
  border-radius: 2px;
}
.post-body h3 {
  font-size: 18px;
  line-height: 1.6;
  margin: 38px 0 18px;
  padding: 4px 0 4px 14px;
  border-left: 5px solid var(--accent);
}
.post-body h4 {
  font-size: 16.5px;
  margin: 30px 0 14px;
  padding-bottom: 6px;
  border-bottom: 1px dotted #bbb;
}
.post-body h5 { font-size: 15.5px; margin: 24px 0 10px; color: #444; }
.post-body h5::before { content: "\25b6 "; color: var(--accent); font-size: 12px; }

.post-body p { margin: 0 0 1.6em; }
.post-body ul, .post-body ol { margin: 0 0 1.6em; padding-left: 1.6em; }
.post-body li { margin-bottom: .4em; }

.post-body blockquote {
  margin: 0 0 1.6em;
  padding: 16px 20px;
  background: #fafafa;
  border-left: 4px solid #ccc;
  color: #555;
}

.post-body figure { margin: 0 0 1.6em; }
.post-body figcaption { font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; }
.post-body img { border-radius: 2px; }

.post-body table { border-collapse: collapse; width: 100%; margin: 0 0 1.6em; font-size: 14.5px; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: 10px 12px; }
.post-body th { background: #f6f6f6; }

/* マーカー */
.marker { background: linear-gradient(transparent 62%, var(--marker) 62%); }
.marker-red { background: linear-gradient(transparent 62%, #ffd0d0 62%); }
.marker-under { border-bottom: 2px solid var(--marker); }

/* 囲みボックス */
.primary-box, .secondary-box, .blue-box, .red-box, .yellow-box, .green-box {
  margin: 0 0 1.6em;
  padding: 18px 22px;
  border-radius: var(--radius);
  border: 2px solid var(--line);
  background: #fbfbfb;
}
.primary-box { border-color: #b8d4ef; background: #f4f9fe; }
.secondary-box { border-color: #dcdcdc; background: #f7f7f7; }
.blue-box   { border-color: #b8d4ef; background: #f4f9fe; }
.red-box    { border-color: #f0b8b8; background: #fef5f5; }
.yellow-box { border-color: #f0dfa8; background: #fffdf3; }
.green-box  { border-color: #bfe0bf; background: #f5fbf5; }
.primary-box > *:last-child, .secondary-box > *:last-child { margin-bottom: 0; }
.box-title { font-weight: 700; margin: 0 0 .8em; }

/* ショップボタン */
.btn-wrap { margin: 0 0 1.8em; text-align: center; }
.btn-wrap a {
  display: inline-block;
  min-width: 280px;
  padding: 15px 30px;
  background: var(--accent-warm);
  color: #fff;
  font-weight: 700;
  border-radius: 4px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .15);
  transition: transform .12s ease;
}
.btn-wrap a:hover { transform: translateY(1px); text-decoration: none; box-shadow: 0 2px 0 rgba(0,0,0,.15); }
.btn-wrap-l a { font-size: 17px; }

/* 内部リンクカード */
.blogcard {
  margin: 0 0 1.8em;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fcfcfc;
  position: relative;
}
.blogcard::before {
  content: "関連記事";
  position: absolute;
  top: -11px; left: 14px;
  padding: 1px 10px;
  background: #888; color: #fff;
  font-size: 11px; border-radius: 2px;
}
.blogcard > a { font-weight: 700; font-size: 15px; line-height: 1.6; }
.blogcard p { margin: .6em 0 0; font-size: 12.5px; color: var(--ink-soft); line-height: 1.7; }
.blogcard-meta { display: block; margin-top: .6em; font-size: 11.5px; color: var(--ink-soft); text-align: right; }

/* 吹き出し */
.balloon {
  position: relative;
  margin: 0 0 1.8em;
  padding: 14px 18px;
  max-width: 78%;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 15px;
}
.balloon::after { content: ""; position: absolute; top: 18px; border: 9px solid transparent; }
.balloon-left::after { left: -20px; border-right-color: var(--line); }
.balloon-right { margin-left: auto; }
.balloon-right::after { right: -20px; border-left-color: var(--line); }
.balloon[data-name]::before {
  content: attr(data-name);
  display: block;
  margin-bottom: .4em;
  font-size: 12px;
  color: var(--ink-soft);
}

/* 出典表記 */
.source { font-size: 12.5px; color: var(--ink-soft); margin: -1em 0 1.6em; }

/* 記事フッター */
.post-terms { margin: 36px 0 0; font-size: 13px; }
.post-terms a {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 3px 12px;
  background: #f0f0f0;
  border-radius: 14px;
  color: var(--ink-soft);
}

/* ---------- サイドバー ---------- */
.sidebar { font-size: 14px; }
.widget {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
}
.widget-title { margin: 0; padding: 12px 16px; background: #f0f0f0; font-size: 15px; font-weight: 700; }
.widget ul { list-style: none; margin: 0; padding: 8px 16px 14px; }
.widget li { padding: 7px 0; border-bottom: 1px solid #f0f0f0; }
.widget li:last-child { border-bottom: 0; }
.widget a { color: var(--ink); }

.search-box { padding: 14px 16px; }
.search-box input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 14px;
}

/* 人気記事ランキング */
.rank-list { counter-reset: rank; }
.rank-list li { display: flex; gap: 10px; align-items: flex-start; }
.rank-list li::before {
  counter-increment: rank;
  content: counter(rank);
  flex: none;
  width: 22px; height: 22px;
  margin-top: 2px;
  background: #bbb; color: #fff;
  font-size: 12px; line-height: 22px; text-align: center;
  border-radius: 2px;
}
.rank-list li:nth-child(1)::before { background: #d4af37; }
.rank-list li:nth-child(2)::before { background: #a8a8a8; }
.rank-list li:nth-child(3)::before { background: #b87333; }
.rank-list a { font-size: 13px; line-height: 1.6; }

/* ---------- フッター ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: 40px; }
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 36px 20px;
}
.footer-cols h2 { font-size: 15px; margin: 0 0 14px; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.footer-cols li { padding: 5px 0; }
.footer-cols a { color: var(--ink); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 14px 20px;
  font-size: 12px;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  max-width: var(--measure);
  margin: 0 auto;
}

/* ---------- レスポンシブ ---------- */
@media (max-width: 900px) {
  .wrap { grid-template-columns: minmax(0, 1fr); }
  .post { padding: 22px 18px 30px; }
  .post-title { font-size: 21px; }
  .card-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-cols { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .balloon { max-width: 100%; }
  .btn-wrap a { min-width: 0; width: 100%; }
  .site-nav { gap: 0 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto; }
}
