/* 案A: 家計ブログの王道 — 白背景・赤〜橙アクセント・カード型・表が見やすい */
:root {
  color-scheme: light dark;
  --fg: #1a1a1a;
  --bg: #ffffff;
  --accent: #e0451f;
  --accent-dark: #b6350f;
  --border: #e3e3e3;
  --card-bg: #fffaf7;
}

* { box-sizing: border-box; }

html, body { max-width: 100%; overflow-x: hidden; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.7;
}

img { max-width: 100%; height: auto; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 3px solid var(--accent);
  background: #fff;
}

.site-title {
  font-weight: 800;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--accent-dark);
}

.site-header nav a {
  display: inline-block;
  margin: 0.15rem 1rem 0.15rem 0;
  color: var(--fg);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}

.site-header nav a:hover { color: var(--accent); text-decoration: underline; }

main {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem;
}

main h1 {
  font-size: 1.4rem;
  border-left: 6px solid var(--accent);
  padding-left: 0.6rem;
  line-height: 1.4;
}

main h2 {
  font-size: 1.15rem;
  margin-top: 2rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--border);
}

.pr-disclosure {
  background: #fff3e0;
  border: 1px solid #f0c26a;
  border-radius: 6px;
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.sale-banner {
  background: #fdecec;
  border-left: 4px solid var(--accent);
  padding: 0.5rem 0.9rem;
  font-weight: 700;
  border-radius: 0 4px 4px 0;
}

/* テーブルはビューポート幅を超える列数(例: 収入帯9列)でも本文をはみ出させず、
   表自体を横スクロール可能にする(display:blockでoverflow-xが効くようにする)。
   スマホ幅390pxでの右はみ出しバグの修正箇所。 */
table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.85rem;
}

th, td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.6rem;
  text-align: left;
  white-space: nowrap;
}

thead th {
  background: #fdece4;
  color: var(--accent-dark);
}

tbody tr:nth-child(even) { background: #fffaf8; }

.table-note {
  font-size: 0.8rem;
  color: #666;
}

.item-cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  margin: 1.5rem 0;
}

.item-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem;
  background: var(--card-bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.item-card img {
  max-width: 100%;
  border-radius: 6px;
}

.item-hook {
  font-weight: 700;
  margin: 0.5rem 0 0.25rem;
}

.pr-tag {
  font-size: 0.75rem;
  color: #888;
  margin: 0.25rem 0;
}

.item-link {
  display: inline-block;
  color: #fff;
  background: var(--accent);
  font-weight: 700;
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.item-link:hover { background: var(--accent-dark); }

.article-list { padding-left: 1.25rem; }
.article-list a { color: var(--accent-dark); font-weight: 600; text-decoration: none; }
.article-list a:hover { text-decoration: underline; }

.site-footer {
  max-width: 720px;
  width: 100%;
  margin: 2rem auto 1rem;
  padding: 0 1.25rem;
  font-size: 0.8rem;
  color: #666;
}
