/*
Theme Name: SIM乗り換えナビ（デモHTML再現） Fix27
Theme URI: https://example.com/
Author: ChatGPT
Description: site_demo.html を WordPress テーマとして再現するための最小テーマ（固定レイアウト＋記事一覧/記事詳細）。
Version: 1.2.7
Text Domain: sim-norikae
*/

:root {
    --primary: #0057FF;
    --blue: var(--primary);
    --primary-dark: #003DC2;
    --accent: #FF4D00;
    --bg: #F4F6FA;
    --surface: #FFFFFF;
    --text: #1A1A2E;
    --text-muted: #6B7280;
    --border: #E5E7EB;
    --tag-bg: #EEF3FF;
    --tag-color: #0057FF;
  }

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

  body {
    font-family: 'Noto Sans JP', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.7;
  }

  /* ======== HEADER ======== */
  header {
    background: var(--surface);
    border-bottom: 3px solid var(--primary);
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 16px rgba(0,87,255,0.08);
  }
  .header-inner {
    max-width: 1100px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px; height: 64px;
  }
  .logo {
    font-family: 'Oswald', sans-serif;
    font-size: 22px; font-weight: 700;
    color: var(--primary); letter-spacing: 0.5px;
    text-decoration: none;
    display: flex; align-items: center; gap: 8px;
  }
  .logo span.accent { color: var(--accent); }
  .logo-badge {
    background: var(--accent);
    color: white; font-size: 10px; font-family: 'Noto Sans JP', sans-serif;
    padding: 2px 6px; border-radius: 3px; font-weight: 700; letter-spacing: 0.5px;
  }
  nav { }
  nav .nav-links{
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
    padding: 0;
    align-items: center;
  }
  nav .nav-links li{ list-style: none; margin: 0; padding: 0; }
  nav a {
    padding: 8px 14px; font-size: 13px; font-weight: 500;
    color: var(--text-muted); text-decoration: none; border-radius: 6px;
    transition: all 0.15s;
  }
  nav a:hover { background: var(--tag-bg); color: var(--primary); }

  /* 現在ページのハイライト（WP標準クラス） */
  nav .current-menu-item > a,
  nav .current_page_item > a{
    background: var(--tag-bg);
    color: var(--primary);
  }

  /* ======== HERO ======== */
  .hero {
    background: linear-gradient(135deg, #0057FF 0%, #003DC2 50%, #0A0F3D 100%);
    color: white; padding: 60px 20px 50px;
    position: relative; overflow: hidden;
  }
  .hero::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23FFFFFF' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  }
  .hero-inner { max-width: 800px; margin: 0 auto; text-align: center; position: relative; }
  .hero-label {
    display: inline-block;
    background: rgba(255,77,0,0.9); color: white;
    font-size: 11px; font-weight: 700; letter-spacing: 1px;
    padding: 4px 12px; border-radius: 3px; margin-bottom: 16px;
  }
  .hero h1 {
    font-size: clamp(24px, 4vw, 40px); font-weight: 900;
    line-height: 1.3; margin-bottom: 16px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.2);
  }
  .hero p {
    font-size: 15px; opacity: 0.85; max-width: 560px;
    margin: 0 auto 28px;
  }
  .hero-stats {
    display: flex; gap: 32px; justify-content: center; flex-wrap: wrap;
  }
  .hero-stat { text-align: center; }
  .hero-stat .num {
    display: block; font-family: 'Oswald', sans-serif;
    font-size: 32px; font-weight: 700; color: #FFC940;
    line-height: 1;
  }
  .hero-stat .label { font-size: 12px; opacity: 0.75; margin-top: 4px; }

  /* ======== MAIN LAYOUT ======== */
  .container { max-width: 1100px; margin: 0 auto; padding: 40px 20px; }
  .layout { display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: start; }

  /* ======== SECTION HEADING ======== */
  .section-heading {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 20px;
  }
  .section-heading h2 {
    font-size: 18px; font-weight: 700;
  }
  .section-heading::before {
    content: ''; display: block;
    width: 4px; height: 22px;
    background: var(--primary); border-radius: 2px;
    flex-shrink: 0;
  }

  /* ======== ARTICLE CARD ======== */
  .card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 40px; }
  .card {
    background: var(--surface); border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden; transition: all 0.2s;
    cursor: pointer; text-decoration: none; color: inherit;
    display: block;
  }
  .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0,87,255,0.12);
    border-color: var(--primary);
  }
  .card-thumb {
    height: 130px; position: relative;
    display: flex; align-items: center; justify-content: center;
    font-size: 48px; overflow: hidden;
  }
  .card-thumb.blue { background: linear-gradient(135deg, #EEF3FF, #C7D9FF); }
  .card-thumb.orange { background: linear-gradient(135deg, #FFF3EE, #FFD6C2); }
  .card-thumb.green { background: linear-gradient(135deg, #EEFAF3, #C2EED6); }
  .card-thumb.purple { background: linear-gradient(135deg, #F3EEFF, #D6C2FF); }
  .card-tag {
    position: absolute; top: 10px; left: 10px;
    background: var(--primary); color: white;
    font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 4px;
  }
  .card-tag.orange { background: var(--accent); }
  .card-body { padding: 14px 16px 16px; }
  .card h3 { font-size: 14px; font-weight: 700; line-height: 1.5; margin-bottom: 6px; }
  .card p { font-size: 12px; color: var(--text-muted); line-height: 1.6; }
  .card-meta {
    display: flex; align-items: center; gap: 6px;
    margin-top: 10px; font-size: 11px; color: var(--text-muted);
  }
  .card-meta .dot { width: 3px; height: 3px; background: var(--border); border-radius: 50%; }

  /* ======== ARTICLE PAGE ======== */
  .article {
    background: var(--surface); border-radius: 12px;
    border: 1px solid var(--border); padding: 32px;
  }
  .article-header { margin-bottom: 28px; }
  .article-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
  .article-tag {
    background: var(--tag-bg); color: var(--tag-color);
    font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px;
  }
  .article-tag.orange { background: #FFF0EA; color: var(--accent); }
  .article h1 {
    font-size: clamp(18px, 2.5vw, 26px);
    font-weight: 900; line-height: 1.4; margin-bottom: 12px;
  }
  .article-meta {
    display: flex; align-items: center; gap: 12px;
    font-size: 12px; color: var(--text-muted);
    padding-bottom: 20px; border-bottom: 1px solid var(--border);
  }
  .article-meta .update {
    background: #F0FDF4; color: #15803D;
    padding: 2px 8px; border-radius: 4px; font-weight: 500;
  }

  /* Eyecatch */
  .article-eyecatch {
    margin: 18px 0 0;
  }
  .article-eyecatch img {
    width: 100%; height: auto; display: block;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 6px 18px rgba(0,0,0,.06);
  }

  /* TOC */
  .toc {
    background: var(--bg); border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 8px; padding: 18px 20px; margin: 24px 0;
  }
  .toc-title {
    font-size: 13px; font-weight: 700; color: var(--primary);
    margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
  }
  .toc ol { padding-left: 20px; }
  .toc li { font-size: 13px; margin: 4px 0; }
  .toc a { color: var(--text); text-decoration: none; }
  .toc a:hover { color: var(--primary); }

  /* Headings */
  .article h2 {
    font-size: 19px; font-weight: 900; margin: 36px 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    color: var(--primary-dark);
  }
  .article h3 {
    font-size: 16px; font-weight: 700; margin: 24px 0 10px;
    padding-left: 12px;
    border-left: 3px solid var(--accent);
    color: var(--text);
  }
  .article p { margin-bottom: 14px; }

  /* Table */
  .table-wrap { overflow-x: auto; margin: 18px 0; border-radius: 8px; border: 1px solid var(--border); }
  table { width: 100%; border-collapse: collapse; }
  th {
    background: var(--primary); color: white;
    padding: 10px 14px; font-size: 13px; font-weight: 700; text-align: left;
  }
  td { padding: 9px 14px; font-size: 13px; border-bottom: 1px solid var(--border); }
  tr:last-child td { border-bottom: none; }
  tr:nth-child(even) td { background: #F8FAFF; }
  td.good { color: #15803D; font-weight: 700; }
  td.bad { color: #DC2626; font-weight: 700; }

  /* Callout boxes */
  .callout {
    border-radius: 8px; padding: 16px 18px; margin: 20px 0;
    display: flex; gap: 12px; align-items: flex-start;
  }
  .callout.info { background: #EEF3FF; border: 1px solid #C7D9FF; }
  .callout.warn { background: #FFF8E6; border: 1px solid #FFD970; }
  .callout.good { background: #EEFAF3; border: 1px solid #86EFAC; }
  .callout.bad { background: #FFF0F0; border: 1px solid #FCA5A5; }
  .callout-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
  .callout-text { font-size: 13px; line-height: 1.65; }
  .callout-text strong { font-weight: 700; display: block; margin-bottom: 4px; font-size: 14px; }

  /* Affiliate CTA Button */
  .cta-block {
    background: linear-gradient(135deg, #0057FF, #003DC2);
    border-radius: 12px; padding: 24px; margin: 24px 0;
    color: white; text-align: center;
  }
  .cta-block .cta-label {
    font-size: 11px; font-weight: 700; letter-spacing: 1px;
    opacity: 0.8; margin-bottom: 6px;
  }
  .cta-block .cta-title { font-size: 17px; font-weight: 900; margin-bottom: 14px; }
  .cta-btn {
    display: inline-block;
    background: #FFC940; color: #1A1A2E;
    font-size: 15px; font-weight: 900; padding: 13px 32px;
    border-radius: 8px; text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 16px rgba(255,201,64,0.4);
  }
  .cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,201,64,0.5);
  }
  .cta-block .cta-note { font-size: 11px; opacity: 0.7; margin-top: 8px; }

  /* Compare table highlight */
  .best-badge {
    display: inline-block;
    background: var(--accent); color: white;
    font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 3px;
    margin-left: 4px; vertical-align: middle;
  }

  /* ======== SIDEBAR ======== */
  .sidebar { display: flex; flex-direction: column; gap: 20px; }
  .widget {
    background: var(--surface); border-radius: 12px;
    border: 1px solid var(--border); overflow: hidden;
  }
  .widget-head {
    background: var(--primary); color: white;
    padding: 10px 16px; font-size: 13px; font-weight: 700;
  }
  .widget-body { padding: 16px; }
  .rank-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
  .rank-item { display: flex; align-items: flex-start; gap: 10px; }
  .rank-num {
    width: 24px; height: 24px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 900; flex-shrink: 0;
  }
  .rank-num.gold { background: #FFC940; color: #1A1A2E; }
  .rank-num.silver { background: #C0C0C0; color: white; }
  .rank-num.bronze { background: #CD7F32; color: white; }
  .rank-item a { font-size: 13px; color: var(--text); text-decoration: none; line-height: 1.5; }
  .rank-item a:hover { color: var(--primary); }
  .rank-item .price { font-size: 11px; color: var(--text-muted); }

  .check-list { list-style: none; }
  .check-list li {
    padding: 6px 0; font-size: 13px; border-bottom: 1px solid var(--border);
    display: flex; align-items: baseline; gap: 6px;
  }
  .check-list li:last-child { border-bottom: none; }
  .check-list .chk { color: var(--primary); font-weight: 700; flex-shrink: 0; }

  /* ======== BREADCRUMB ======== */
  .breadcrumb {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; color: var(--text-muted);
    padding: 12px 0 0; max-width: 1100px; margin: 0 auto; padding: 12px 20px 0;
  }
  .breadcrumb a { color: var(--primary); text-decoration: none; }
  .breadcrumb span { color: var(--border); }

  /* ======== FOOTER ======== */
  footer {
    background: #1A1A2E; color: rgba(255,255,255,0.6);
    padding: 40px 20px 24px; margin-top: 60px;
  }
  .footer-inner { max-width: 1100px; margin: 0 auto; }
  .footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 32px; }
  .footer-logo {
    font-family: 'Oswald', sans-serif; font-size: 20px; font-weight: 700;
    color: white; margin-bottom: 10px;
  }
  .footer-logo span { color: #FFC940; }
  .footer-desc { font-size: 12px; line-height: 1.8; }
  .footer-col h4 { color: white; font-size: 13px; font-weight: 700; margin-bottom: 12px; }
  .footer-col a { display: block; font-size: 12px; color: rgba(255,255,255,0.5); text-decoration: none; margin-bottom: 6px; }
  .footer-col a:hover { color: white; }
  .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 20px; font-size: 11px; text-align: center;
  }

  /* ======== DEMO OVERLAY ======== */
  .demo-bar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 999;
    background: #1A1A2E; color: white;
    padding: 12px 20px;
    display: flex; align-items: center; justify-content: center; gap: 16px;
    border-top: 3px solid var(--accent);
    flex-wrap: wrap;
  }
  .demo-bar .label {
    background: var(--accent); color: white;
    font-size: 11px; font-weight: 900; padding: 3px 10px;
    border-radius: 4px; letter-spacing: 0.5px;
  }
  .demo-bar .msg { font-size: 13px; }
  .demo-bar strong { color: #FFC940; }

  @media (max-width: 768px) {
    .layout { grid-template-columns: 1fr; }
    .card-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    nav { display: none; }
  }

/* ===== WordPress補助スタイル ===== */
img { max-width: 100%; height: auto; }
a { color: inherit; }
.screen-reader-text{ position:absolute; left:-10000px; top:auto; width:1px; height:1px; overflow:hidden; }

/* WordPressブロックの余白が邪魔な場合の最低限 */
.wp-block { margin-bottom: 14px; }
.article-content > *:last-child { margin-bottom: 0; }

/* 目次（JS生成） */
.toc a { cursor: pointer; }

/* 検索フォーム */
.widget-search .searchform { display:flex; gap:8px; }
.widget-search input[type="search"]{
  width:100%; padding:10px 12px; border:1px solid var(--border); border-radius:8px;
}
.widget-search button{
  background:var(--primary); color:#fff; border:0; border-radius:8px; padding:10px 14px; cursor:pointer;
}


/* Button variant (Load more) */
button.cta-btn{
  border: none;
  cursor: pointer;
}
button.cta-btn:disabled{
  opacity: .6;
  cursor: default;
}

/* =========================================================
 *  Content UI blocks (sn_box / sn_cta)
 * ========================================================= */

.sn-box,
.wp-block-group.is-style-sn-box-info,
.wp-block-group.is-style-sn-box-success,
.wp-block-group.is-style-sn-box-warning,
.wp-block-group.is-style-sn-box-danger,
.wp-block-group.is-style-sn-box-gray{
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 18px 0;
  position: relative;
}

.sn-box::before,
.wp-block-group.is-style-sn-box-info::before,
.wp-block-group.is-style-sn-box-success::before,
.wp-block-group.is-style-sn-box-warning::before,
.wp-block-group.is-style-sn-box-danger::before,
.wp-block-group.is-style-sn-box-gray::before{
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 4px;
  border-radius: 999px;
  background: var(--primary);
}

.sn-box__head{
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  margin-bottom: 10px;
  line-height: 1.25;
}

.sn-box__icon{
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 16px;
  flex: 0 0 auto;
}

.sn-box__title{ font-size: 14px; }

.sn-box__body p:last-child,
.sn-box__body ul:last-child,
.sn-box__body ol:last-child{ margin-bottom: 0; }

/* Lists inside sn-box: keep bullets inside the box */
.sn-box__body ul,
.sn-box__body ol{
  margin: 10px 0 0;
  padding-left: 0;
  list-style-position: inside;
}
.sn-box__body li{
  margin: 6px 0;
}
.sn-box__body ul li::marker,
.sn-box__body ol li::marker{
  color: rgba(0,0,0,.55);
}

/* Blue / Info */
.sn-box--info,
.wp-block-group.is-style-sn-box-info{
  background: #EAF2FF;
  border-color: #CFE0FF;
}
.sn-box--info::before,
.wp-block-group.is-style-sn-box-info::before{ background: var(--primary); }
.sn-box--info .sn-box__head{ color: var(--primary); }
.sn-box--info .sn-box__icon{ background: rgba(0,0,0,.06); }

/* Green / Success */
.sn-box--success,
.wp-block-group.is-style-sn-box-success{
  background: #E9FBF0;
  border-color: #C7F0D6;
}
.sn-box--success::before,
.wp-block-group.is-style-sn-box-success::before{ background: #1E9E57; }
.sn-box--success .sn-box__head{ color: #0B7A3D; }
.sn-box--success .sn-box__icon{ background: rgba(30,158,87,.12); }

/* Yellow / Warning */
.sn-box--warning,
.wp-block-group.is-style-sn-box-warning{
  background: #FFF7E6;
  border-color: #FFE0A8;
}
.sn-box--warning::before,
.wp-block-group.is-style-sn-box-warning::before{ background: #F0A000; }
.sn-box--warning .sn-box__head{ color: #A36B00; }
.sn-box--warning .sn-box__icon{ background: rgba(240,160,0,.15); }

/* Red / Danger */
.sn-box--danger,
.wp-block-group.is-style-sn-box-danger{
  background: #FFECEC;
  border-color: #FFD0D0;
}
.sn-box--danger::before,
.wp-block-group.is-style-sn-box-danger::before{ background: #E25555; }
.sn-box--danger .sn-box__head{ color: #B80000; }
.sn-box--danger .sn-box__icon{ background: rgba(226,85,85,.15); }

/* Gray / Note */
.sn-box--gray,
.wp-block-group.is-style-sn-box-gray{
  background: #F4F6FA;
  border-color: #E1E6EF;
}
.sn-box--gray::before,
.wp-block-group.is-style-sn-box-gray::before{ background: #8A96A8; }
.sn-box--gray .sn-box__head{ color: #263047; }
.sn-box--gray .sn-box__icon{ background: rgba(0,0,0,.06); }

/* CTA */
.sn-cta,
.wp-block-group.is-style-sn-cta{
  background: linear-gradient(180deg, #0B62DD 0%, #084DB3 100%);
  border-radius: 16px;
  padding: 18px 18px 16px;
  margin: 28px 0;
  color: #fff;
  text-align: center;
  border: 1px solid rgba(255,255,255,.12);
}

.sn-cta__tag{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255,255,255,.14);
  padding: 6px 10px;
  border-radius: 999px;
}

.sn-cta__title{
  margin: 12px 0 14px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .02em;
}

.sn-cta__desc{
  margin: 0 auto 14px;
  max-width: 740px;
  text-align: left;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.7;
}

.sn-cta__desc p:last-child{ margin-bottom: 0; }

.sn-cta__btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 12px;
  background: #FFC940;
  color: #111;
  font-weight: 900;
  text-decoration: none;
  border: 2px solid rgba(0,0,0,.08);
  box-shadow: 0 6px 18px rgba(0,0,0,.20);
}

.sn-cta__btn:hover{ filter: brightness(0.98); }

.sn-cta__btn--disabled{
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}

.sn-cta__note{
  margin-top: 10px;
  font-size: 12px;
  opacity: .92;
}

@media (max-width: 768px) {
  .sn-box,
  .wp-block-group.is-style-sn-box-info,
  .wp-block-group.is-style-sn-box-success,
  .wp-block-group.is-style-sn-box-warning,
  .wp-block-group.is-style-sn-box-danger,
  .wp-block-group.is-style-sn-box-gray{
    padding: 12px 12px;
  }
  .sn-cta,
  .wp-block-group.is-style-sn-cta{ padding: 16px 14px 14px; }
}



/* =========================================================
   Fix7: 記事本文のリストマーカー位置を調整（黒点が左に出すぎる問題）
   ========================================================= */
.article-content ul,
.article-content ol{
  margin: 10px 0 14px;
  padding-left: 1.35em; /* マーカーが本文ボックス外に出ないように */
  list-style-position: outside;
}
.article-content li{ margin: 6px 0; }

/* sn-box 内はマーカーを内側に（枠からはみ出さない） */
.sn-box__body ul,
.sn-box__body ol{
  padding-left: 0;
  list-style-position: inside;
}

/* =========================================================
   向いている/向いていない人 テーブル
   使い方：<table class="sn-fit-table"> ... </table>
   ========================================================= */
.sn-fit-table{
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.sn-fit-table thead th{
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 10px 12px;
  font-weight: 800;
}
.sn-fit-table tbody th,
.sn-fit-table tbody td{
  padding: 12px 12px;
  border-top: 1px solid var(--border);
  vertical-align: top;
  font-size: 14px;
  line-height: 1.65;
}
.sn-fit-table tbody th{
  width: 140px;
  white-space: nowrap;
  font-weight: 800;
}
.sn-fit-table .is-good th{ color: #1f7a3d; }
.sn-fit-table .is-bad  th{ color: #b42318; }
.sn-fit-table .fit-badge{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sn-fit-table .fit-icon{
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
}
.sn-fit-table .is-good .fit-icon{ background: #e9f8ef; color: #1f7a3d; border: 1px solid #b7ebc6; }
.sn-fit-table .is-bad  .fit-icon{ background: #fff0f0; color: #b42318; border: 1px solid #f3b4b4; }

/* Global pill button (back-to-list & load more) */
.back-to-list,
button.back-to-list{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f3f5f9;
  color: #111827;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
}
.back-to-list:hover,
button.back-to-list:hover{
  filter: brightness(0.98);
}
button.back-to-list:disabled{
  opacity: 0.6;
  cursor: not-allowed;
}

.load-more-wrap{
  margin-top: 16px;
  text-align: center;
}
.load-more-wrap .back-to-list,
.load-more-wrap button.back-to-list{
  display: block;
  width: fit-content;
  margin: 14px auto 0;
}


/* =========================================================
   記事末尾：注意書き＆一覧に戻るボタン
   ========================================================= */
.article-footer{
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.article-footer .article-note{
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 12px;
}
.article-footer .back-to-list{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f3f5f9;
  color: #111827;
  font-weight: 700;
  text-decoration: none;
}
.article-footer .back-to-list:hover{
  filter: brightness(0.98);
}


/* === Fix8: article footer center, fit-table header, list indent, recommended badge === */
.article-footer .back-to-list { display: block; width: fit-content; margin: 14px auto 0; }

/* General lists in article content: keep bullets inside content area */
.article-content ul,
.article-content ol {
  margin-left: 0;
  padding-left: 1.35em;
}
.article-content ul { list-style-position: inside; }
.article-content ul li::marker { color: #111; }

/* Fit table (向いている/向いていない) */
.sn-fit-table { width: 100%; border-collapse: collapse; }
.sn-fit-table thead th {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  text-align: center;
}
.sn-fit-table tbody th {
  background: transparent;
  color: #111;
  font-weight: 700;
  width: 160px;
  white-space: nowrap;
}
.sn-fit-table tbody td { color: #111; }

/* badge in fit table */
.fit-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.fit-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-weight: 900;
  font-size: 14px;
  line-height: 1;
}
.sn-fit-table tr.is-good .fit-icon { background: #e7f7ee; color: #0f8b3d; border: 1px solid #bfead0; }
.sn-fit-table tr.is-bad .fit-icon { background: #ffe9e9; color: #c51818; border: 1px solid #ffb7b7; }

/* Recommended badge in comparison table */
.rec-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: #ff6a00;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  border-radius: 4px; /* slight rounding; set to 0 for perfect square */
  vertical-align: middle;
}


/* Sidebar category list (emoji + counts) */
.sidebar .cat-item{
  display:flex;
  align-items:center;
  gap:8px;
  padding:6px 0;
}
.sidebar .cat-emoji{
  width:1.6em;
  text-align:center;
  flex:0 0 1.6em;
}
.sidebar .cat-link{
  color:var(--primary);
  font-size:13px;
}

.sidebar .cat-list{list-style:none;margin:0;padding:0;}