* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", sans-serif;
  background: #ffffff;
  color: #000000;
  line-height: 1.7;
  font-size: 15px;
}
a { color: #0645ad; text-decoration: underline; }
a:hover { color: #0b0080; }

/* ==========================================
   header
========================================== */
header.site-header {
  display: flex;
  flex-direction: column; /* ★縦並び（2行）にする */
  justify-content: center;
  align-items: flex-start; /* 左寄せ */
  position: relative; /* ボタンの配置基準 */
  padding: 12px 60px 12px 16px; /* 右側にボタン用の余白(60px)を確保 */
  border-bottom: 1px solid #cccccc;
}
.site-header .logo { 
  font-size: 16px; 
  font-weight: bold; 
  color: #000000; 
  text-decoration: none;
  line-height: 1.2;
}

/* ハンバーガーボタン */
.burger-btn { 
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%); 
  border: 1px solid #999999; 
  width: 36px; 
  height: 32px; 
  cursor: pointer; 
}
.burger-btn span { display: block; width: 18px; height: 2px; background: #333333; margin: 3px auto; }

/* H1のスタイル（行間を詰める） */
.header-h1 {
  margin: 0 0 0 0; /* ★ロゴとの行間（0にするとさらに詰まります） */
  font-size: 12px;
  font-weight: normal;
  color: #888888; 
  line-height: 1.4;
}
.header-h1 .h1-main {
  font-weight: normal;
  color: inherit;
}
.header-h1 .h1-sub {
  color: inherit;
}
/* burger menu */
.menu-overlay {
  display: none;
  position: fixed; top: 0; right: 0;
  width: 240px; height: 100%;
  background: #ffffff;
  border-left: 1px solid #cccccc;
  padding: 16px;
  z-index: 100;
}
.menu-overlay.open { display: block; }
.menu-overlay .close-btn { background: none; border: none; font-size: 14px; color: #333333; cursor: pointer; float: right; }
.menu-overlay h2 { font-size: 13px; color: #666666; margin: 20px 0 8px 0; clear: both; }
.menu-overlay ul { list-style: none; }
.menu-overlay li { margin-bottom: 8px; font-size: 14px; }

main { max-width: 640px; margin: 0 auto; padding: 24px 16px 60px; }

/* tool list (top page) */
.tool-list h1 { font-size: 18px; margin-bottom: 4px; }
.tool-list .lead { font-size: 13px; color: #555555; margin-bottom: 20px; }
.genre-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.genre-tabs button { background: #ffffff; border: 1px solid #999999; padding: 4px 10px; font-size: 12px; cursor: pointer; color: #333333; }
.genre-tabs button.active { background: #000000; color: #ffffff; border-color: #000000; }
.tool-item { border-bottom: 1px solid #e0e0e0; padding: 12px 0; }
.tool-item .genre-tag { display: inline-block; font-size: 11px; color: #666666; border: 1px solid #cccccc; padding: 1px 6px; margin-bottom: 4px; }
.tool-item .tool-name { font-size: 15px; display: block; }
.tool-item .tool-desc { font-size: 12px; color: #666666; }

hr.section-divider { border: none; border-top: 1px solid #cccccc; margin: 32px 0; }

/* individual tool page */
.tool-page h1 { font-size: 18px; margin-bottom: 12px; }
.tool-page .tool-body { border: 1px dashed #cccccc; padding: 20px; text-align: center; color: #999999; font-size: 13px; margin-bottom: 20px; }

/* ad slot */
.ad-slot { position: relative; border: 1px solid #cccccc; background: #f5f5f5; padding: 24px; text-align: center; font-size: 12px; color: #888888; margin-bottom: 24px; }
.ad-slot .ad-close { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; background: #ffffff; border: 1px solid #999999; font-size: 12px; cursor: pointer; line-height: 1; }

/* related links */
.related-links h2 { font-size: 13px; color: #666666; margin-bottom: 10px; }
.related-links ul { list-style: none; }
.related-links li { padding: 6px 0; border-bottom: 1px solid #eeeeee; font-size: 13px; }
.related-links .r-genre { font-size: 10px; color: #999999; margin-left: 4px; }

/* footer */
footer.site-footer { border-top: 1px solid #cccccc; padding: 16px; text-align: center; font-size: 11px; color: #888888; }
footer.site-footer a { color: #666666; margin: 0 6px; }

/* ==========================================
   アフィリエイト枠用スタイル (ad-slot.php)
========================================== */
.creator-ad-slot {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 16px;
  margin: 32px 0;
  position: relative;
}
.creator-ad-slot .ad-header {
  font-size: 14px;
  font-weight: bold;
  color: #0f172a;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.creator-ad-slot .ad-close {
  margin-left: auto; /* 右端に寄せる */
  background: #ffffff;
  border: 1px solid #999999;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1;
  color: #333;
}
.creator-ad-slot .ad-content {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.creator-ad-slot .ad-image-link {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.creator-ad-slot .ad-image-link img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.creator-ad-slot .ad-text {
  flex-grow: 1;
}
.creator-ad-slot .ad-item-name {
  display: block;
  font-size: 15px;
  font-weight: bold;
  color: #0645ad;
  margin-bottom: 6px;
  text-decoration: none;
}
.creator-ad-slot .ad-item-name:hover {
  text-decoration: underline;
}
.creator-ad-slot .ad-comment {
  font-size: 13px;
  color: #334155;
  line-height: 1.6;
  margin-bottom: 8px;
}
.creator-ad-slot .ad-sponsor-text {
  display: block;
  font-size: 11px;
  color: #94a3b8;
}

/* スマホ向け調整 */
@media (max-width: 480px) {
  .creator-ad-slot .ad-content {
    flex-direction: column;
  }
  .creator-ad-slot .ad-image-link {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }
}