/* =========================================================
   電話をつくろう  共通スタイルシート (style.css)
   配色: 黒と白を基調
   ヘッダー … 黒背景 + 白文字
   タブ・本文 … 白背景 + 黒文字
   ========================================================= */

:root {
  --black: #000000;
  --white: #ffffff;
  --gray-line: #e2e2e2;     /* 薄い罫線 */
  --gray-active: #d9d9d9;   /* 選択中タブの背景 */
  --gray-slot: #f5f5f5;     /* 画像・動画スペースの背景 */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans JP", sans-serif;
  line-height: 1.9;
  font-size: 1rem;
}

/* ---------- ヘッダー(黒背景・白文字) ---------- */
.site-header {
  background: var(--black);
  color: var(--white);
  text-align: center;
  padding: 28px 16px 24px;
}
.site-header h1 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* ---------- タブ(白背景・黒文字・丸いボタン) ---------- */
.tabs {
  background: var(--white);
  padding: 22px 16px 26px;
  border-bottom: 1px solid var(--gray-line);
}
.tabs ul {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 1100px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.tabs a {
  display: block;
  min-width: 150px;
  padding: 14px 32px;
  text-align: center;
  text-decoration: none;
  color: var(--black);
  background: var(--white);
  border: 1px solid var(--gray-line);
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  font-size: 1.1rem;
  transition: background 0.2s, box-shadow 0.2s;
}
.tabs a:hover { background: #f0f0f0; }
.tabs a:focus-visible { outline: 3px solid var(--black); outline-offset: 3px; }
/* 現在開いているページのタブ */
.tabs a.active {
  background: var(--gray-active);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
}

/* ---------- 本文 ---------- */
main {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 20px 72px;
  background: var(--white);
  color: var(--black);
}
section { margin-bottom: 56px; }

h2 {
  margin: 0 0 20px;
  min-height: 1.6em;            /* 文字が空でも見出しの線が表示される */
  padding-left: 14px;
  border-left: 6px solid var(--black);
  font-size: 1.5rem;
  line-height: 1.6;
}
p { margin: 0 0 1em; min-height: 1.9em; }

/* ---------- 箇条書き(材料リストなど) ---------- */
.item-list { list-style: none; margin: 0; padding: 0; }
.item-list li {
  min-height: 2.6em;
  padding: 8px 4px;
  border-bottom: 1px solid var(--gray-line);
}

/* ---------- 画像スペース ---------- */
.image-slot {
  min-height: 180px;
  background: var(--gray-slot);
  border: 2px dashed #bdbdbd;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.image-slot img { display: block; width: 100%; height: auto; }
/* 画像を入れると、点線の枠は自動的に消えます */
.image-slot:has(img) { border: none; background: none; min-height: 0; }

/* ---------- 動画スペース(16:9) ---------- */
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--gray-slot);
  border: 2px dashed #bdbdbd;
  overflow: hidden;
}
.video-frame iframe,
.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-frame:has(iframe),
.video-frame:has(video) { border: none; background: var(--black); }

/* ---------- 作り方テーブル(2列・画像も入れられる) ---------- */
.steps-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.steps-table td {
  width: 50%;
  vertical-align: top;
  padding: 16px;
  border: 1px solid var(--black);
}
.steps-table .image-slot { min-height: 140px; margin-bottom: 12px; }
.steps-table .image-slot:has(img) { margin-bottom: 12px; }
.steps-table p { margin-bottom: 0; }

/* ---------- メンバー ---------- */
.member-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
}
.member-list li { text-align: center; }
.member-list .image-slot { aspect-ratio: 1 / 1; min-height: 0; margin-bottom: 10px; }
.member-list p { margin-bottom: 0; }

footer{
  text-align: center;
  text-align: center;
  padding: 15px 0;
  background-color: #333;
  color: #fff;
  font-size: 0.9em;
}

/* ---------- スマホ向け ---------- */
@media (max-width: 640px) {
  .tabs a { min-width: 0; padding: 12px 20px; font-size: 1rem; }
  .steps-table, .steps-table tbody, .steps-table tr, .steps-table td {
    display: block;
    width: 100%;
  }
  .steps-table td + td { border-top: none; }
}
