/* === Mobile Only Ad === */
.mobile-only-ad { display: none; }
@media (max-width: 768px) {
  .mobile-only-ad {
    display: block;
    text-align: center;
    margin: 16px 0;
  }
  .mobile-only-ad a {
    display: block;
    background: linear-gradient(135deg, #e91e63, #ff5252);
    color: #fff !important;
    text-decoration: none !important;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 3px 12px rgba(233,30,99,0.3);
  }
}

/* === Ad Duo (横並び2バナー) === */
.ad-duo {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin: 16px 0;
}
.ad-duo img { max-width: 280px; height: auto; }
.ad-duo iframe { max-width: 300px; }
@media (max-width: 640px) {
  .ad-duo { flex-direction: column; align-items: center; }
  .ad-duo img { max-width: 100%; }
}

/* === FaceSwitch Banner Link === */
.fs-banner-link {
  display: block;
  text-decoration: none;
  margin: 0 auto;
  max-width: 360px;
}
.fs-banner {
  display: block;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #fff;
  text-align: center;
  padding: 18px 20px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: transform 0.15s, box-shadow 0.15s;
}
.fs-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.fs-banner small {
  font-size: 13px;
  font-weight: 600;
  color: #64b5f6;
  letter-spacing: 1px;
}

/* === CTA Box === */
.cta-box {
  background: #f8fafb;
  border: 2px solid #0a8f3c;
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  margin: 32px 0;
}
.cta-lead {
  font-size: 15px;
  font-weight: 700;
  color: #333;
  margin: 0 0 16px;
}
.cta-button {
  display: inline-block;
  background: #0a8f3c;
  color: #fff !important;
  text-decoration: none !important;
  font-size: 17px;
  font-weight: 800;
  padding: 14px 32px;
  border-radius: 8px;
  letter-spacing: 0.5px;
  transition: background 0.2s;
}
.cta-button:hover { background: #077a32; color: #fff !important; }
.cta-button:active { transform: scale(0.98); }
.cta-note {
  font-size: 12px;
  color: #888;
  margin: 12px 0 0;
}

/* === Notice Box === */
.notice-box {
  background: #f0f4f8;
  border-left: 4px solid #4a90d9;
  padding: 14px 18px;
  margin-bottom: 24px;
  border-radius: 4px;
  font-size: 0.92em;
  color: #444;
  line-height: 1.7;
}
.notice-box strong { color: #333; }

/* === Table of Contents === */
.toc {
  background: #f5f5f5;
  border: none;
  border-radius: 8px;
  padding: 20px 24px 16px;
  margin-bottom: 32px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.toc-header {
  font-weight: 700;
  font-size: 1em;
  color: #222;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e74c3c;
  display: flex;
  align-items: center;
  gap: 6px;
}
.toc-header::before {
  content: "\1F4CB";
  font-size: 1.1em;
}
.toc nav, .toc > ul, .toc #TableOfContents > ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc #TableOfContents ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.toc #TableOfContents > ul {
  counter-reset: toc-counter;
}
.toc #TableOfContents > ul > li {
  counter-increment: toc-counter;
  padding: 8px 0;
  border-bottom: 1px solid #e8e8e8;
}
.toc #TableOfContents > ul > li:last-child { border-bottom: none; }
.toc #TableOfContents > ul > li > a {
  color: #333;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94em;
  display: flex;
  align-items: baseline;
  gap: 8px;
  line-height: 1.5;
  transition: color 0.15s;
}
.toc #TableOfContents > ul > li > a::before {
  content: counter(toc-counter) ".";
  color: #e74c3c;
  font-weight: 700;
  flex-shrink: 0;
  min-width: 20px;
}
.toc #TableOfContents > ul > li > a:hover { color: #e74c3c; }
.toc #TableOfContents > ul > li > ul {
  padding-left: 28px;
  margin-top: 6px;
}
.toc #TableOfContents > ul > li > ul > li {
  padding: 4px 0;
  position: relative;
}
.toc #TableOfContents > ul > li > ul > li::before {
  content: "─";
  color: #ccc;
  position: absolute;
  left: -16px;
  font-size: 0.8em;
}
.toc #TableOfContents > ul > li > ul > li > a {
  color: #555;
  text-decoration: none;
  font-size: 0.88em;
  line-height: 1.5;
  transition: color 0.15s;
}
.toc #TableOfContents > ul > li > ul > li > a:hover { color: #e74c3c; }

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  color: #222;
  background: #fff;
  line-height: 1.8;
  font-size: 15px;
}
a { color: #222; text-decoration: none; }
a:hover { opacity: 0.7; }
img { max-width: 100%; height: auto; }

/* === Container === */
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* === Header === */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  position: relative;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.site-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.site-logo:hover { text-decoration: none; opacity: 0.85; }
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  background: #e53935; color: #fff;
  font-size: 20px; font-weight: 900; letter-spacing: 0;
  flex-shrink: 0;
}
.logo-text {
  font-size: 1.3rem; color: #111; font-weight: 900;
  letter-spacing: 2px; font-family: 'Helvetica Neue', Arial, sans-serif;
}
.logo-accent { color: #e53935; margin-left: 1px; }
.main-nav .nav-menu {
  list-style: none;
  display: flex;
  gap: 0;
}
.main-nav .nav-menu li a {
  display: block;
  padding: 8px 16px;
  color: #333;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.main-nav .nav-menu li a:hover {
  color: #000;
  opacity: 1;
}
.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; }

