/* ===== common.css ===== */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Noto+Sans+JP:wght@400;600;700&display=swap');

:root {
  --green:        #16a34a;
  --green-dark:   #166534;
  --green-light:  #22c55e;
  --green-bg:     #f0fdf4;
  --green-border: #dcfce7;
  --bg:           #f8fafc;
  --white:        #ffffff;
  --text:         #0f172a;
  --text-mid:     #475569;
  --text-light:   #94a3b8;
  --border:       #e2e8f0;
  --radius:       12px;
  --shadow:       0 1px 8px rgba(0,0,0,.06);
}

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

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

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== ヘッダー ===== */
#site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  color: var(--green);
  text-decoration: none;
  white-space: nowrap;
}

.site-logo span {
  font-size: 11px;
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--text-light);
  margin-left: 6px;
  font-weight: 400;
}

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

nav.main-nav a {
  font-size: 13px;
  color: var(--text-mid);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}

nav.main-nav a:hover,
nav.main-nav a.active {
  background: var(--green-bg);
  color: var(--green);
  font-weight: 600;
}

/* ハンバーガーメニュー（SP） */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  border-radius: 2px;
  transition: .2s;
}

/* ===== 広告枠 ===== */
.ad-slot {
  text-align: center;
  margin: 12px auto;
}

.ad-slot-inner {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--bg);
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  color: var(--text-light);
  font-size: 11px;
  letter-spacing: .06em;
}

.ad-slot-inner small {
  font-size: 10px;
  color: var(--border);
}

.ad-banner .ad-slot-inner  { width: 100%; max-width: 728px; height: 90px; }
.ad-rect   .ad-slot-inner  { width: 300px; height: 250px; }
.ad-sidebar .ad-slot-inner { width: 160px; height: 600px; }

.ad-label {
  font-size: 9px;
  color: var(--border);
  margin-top: 3px;
  letter-spacing: .1em;
}

/* ===== ページレイアウト ===== */
#page-wrap {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 24px 16px;
}

/* 3カラム（PC） */
.layout-3col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

.col-sidebar-left,
.col-sidebar-right {
  display: none;
  position: sticky;
  top: 72px;
}

.col-main { min-width: 0; }

@media (min-width: 1050px) {
  .layout-3col {
    grid-template-columns: 160px 1fr 160px;
  }
  .col-sidebar-left,
  .col-sidebar-right {
    display: block;
  }
}

/* ===== メインコンテンツカード ===== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 16px;
}

/* ===== 見出し ===== */
h1.page-title {
  font-family: 'DM Serif Display', serif;
  font-size: 26px;
  color: var(--text);
  margin-bottom: 6px;
}

h2.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  color: var(--text);
  margin-bottom: 16px;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 24px;
}

/* ===== フッター ===== */
#site-footer {
  background: var(--text);
  color: var(--text-light);
  padding: 32px 16px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 18px;
  color: var(--white);
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-light);
  text-decoration: none;
  transition: color .15s;
}

.footer-links a:hover { color: var(--white); }

.footer-copy {
  width: 100%;
  font-size: 12px;
  margin-top: 16px;
  color: #64748b;
}

/* ===== ユーティリティ ===== */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* ===== SP・タブレット対応（〜900px） ===== */
@media (max-width: 900px) {
  .header-inner { padding: 0 12px; }

  nav.main-nav {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    z-index: 99;
  }

  nav.main-nav.open { display: flex; }

  nav.main-nav a {
    padding: 10px 14px;
    font-size: 14px;
  }

  .nav-toggle { display: block; }
}

/* ===== SP対応（〜767px） ===== */
@media (max-width: 767px) {
  .ad-banner .ad-slot-inner { height: 50px; }

  #page-wrap { padding: 16px 12px; }

  .card { padding: 16px; }

  h1.page-title { font-size: 22px; }
}
