/* 1畳ホームジム - 共有スタイルシート */
/* フォントはシステムフォントのみ、外部CDNは使用しない */

:root {
  --color-bg: #f7f3ec;
  --color-bg-alt: #efe8db;
  --color-surface: #ffffff;
  --color-text: #2b2724;
  --color-text-muted: #5c564e;
  --color-border: #ddd5c6;
  --color-accent: #b4473e;       /* muted red */
  --color-accent-dark: #8f3730;
  --color-secondary: #35587a;    /* calm cobalt */
  --color-secondary-dark: #23405c;
  --max-width: 1080px;
  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(43, 39, 36, 0.08);
  --shadow-md: 0 6px 20px rgba(43, 39, 36, 0.10);
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Yu Gothic UI", "Meiryo", system-ui, "Segoe UI", Roboto, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-secondary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--color-secondary-dark);
}

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-accent);
  color: #fff;
  padding: 10px 16px;
  z-index: 200;
}
.skip-link:focus {
  left: 10px;
  top: 10px;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
.site-header {
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.3;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}

.main-nav a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  border-bottom-color: var(--color-accent);
  color: var(--color-accent-dark);
}

.nav-toggle {
  display: none;
}

@media (max-width: 720px) {
  .header-inner {
    flex-wrap: wrap;
  }
  .main-nav {
    width: 100%;
    gap: 10px 16px;
    padding-top: 8px;
    border-top: 1px solid var(--color-border);
  }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--color-bg-alt), var(--color-bg));
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--color-border);
}

.hero-inner {
  max-width: 760px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-accent-dark);
  background: rgba(180, 71, 62, 0.1);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.4;
  margin: 0 0 16px;
}

.hero p {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  margin: 0 0 24px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background-color: var(--color-accent);
  color: #fff;
}
.btn-primary:hover {
  background-color: var(--color-accent-dark);
  color: #fff;
}

.btn-outline {
  background-color: transparent;
  border-color: var(--color-text);
  color: var(--color-text);
}
.btn-outline:hover {
  border-color: var(--color-secondary);
  color: var(--color-secondary-dark);
}

.btn-amazon {
  background-color: var(--color-secondary);
  color: #fff;
  font-size: 0.9rem;
  padding: 10px 18px;
}
.btn-amazon:hover {
  background-color: var(--color-secondary-dark);
  color: #fff;
}

/* ---------- Sections ---------- */
section {
  padding: 48px 0;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.section-heading h2 {
  font-size: 1.5rem;
  margin: 0;
}

.section-heading .more-link {
  font-size: 0.9rem;
  white-space: nowrap;
}

/* ---------- Card grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card .card-category {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-secondary-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card h3 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.5;
}

.card h3 a {
  color: var(--color-text);
  text-decoration: none;
}
.card h3 a:hover {
  color: var(--color-accent-dark);
}

.card p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.92rem;
  flex-grow: 1;
}

.card .card-meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* ---------- Category nav ---------- */
.category-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.category-list a {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.category-list a:hover {
  border-color: var(--color-secondary);
  color: var(--color-secondary-dark);
}

/* ---------- Disclosure box ---------- */
.disclosure-box {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-left: 5px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.disclosure-box strong {
  color: var(--color-text);
}

/* ---------- Product comparison table ---------- */
.product-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

table.product-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  background: var(--color-surface);
}

table.product-table th,
table.product-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
  font-size: 0.92rem;
}

table.product-table th {
  background: var(--color-bg-alt);
  font-weight: 700;
}

table.product-table tr:last-child td {
  border-bottom: none;
}

/* ---------- Product candidate card (articles) ---------- */
.product-candidate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 18px 0;
}

.product-candidate .pc-info {
  flex: 1 1 260px;
}

.product-candidate .pc-name {
  font-weight: 700;
  margin: 0 0 4px;
}

.product-candidate .pc-note {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.88rem;
}

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