/* === Page Layout (Content + Sidebar) === */
.page-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  margin-top: 32px;
}

/* === Article Grid === */
.page-title { font-size: 1.1rem; margin-bottom: 20px; color: #000; font-weight: 700; padding-bottom: 10px; border-bottom: 2px solid #000; }
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.article-card {
  background: #fff;
  overflow: hidden;
  transition: opacity 0.2s;
}
.article-card:hover { opacity: 0.8; }
.article-card a { color: inherit; display: block; }
.article-card a:hover { text-decoration: none; opacity: 1; }
.card-image { aspect-ratio: 16/9; overflow: hidden; background: #f0f0f0; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: #e8e8e8;
  color: #bbb;
}
.card-body { padding: 10px 0; }
.card-meta { font-size: 0.7rem; color: #999; margin-bottom: 6px; display: flex; gap: 12px; align-items: center; }
.card-category {
  background: none;
  color: #666;
  padding: 0;
  font-size: 0.7rem;
  font-weight: 600;
}
.card-title { font-size: 0.9rem; line-height: 1.6; font-weight: 700; color: #111; }
.card-excerpt { display: none; }

/* === Single Article === */
.article-single { background: #fff; padding: 0; }
.article-header { margin-bottom: 24px; }
.article-meta { font-size: 0.75rem; color: #999; margin-bottom: 12px; display: flex; gap: 12px; align-items: center; }
.category-tag {
  background: none;
  color: #666;
  padding: 0;
  font-size: 0.75rem;
  font-weight: 600;
}
.category-tag:hover { text-decoration: none; opacity: 0.7; }
.article-title { font-size: 1.8rem; line-height: 1.5; color: #000; font-weight: 900; }
.article-description { font-size: 0.9rem; color: #666; margin-top: 10px; line-height: 1.7; }
.article-eyecatch { margin-bottom: 28px; overflow: hidden; }
.article-eyecatch--placeholder {
  aspect-ratio: 16/7;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 30%, #0f3460 60%, #1a1a2e 100%);
  position: relative;
  border-radius: 4px;
}
.article-eyecatch--placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(76,175,80,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.03) 0%, transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(76,175,80,0.1) 0%, transparent 60%);
}
.article-eyecatch--placeholder::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 40%;
  border: 1px solid rgba(76,175,80,0.2);
  border-bottom: none;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.eyecatch-overlay {
  position: absolute;
  bottom: 16px;
  left: 20px;
  z-index: 1;
}
.eyecatch-category {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  color: #fff;
  padding: 4px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  border-radius: 2px;
}
.article-body { font-size: 0.95rem; line-height: 2; color: #333; }
.article-body h2 {
  font-size: 1.2rem;
  margin: 40px 0 16px;
  padding: 0 0 8px;
  background: none;
  border-left: none;
  border-bottom: 1px solid #ddd;
  color: #000;
  font-weight: 800;
}
.article-body h3 { font-size: 1.05rem; margin: 28px 0 12px; color: #222; font-weight: 700; }
.article-body p { margin-bottom: 18px; }
.article-body blockquote {
  border-left: 3px solid #ccc;
  padding: 12px 20px;
  margin: 20px 0;
  background: #fafafa;
  color: #555;
  font-size: 0.9rem;
}
.article-body ul, .article-body ol { margin: 14px 0 14px 24px; }
.article-body li { margin-bottom: 8px; }

/* === Tags === */
.article-tags { margin-top: 32px; padding-top: 20px; border-top: 1px solid #e0e0e0; }
.tag {
  display: inline-block;
  padding: 4px 14px;
  margin: 3px;
  background: #f5f5f5;
  color: #555;
  border-radius: 2px;
  font-size: 0.75rem;
}
.tag:hover { background: #eee; text-decoration: none; }

/* === Related Articles === */
.related-articles { margin: 48px auto; }
.related-articles h2 { font-size: 1.1rem; margin-bottom: 20px; font-weight: 700; padding-bottom: 8px; border-bottom: 2px solid #000; }

/* === Sidebar === */
.sidebar { position: sticky; top: 72px; }
.sidebar-section {
  background: #fff;
  padding: 0;
  margin-bottom: 28px;
}
.sidebar-section h3 {
  font-size: 0.85rem;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #000;
  color: #000;
  font-weight: 700;
}
.category-list, .popular-list { list-style: none; }
.category-list li, .popular-list li { padding: 8px 0; border-bottom: 1px solid #f0f0f0; font-size: 0.82rem; }
.category-list li:last-child, .popular-list li:last-child { border-bottom: none; }
.category-list li a, .popular-list li a { color: #333; }
.category-list li a:hover, .popular-list li a:hover { color: #000; }

/* === Pagination === */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  padding: 24px 0;
}
.page-link {
  padding: 8px 20px;
  background: #000;
  color: #fff;
  border-radius: 2px;
  font-weight: 600;
  font-size: 0.8rem;
}
.page-link:hover { text-decoration: none; opacity: 0.8; }
.page-info { font-size: 0.8rem; color: #999; }

/* === Ad Slots === */
.ad-slot { margin: 24px 0; min-height: 50px; text-align: center; }
.ad-title-top { margin: 0 0 16px; }
.ad-title-top img { max-width: 100%; height: auto; }
.ad-slot img { max-width: 100%; height: auto; }
.ad-label { display: block; font-size: 10px; color: #999; letter-spacing: 0.05em; margin-bottom: 4px; }
.ad-middle img, .ad-bottom img { display: none; }
.ad-middle-link {
  display: block;
  background: #f8f8f8;
  border: 1px solid #e0e0e0;
  border-left: 4px solid #e74c3c;
  padding: 14px 18px;
  border-radius: 4px;
  color: #333;
  text-decoration: none;
  font-size: 0.95em;
  transition: background 0.15s;
}
.ad-middle-link:hover { background: #f0f0f0; }
.ad-sidebar img { max-width: 100%; }

/* サイドバーテキスト広告 */
.sidebar-text-ad {
  display: block;
  padding: 12px;
  background: #f8f8f8;
  border-left: 3px solid #e53935;
  margin-bottom: 4px;
  color: #222;
}
.sidebar-text-ad:hover { background: #f0f0f0; opacity: 1; }
.sidebar-text-ad-label { display: block; font-size: 10px; color: #e53935; font-weight: 700; letter-spacing: 0.1em; margin-bottom: 2px; }
.sidebar-text-ad-title { font-size: 0.85rem; font-weight: 700; }

/* === Affiliate Banner === */
.affiliate-banner { margin: 24px 0; text-align: center; }
.affiliate-banner .ad-label { display: block; font-size: 10px; color: #999; letter-spacing: 0.05em; margin-bottom: 4px; text-align: center; }
.affiliate-banner img { display: none; }
.affiliate-banner a { display: inline-block; }

/* === Footer === */
.site-footer {
  background: #f5f5f5;
  color: #666;
  padding: 28px 0;
  margin-top: 60px;
  border-top: 1px solid #e0e0e0;
}
.footer-inner { text-align: center; }
.footer-links { margin-bottom: 10px; }
.footer-links a { color: #555; margin: 0 14px; font-size: 0.8rem; }
.footer-links a:hover { color: #000; }
.copyright { font-size: 0.7rem; color: #999; }

/* === Responsive === */

/* 超大画面（1440px〜） */
@media (min-width: 1440px) {
  .container { max-width: 1200px; }
  .article-grid { grid-template-columns: repeat(3, 1fr); gap: 28px; }
  .page-layout { grid-template-columns: 1fr 320px; }
}

/* 大画面（1025px〜1439px）→ デフォルトスタイルが適用 */

/* タブレット横（769px〜1024px） */
@media (min-width: 769px) and (max-width: 1024px) {
  .container { max-width: 100%; padding: 0 24px; }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .page-layout { grid-template-columns: 1fr 240px; gap: 24px; }
  .article-title { font-size: 1.5rem; }
}

/* タブレット縦・スマホ横（481px〜768px） */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .page-layout { grid-template-columns: 1fr; gap: 24px; }
  .nav-toggle { display: block; }
  .main-nav .nav-menu {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
  }
  .main-nav .nav-menu.open { display: flex; }
  .article-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .article-single { padding: 0; }
  .article-title { font-size: 1.4rem; }
  .sidebar { position: static; }
  .card-title { font-size: 0.85rem; }
  .footer-links a { margin: 0 8px; font-size: 0.75rem; }
}

/* スマホ縦（〜480px） */
@media (max-width: 480px) {
  body { font-size: 14px; }
  .container { padding: 0 12px; }
  .header-inner { height: 50px; }
  .site-logo h1 { font-size: 1.1rem; }
  .page-layout { gap: 20px; margin-top: 20px; }
  .article-grid { grid-template-columns: 1fr; gap: 14px; }
  .article-title { font-size: 1.25rem; }
  .article-body { font-size: 0.9rem; line-height: 1.9; }
  .article-body h2 { font-size: 1.05rem; margin: 28px 0 12px; }
  .card-body { padding: 8px 0; }
  .card-title { font-size: 0.88rem; }
  .card-meta { font-size: 0.65rem; }
  .page-title { font-size: 1rem; }
  .sidebar-section h3 { font-size: 0.8rem; }
  .footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
  .footer-links a { margin: 0; }
  .ad-slot { margin: 16px 0; }
  .affiliate-banner { margin: 16px 0; }
}

/* 画像・メディアの最適化 */
.card-image img,
.article-eyecatch img,
.affiliate-banner img {
  width: 100%;
  height: auto;
  display: block;
}

/* タッチデバイス最適化 */
@media (hover: none) {
  .article-card:hover { opacity: 1; }
  a:hover { opacity: 1; }
  .main-nav .nav-menu li a { padding: 12px 16px; }
}

/* モバイル専用広告 */
.ad-mobile-only { display: none; text-align: center; margin-bottom: 16px; }
@media (max-width: 768px) {
  .ad-mobile-only { display: block; }
}

/* === 関連記事導線 === */
.pickup-link {
  display: block;
  margin: 24px 0;
  padding: 14px 16px;
  background: #f8f8f8;
  border-left: 3px solid #e53935;
  text-decoration: none;
  color: #222;
  transition: background 0.2s;
}
.pickup-link:hover { background: #f0f0f0; opacity: 1; }
.pickup-link-label { display: block; font-size: 10px; color: #e53935; font-weight: 700; letter-spacing: 0.1em; margin-bottom: 4px; }
.pickup-link-title { font-size: 0.9rem; font-weight: 700; line-height: 1.5; }

/* 印刷対応 */
@media print {
  .site-header, .site-footer, .sidebar, .ad-slot, .affiliate-banner,
  .pagination, .nav-toggle, .related-articles { display: none; }
  .page-layout { grid-template-columns: 1fr; }
  .article-single { box-shadow: none; }
  body { background: #fff; color: #000; font-size: 12pt; }
}
