/* はこび帖 — 共通スタイル */
:root {
  --teal: #1f5f5b;
  --teal-2: #3f8c85;
  --kraft: #c98b4a;
  --kraft-soft: #fbf4e8;
  --accent: #e0663d;
  --ink: #2b2b2b;
  --muted: #5e5e5e;
  --line: #e4dccd;
  --radius: 12px;
  --max: 880px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif;
  color: var(--ink);
  background: #fffdf9;
  line-height: 1.85;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); }
a:hover { color: var(--accent); }

/* PR表記 */
.pr-bar {
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  padding: 6px 16px;
  text-align: center;
  line-height: 1.6;
}
.pr-bar strong { background: var(--accent); padding: 0 6px; border-radius: 3px; margin-right: 6px; }

/* ヘッダー */
.site-header {
  background: #fff;
  border-bottom: 3px solid var(--kraft);
}
.site-header .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand img { width: 40px; height: 40px; }
.brand-name { font-size: 22px; font-weight: 800; letter-spacing: .06em; }
.brand-sub { display: block; font-size: 11px; color: var(--muted); letter-spacing: 0; font-weight: 400; }
.global-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 14px;
}
.global-nav a { text-decoration: none; font-weight: 700; color: var(--teal); }
.global-nav a[aria-current="page"] { color: var(--accent); border-bottom: 2px solid var(--accent); }

/* パンくず */
.breadcrumb { max-width: var(--max); margin: 0 auto; padding: 10px 16px 0; font-size: 13px; color: var(--muted); }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumb li + li::before { content: "›"; margin-right: 4px; }

/* 本文 */
main { max-width: var(--max); margin: 0 auto; padding: 8px 16px 40px; }
h1 { font-size: 26px; line-height: 1.45; margin: 18px 0 12px; }
h2 {
  font-size: 21px;
  line-height: 1.5;
  margin: 44px 0 14px;
  padding: 8px 12px;
  border-left: 6px solid var(--teal);
  background: var(--kraft-soft);
  border-radius: 0 8px 8px 0;
}
h3 { font-size: 18px; margin: 28px 0 8px; color: var(--teal); }
p { margin: 0 0 14px; }
.lead { font-size: 17px; }
.updated { font-size: 13px; color: var(--muted); }
.figure { margin: 18px 0 24px; }
.figure img { border: 1px solid var(--line); border-radius: var(--radius); width: 100%; }
.figure figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ヒーロー */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 8px;
}
.hero img { border-radius: var(--radius); }

/* ボックス類 */
.note {
  border: 2px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 18px 0;
}
.note-warn { border-color: #f0b49f; background: #fff6f2; }
.note-title { font-weight: 800; margin-bottom: 6px; display: block; }
.toc {
  border: 2px dashed var(--kraft);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 18px 0;
  background: #fff;
}
.toc ol { margin: 6px 0 0; padding-left: 1.4em; }

/* カード */
.cards { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 18px 0; }
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 16px;
}
.card h3 { margin-top: 0; }
.card .more { font-weight: 700; }