.pc-link-sub {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ---------- Article ---------- */
.article-header {
  padding: 44px 0 28px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-alt);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.article-meta .tag {
  background: rgba(53, 88, 122, 0.12);
  color: var(--color-secondary-dark);
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.article-header h1 {
  font-size: clamp(1.6rem, 3.6vw, 2.2rem);
  margin: 0 0 10px;
  line-height: 1.5;
}

.article-lead {
  color: var(--color-text-muted);
  font-size: 1.02rem;
  max-width: 720px;
}

.article-body {
  max-width: 720px;
  padding: 36px 0;
}

.article-body h2 {
  font-size: 1.3rem;
  margin: 38px 0 16px;
  padding-top: 6px;
  border-top: 3px solid var(--color-accent);
  display: inline-block;
}

.article-body h3 {
  font-size: 1.08rem;
  margin: 26px 0 10px;
  color: var(--color-secondary-dark);
}

.article-body p {
  margin: 0 0 16px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 18px;
  padding-left: 1.3em;
}

.article-body li {
  margin-bottom: 8px;
}

.callout {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 5px solid var(--color-secondary);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 22px 0;
  font-size: 0.93rem;
}

.callout.caution {
  border-left-color: var(--color-accent);
}

.callout p:last-child {
  margin-bottom: 0;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}

.checklist li {
  padding-left: 1.6em;
  position: relative;
  margin-bottom: 10px;
}

.checklist li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--color-secondary);
  font-weight: 700;
}

.article-footer-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-text);
  color: #e7e2d8;
  padding: 44px 0 30px;
  margin-top: 40px;
}

.site-footer a {
  color: #f1ded9;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
  margin-bottom: 28px;
}

.footer-grid h4 {
  font-size: 0.95rem;
  margin: 0 0 12px;
  color: #fff;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-grid li {
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.footer-disclosure {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 20px;
  font-size: 0.82rem;
  color: #c9c2b4;
}

.footer-disclosure strong {
  color: #f1ded9;
}

.footer-bottom {
  margin-top: 18px;
  font-size: 0.78rem;
  color: #a39c8d;
}

/* ---------- Misc page layout ---------- */
.page-header {
  padding: 48px 0 24px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-alt);
}

.page-header h1 {
  font-size: clamp(1.7rem, 3.8vw, 2.3rem);
  margin: 0 0 12px;
}

.page-header p {
  color: var(--color-text-muted);
  max-width: 700px;
}

.prose {
  max-width: 760px;
}

.prose h2 {
  font-size: 1.3rem;
  margin: 36px 0 14px;
}

.prose h3 {
  font-size: 1.05rem;
  margin: 22px 0 10px;
}

.prose p {
  margin: 0 0 16px;
}

.prose ul {
  padding-left: 1.3em;
}

.source-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.source-list li {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 14px;
}

.source-list .source-title {
  font-weight: 700;
  margin: 0 0 4px;
  display: block;
}

.source-list .source-url {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  word-break: break-all;
}

/* ---------- Mobile product cards ---------- */
@media (max-width: 720px) {
  .product-table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
  }

  table.product-table,
  table.product-table tbody,
  table.product-table tr,
  table.product-table td {
    display: block;
    width: 100%;
  }

  table.product-table {
    min-width: 0;
    background: transparent;
  }

  table.product-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  table.product-table tbody {
    display: grid;
    gap: 16px;
  }

  table.product-table tr {
    overflow: hidden;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
  }

  table.product-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    overflow-wrap: anywhere;
  }

  table.product-table td::before {
    display: block;
    margin-bottom: 4px;
    color: var(--color-text-muted);
    font-size: 0.75rem;
    font-weight: 700;
  }

  table.product-table td:nth-child(1)::before { content: "商品名"; }
  table.product-table td:nth-child(2)::before { content: "カテゴリ"; }
  table.product-table td:nth-child(3)::before { content: "比較のポイント"; }
  table.product-table td:nth-child(4)::before { content: "商品ページ"; }

  table.product-table tr:last-child td:not(:last-child),
  table.product-table td:not(:last-child) {
    border-bottom: 1px solid var(--color-border);
  }

  table.product-table td:last-child {
    border-bottom: 0;
  }

  table.product-table .btn-amazon {
    display: flex;
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}