/* 表 */
.table-wrap { overflow-x: auto; margin: 16px 0 22px; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 15px; background: #fff; }
th, td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
thead th { background: var(--teal); color: #fff; }
tbody th { background: var(--kraft-soft); white-space: nowrap; }
td.num { text-align: right; white-space: nowrap; }
tr.total td, tr.total th { font-weight: 800; background: #fff6f2; }

/* 手順リスト */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 16px 0; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 12px 14px 12px 56px;
  margin-bottom: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
  text-align: center;
  line-height: 30px;
}
.checklist { list-style: none; padding: 0; }
.checklist li { padding-left: 1.8em; position: relative; margin-bottom: 6px; }
.checklist li::before { content: "□"; position: absolute; left: 0; color: var(--teal); font-weight: 800; }

/* 導線（アフィリエイト） */
.aff-box {
  border: 2px solid var(--teal);
  border-radius: var(--radius);
  background: #f2f8f7;
  padding: 16px;
  margin: 26px 0;
}
.aff-box .aff-title { font-weight: 800; font-size: 17px; margin: 0 0 4px; }
.aff-box .aff-desc { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.aff-box .aff-terms {
  font-size: 14px;
  background: #fff;
  border-left: 4px solid var(--accent);
  padding: 8px 10px;
  margin: 0 0 12px;
}
.aff-box .aff-terms-head { font-weight: 800; margin: 0 0 4px; }
.aff-box .aff-terms ul { margin: 0; padding-left: 1.2em; }
.aff-box .aff-terms li { margin-bottom: 4px; }
.aff-box .aff-terms-note { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.aff-buttons { display: grid; grid-template-columns: 1fr; gap: 10px; }
.btn {
  display: block;
  text-align: center;
  text-decoration: none;
  font-weight: 800;
  padding: 13px 12px;
  border-radius: 999px;
  line-height: 1.4;
}
.btn-main { background: var(--accent); color: #fff; box-shadow: 0 3px 0 #a9472a; }
.btn-main:hover { color: #fff; filter: brightness(1.05); }
.btn-amazon { background: #fff; color: #232f3e; border: 2px solid #232f3e; }
.btn-rakuten { background: #fff; color: #bf0000; border: 2px solid #bf0000; }
.btn small { display: block; font-weight: 400; font-size: 12px; }
.aff-inline { font-weight: 700; }
.pr-label { display: inline-block; font-size: 11px; border: 1px solid var(--muted); color: var(--muted); padding: 0 4px; border-radius: 3px; margin-left: 4px; vertical-align: middle; }

/* FAQ */
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  margin-bottom: 10px;
  padding: 0 16px;
}
.faq summary { cursor: pointer; font-weight: 800; padding: 12px 0; list-style-position: outside; }
.faq details[open] summary { border-bottom: 1px dashed var(--line); margin-bottom: 10px; }
.faq details p:last-child { margin-bottom: 14px; }

/* 出典 */
.sources { font-size: 14px; }
.sources li { margin-bottom: 6px; }

/* フッター */
.site-footer { background: var(--teal); color: #e6f5f3; font-size: 13px; }
.site-footer .inner { max-width: var(--max); margin: 0 auto; padding: 22px 16px; }
.site-footer a { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px 16px; }

/* 画像の差し込み枠（ASSETS.md 参照）。空のうちは表示しない */
.img-slot:empty { display: none !important; }
.img-slot { display: block; margin: 16px 0 22px; }
.img-slot img { width: 100%; height: auto; border-radius: var(--radius); }
.brand .img-slot,
.global-nav .img-slot,
h2 .img-slot,
.note-title .img-slot { display: inline-block; margin: 0 6px 0 0; vertical-align: -0.2em; }
.brand .img-slot img { width: 40px; height: 40px; border-radius: 0; }
.global-nav .img-slot img { width: 18px; height: 18px; border-radius: 0; }
h2 .img-slot img { width: 28px; height: 28px; border-radius: 0; }
.note-title .img-slot img { width: 22px; height: 22px; border-radius: 0; }
.card .img-slot { margin: 0 0 8px; }
.card .img-slot img { width: 48px; height: 48px; border-radius: 0; }
.site-footer .img-slot { margin: 0 0 12px; }
.site-footer .img-slot img { width: 180px; height: auto; border-radius: 0; }
/* 第1便の統合で追加：横長（3:2）のアイコンを正方形の枠に歪めずに収める／図の枠は figure 側の余白を使う */
.brand .img-slot img,
.global-nav .img-slot img,
.card .img-slot img,
h2 .img-slot img,
.note-title .img-slot img { object-fit: contain; }
.figure .img-slot,
.hero .img-slot { margin: 0; }

/* PC */
@media (min-width: 760px) {
  body { font-size: 17px; }
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }
  .hero { grid-template-columns: 1.1fr 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .aff-buttons { grid-template-columns: 1.4fr 1fr 1fr; }
}
