@charset "UTF-8";
/* 全ページ共通：既存の黒・赤・クリーム色を引き継ぐ上書き用スタイル。 */
:root {
  --sf-bg: #101413;
  --sf-fg: #f3f2ee;
  --sf-muted: #b7bfba;
  --sf-line: #36423b;
  --sf-red: #ff6252;
  --sf-panel: #19211d;
  --sf-paper: #f5f4f0;
  --sf-ink: #202622;
}

/* マストヘッド：文字を追加せず、既存のサイト名と説明を主役にする。 */
#header-in {
  min-height: 164px;
  padding-top: 32px;
  padding-bottom: 30px;
  gap: 16px;
}
#header-in .logo .site-name-text {
  font-size: clamp(30px, 4.6vw, 64px);
  line-height: 1.12;
  letter-spacing: -.055em;
}
#header-in .logo a { text-decoration: none; }
#header-in .tagline {
  margin: 0;
  color: #d2d8d3;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: .075em;
  text-align: center;
}

/* 分野のメニュー：折り返しと44pxの操作領域で、指でも選びやすくする。 */
.sfd-nav {
  gap: 10px;
  padding: 16px 0;
  border-top-color: var(--sf-line);
  border-bottom-color: var(--sf-line);
}
.sfd-nav > a,
#navi-in .menu-header > li > a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 17px;
  border: 1px solid var(--sf-line);
  border-radius: 8px;
  background: var(--sf-panel);
  color: var(--sf-fg);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
}
.sfd-nav > .sfd-current,
#navi-in .current-menu-item > a {
  border-color: #b63227;
  background: #b63227;
  color: #fff;
}
.sfd-nav .sfd-current::after { content: none; }
#navi-in .menu-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 0 16px 18px;
}
#navi-in .menu-header > li { width: auto; height: auto; list-style: none; margin: 0; }
#navi-in .menu-header { margin: 0; }
#navi-in .menu-header > li > a { box-sizing: border-box; }
/* トップも既存の共通メニューを使い、トレンドへの入口を常に表示する。 */
body.home #navi, body.home #navi-in { display: block; }
body.home .sfd-nav > a:not(:last-of-type) { display: none; }
body.home .sfd-nav { justify-content: flex-end; min-height: 0; padding: 8px 0; border-top: 0; }
#navi-in .caption-wrap { line-height: inherit; }
.sfd-search summary {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--sf-line);
  border-radius: 8px;
}
.sfd-search form { border-radius: 10px; z-index: 5; }
.sfd-search input { font-size: 16px; }
.sfd-search button { min-height: 44px; border-radius: 6px; }

/* トップ：余白と画像の境目を統一し、見出しを読み取りやすくする。 */
.sfd-magazine { padding-top: 24px; }
.sfd-hero { gap: 24px; }
.sfd-card {
  border: 1px solid var(--sf-line);
  border-radius: 12px;
  background: var(--sf-panel);
  box-shadow: 0 6px 20px #0002;
}
.sfd-card > a { border-radius: inherit; }
.sfd-card .sfd-image { border-radius: 11px 11px 0 0; }
.sfd-card .sfd-copy { padding: 18px; }
.sfd-card h3 { font-size: 17px; line-height: 1.75; }
.sfd-card .sfd-category { font-size: 12px; }
.sfd-card time { font-size: 12px; }
.sfd-lead .sfd-image { border-radius: inherit; }
.sfd-lead .sfd-copy { padding: 32px; }
.sfd-lead h3 {
  font-size: clamp(29px, 3.1vw, 44px);
  line-height: 1.45;
  text-wrap: pretty;
}
.sfd-lead .sfd-excerpt { color: #eceeea; font-size: 14px; }
.sfd-news { gap: 12px; }
.sfd-brief,
.sfd-brief:first-child,
.sfd-brief:last-child { padding: 12px; border: 1px solid var(--sf-line); }
.sfd-brief > a { gap: 14px; }
.sfd-brief .sfd-image { border-radius: 7px; aspect-ratio: 16 / 10; }
.sfd-brief .sfd-copy { padding: 0; }
.sfd-brief h3 { font-size: 15px; line-height: 1.65; }
.sfd-section,
.sfd-topics-section { margin-top: 52px; }
.sfd-section-head { padding-bottom: 16px; }
.sfd-section-head h2 { letter-spacing: -.035em; }
.sfd-section-head h2 small { color: var(--sf-muted); font-size: 13px; }
.sfd-topic-links { gap: 12px; }
.sfd-topic-links > a {
  padding: 16px;
  border: 1px solid var(--sf-line);
  border-radius: 8px;
  background: var(--sf-panel);
  font-size: 15px;
}

/* 2ページ目以降：重複するトップ用一覧を避け、既存のページ別一覧を表示する。 */
body.home.paged:has(.sfd-magazine) #content { display: block; }
body.home.paged .sfd-magazine { display: none; }

/* 一覧・関連記事：レイアウトの列数はテーマに任せ、カードの面を整える。 */
.entry-card-wrap,
.related-entry-card-wrap,
.widget-entry-card-link {
  border: 1px solid var(--sf-line);
  border-radius: 10px;
  background: var(--sf-panel);
  color: var(--sf-fg);
  box-shadow: 0 4px 16px #0002;
}
.entry-card-wrap, .related-entry-card-wrap, .widget-entry-card-link { display: block; text-decoration: none; }
.entry-card, .related-entry-card, .widget-entry-card { display: flex; gap: 14px; align-items: flex-start; }
.entry-card-wrap .entry-card-thumb,
.related-entry-card-wrap .related-entry-card-thumb,
.widget-entry-card-link .widget-entry-card-thumb { float: none; flex: 0 0 34%; width: 34%; margin: 0; }
.entry-card-wrap .entry-card-content,
.related-entry-card-wrap .related-entry-card-content,
.widget-entry-card-link .widget-entry-card-content { flex: 1; width: auto; margin: 0; }
.entry-card-wrap { padding: 16px; margin-bottom: 18px; }
.entry-card-wrap:hover { background: var(--sf-panel); color: var(--sf-fg); }
.entry-card-title { font-size: 21px; line-height: 1.65; }
.entry-card-content,
.related-entry-card-content,
.widget-entry-card-content { min-width: 0; overflow-wrap: anywhere; }
.entry-card-snippet { font-size: 14px; line-height: 1.85; }
.entry-card-thumb,
.related-entry-card-thumb,
.widget-entry-card-thumb { aspect-ratio: 16 / 9; }
.entry-card-thumb img,
.related-entry-card-thumb img,
.widget-entry-card-thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 7px;
}
.related-entry-card-wrap { padding: 12px; }
.related-entry-card-wrap .related-entry-card-title {
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--sf-fg);
  font-size: 16px;
  line-height: 1.75;
}
.related-entry-card-snippet { color: var(--sf-muted); }
#sidebar .widget-entry-card-link { padding: 12px; margin-bottom: 10px; }
#sidebar .widget-entry-card-title { font-size: 14px; line-height: 1.75; }
#sidebar .widget-title { border-radius: 6px; }
.archive-title {
  padding: 0 0 20px;
  border: 0;
  border-bottom: 2px solid #b63227;
  background: transparent;
  color: var(--sf-fg);
  font-size: clamp(26px, 3vw, 38px);
}
.stfm-category-intro { color: #cbd1cc; font-size: 16px; }

/* 本文とサイドバー：既存のflex幅指定を生かし、内側の余白を幅に含める。 */
#content-in, #main, #sidebar { box-sizing: border-box; }
#content-in { margin-inline: auto; }
@media (min-width: 1024px) {
  #content-in { display: flex; align-items: flex-start; }
}
@media (max-width: 1023px) {
  #content-in { display: block; }
  #main { width: 100%; margin: 0; }
  #sidebar { width: 100%; max-width: none; margin: 0; }
}
.article img:not(ins.adsbygoogle *, .google-auto-placed *),
.pager-post-navi img:not(ins.adsbygoogle *, .google-auto-placed *) { max-width: 100%; height: auto; }

/* 記事と固定ページ：既存の横並び幅を変えず、明るい本文欄を保つ。 */
.single .main,
.page:not(.home):not(.stfm-trends-page) .main {
  border: 1px solid #deded5;
  border-radius: 14px;
  background: var(--sf-paper);
  color: var(--sf-ink);
}
.article .entry-title {
  margin-bottom: 24px;
  font-size: clamp(28px, 2.8vw, 40px);
  line-height: 1.55;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.article .entry-content { font-size: 18px; line-height: 1.95; overflow-wrap: anywhere; }
.article .entry-content p { margin-bottom: 1.65em; }
.article .entry-content a { text-underline-offset: .2em; text-decoration-thickness: 1px; }
.article .entry-content h2 {
  margin: 2.4em 0 1.1em;
  padding: 16px 20px;
  border: 0;
  border-left: 4px solid #b63227;
  border-radius: 0 8px 8px 0;
  background: #eae8e1;
  color: var(--sf-ink);
  font-size: clamp(23px, 2.2vw, 28px);
  line-height: 1.6;
}
.article .entry-content h3 {
  margin: 2em 0 1em;
  padding: 0 0 12px;
  border: 0;
  border-bottom: 2px solid #c9c9bf;
  background: transparent;
  font-size: 21px;
  line-height: 1.7;
}
.article .entry-content :is(h2, h3) { scroll-margin-top: 60px; }
.article .toc {
  max-width: 100%;
  padding: 20px 24px;
  border-radius: 10px;
  background: #eeede7;
  font-size: 16px;
  line-height: 1.85;
}
.toc .toc-title { padding: 8px 0; font-weight: 700; }
.toc .toc-list li { margin: .45em 0; }
.stfm-sources {
  margin-top: 44px;
  padding: 0 20px 16px;
  border: 1px solid #d2d0c9;
  border-radius: 10px;
  background: #eeede7;
  font-size: 15px;
  line-height: 1.9;
}
.article .stfm-sources h2 { margin-top: 0; background: transparent; font-size: 21px; }
.stfm-sources li { margin: .8em 0; }
.stfm-sources small,
.stfm-eyecatch-credit { color: #595f59; }
.stfm-eyecatch-credit, .stfm-credit, .stfm-credit a { opacity: 1; }
.stfm-eyecatch-credit { font-size: 13px; }
.stfm-credit, .stfm-credit a { font-size: inherit; }
.article .entry-content table:not(.stfm-trend-table) {
  width: 100%;
  table-layout: fixed;
  font-size: .9em;
  line-height: 1.75;
}
.article .entry-content :is(th, td) { padding: 12px; border-color: #d2d0c9; }
.article .entry-content th { background: #eae8e1; }
.stfm-trend-table-wrap:not(:has(ins.adsbygoogle, .google-auto-placed, iframe)):not(ins.adsbygoogle *, .google-auto-placed *) {
  overflow-x: auto;
  border: 1px solid #d2d0c9;
  border-radius: 8px;
}
.stfm-trend-table { margin: 0; }
.stfm-trend-table caption { padding: 12px; }
.single .breadcrumb,
.page .breadcrumb { font-size: 13px; }
body:is(.category, .tag, .home) #main .breadcrumb,
body:is(.category, .tag, .home) #main .breadcrumb :is(a, .breadcrumb-caption, .fa) {
  color: var(--sf-muted) !important;
}

/* トレンド：黒い面に情報を整理し、順位・解説・出典を読みやすくする。 */
.stfm-trends-page #main { border-radius: 0; }
.stfm-trends-page .article .entry-content h2,
.stfm-trends-page .article .entry-content h3 { color: var(--sf-fg); background: transparent; }
.stfm-trends-page .article .toc { background: var(--sf-panel); }
.stfm-trends { border-radius: 12px; padding: 24px; }
.stfm-trends-page .stfm-trends { background: var(--sf-panel); border-color: var(--sf-line); }
.stfm-trends .stfm-trend { gap: 14px; padding: 20px 0; }
.stfm-trend-rank { border-radius: 8px; font-variant-numeric: tabular-nums; }
.stfm-trend-word { font-size: 1.12em; }
.stfm-trends p.stfm-trend-note { font-size: 16px; line-height: 1.9; }
.stfm-trends-page .stfm-trends-updated,
.stfm-trends-page .stfm-trends-lead { color: var(--sf-muted); }
.stfm-trends .stfm-trend-source { opacity: 1; text-underline-offset: 3px; }
.stfm-trends-page .article .entry-content .stfm-trends-title { margin-top: 0; font-size: 24px; }
.stfm-trends-page .article .entry-content .stfm-trends-subtitle { font-size: 18px; }
.stfm-trends-page .article .entry-content th { background: #242e28; }

/* ページ送りとフッター：長い一覧でも、次のページと運営情報を探しやすくする。 */
.sfd-pages,
.pagination { flex-wrap: wrap; gap: 8px; }
.sfd-pages .page-numbers,
.pagination .page-numbers,
.pagination-next-link {
  min-width: 44px;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid var(--sf-line);
  border-radius: 8px;
  background: var(--sf-panel);
  color: var(--sf-fg);
  line-height: 1.6;
}
.sfd-pages .current,
.pagination .current { border-color: #b63227; background: #b63227; color: #fff; }
#navi-footer .menu-footer { display: flex; flex-wrap: wrap; gap: 8px 20px; }
#navi-footer a { display: inline-block; padding: 12px 0; font-size: 14px; }
.footer { padding-top: 36px; padding-bottom: 36px; }

/* キーボード操作：管理バーには指定せず、背景に合わせた明確なフォーカス。 */
:where(#header, #navi, .sfd-shell, #main, #sidebar, #footer, .mobile-menu-buttons, .menu-content)
  :is(a, button, input, select, textarea, summary, label[for]):focus-visible {
  outline: 3px solid var(--sf-red);
  outline-offset: 4px;
}
.article :is(a, button, input, select, textarea, summary, label[for]):focus-visible {
  outline-color: #a42c22;
}
.stfm-trends-page .article :focus-visible { outline-color: var(--sf-red); }

/* 軽い演出：広告自身・その子孫・広告を含む親には一切適用しない。 */
@media (prefers-reduced-motion: no-preference) {
  :is(.sfd-card, .entry-card-wrap, .related-entry-card-wrap, .widget-entry-card-link)
    :is(.sfd-image, .entry-card-thumb, .related-entry-card-thumb, .widget-entry-card-thumb)
    :is(img):not(ins.adsbygoogle *, .google-auto-placed *, iframe) {
    transition: transform .28s ease;
  }
  html.stfm-motion .stfm-motion-item:not(:has(ins.adsbygoogle, .google-auto-placed, iframe)):not(ins.adsbygoogle, .google-auto-placed, iframe, ins.adsbygoogle *, .google-auto-placed *) {
    transition: transform .45s cubic-bezier(.2,.7,.3,1), opacity .45s ease;
  }
  html.stfm-motion .stfm-motion-pending:not(:has(ins.adsbygoogle, .google-auto-placed, iframe)):not(ins.adsbygoogle, .google-auto-placed, iframe, ins.adsbygoogle *, .google-auto-placed *) {
    opacity: 0;
    transform: translateY(14px);
  }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  :is(.sfd-card, .entry-card-wrap, .related-entry-card-wrap, .widget-entry-card-link):not(:has(ins.adsbygoogle, .google-auto-placed, iframe)):not(ins.adsbygoogle *, .google-auto-placed *) {
    transition: transform .25s ease;
  }
  :is(.sfd-card, .entry-card-wrap, .related-entry-card-wrap, .widget-entry-card-link):not(:has(ins.adsbygoogle, .google-auto-placed, iframe)):not(ins.adsbygoogle *, .google-auto-placed *):hover {
    transform: translateY(-3px);
  }
  .sfd-card:not(:has(ins.adsbygoogle, .google-auto-placed, iframe)):not(ins.adsbygoogle *, .google-auto-placed *):hover .sfd-image img { transform: scale(1.035); }
}

/* スマートフォン：本文18pxを保ち、カードは1列でタイトルを読みやすくする。 */
@media (max-width: 767px) {
  #header-in { min-height: 138px; padding: 26px 16px; gap: 14px; }
  #header-in .logo .site-name-text { font-size: clamp(28px, 7.2vw, 44px) !important; }
  #header-in .tagline { font-size: 13px; letter-spacing: .025em; }
  .sfd-shell { padding: 0 16px; }
  .sfd-nav { gap: 8px; padding: 12px 0; }
  .sfd-nav > a { padding: 10px 13px; font-size: 13px; }
  .sfd-search { margin-left: 0; }
  .sfd-grid,
  .sfd-news { grid-template-columns: 1fr; gap: 16px; }
  .sfd-brief > a { display: grid; grid-template-columns: 34% minmax(0, 1fr); }
  .sfd-brief .sfd-copy { padding: 0; }
  .sfd-lead .sfd-copy { min-height: 400px; padding: 24px; }
  .sfd-lead h3 { font-size: 29px; }
  .sfd-card:not(.sfd-lead) h3 { font-size: 17px; }
  .sfd-brief:not(.sfd-lead) h3 { font-size: 15px; }
  .sfd-section,
  .sfd-topics-section { margin-top: 36px; }
  .sfd-section-head { gap: 12px; }
  .sfd-section-head > a { white-space: normal; font-size: 12px; }
  .sfd-topic-links { gap: 10px; }
  .sfd-topic-links > a { padding: 13px; font-size: 14px; }
  .single .main,
  .page:not(.home):not(.stfm-trends-page) .main { padding: 24px 18px; border-radius: 10px; }
  .article .entry-title { font-size: 28px; }
  .article .entry-content { font-size: 18px; line-height: 1.95; }
  .article .entry-content h2 { padding: 14px; font-size: 23px; }
  .article .entry-content h3 { font-size: 20px; }
  .article .toc { padding: 16px; }
  .entry-card-wrap { padding: 12px; }
  .entry-card-title { font-size: 18px; }
  .stfm-sources { padding: 0 14px 12px; }
  .stfm-trends { padding: 18px 14px; }
  .stfm-trends .stfm-trend { gap: 10px; }
  .stfm-trend-line { gap: 6px; }
  .stfm-upcoming-list li > div { min-width: 0; flex-basis: 100%; }
  .footer { padding: 28px 20px 36px; }
}

/* 動きを減らす設定：既存テーマのスクロールと画像の拡大も停止する。 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  body *:not(#wpadminbar, #wpadminbar *, ins.adsbygoogle, .google-auto-placed, iframe, ins.adsbygoogle *, .google-auto-placed *):not(:has(ins.adsbygoogle, .google-auto-placed, iframe)) {
    animation: none !important;
    transition: none !important;
  }
  .sfd-card:not(:has(ins.adsbygoogle, .google-auto-placed, iframe)):not(ins.adsbygoogle *, .google-auto-placed *) > a:hover .sfd-image img,
  .stfm-motion-item:not(:has(ins.adsbygoogle, .google-auto-placed, iframe)):not(ins.adsbygoogle *, .google-auto-placed *) {
    transform: none !important;
    opacity: 1 !important;
  }
}

/* スマホ：分野のメニューを1段の横スクロールにして、最初の画面で記事が見えるようにする（Claude が追加） */
@media screen and (max-width: 834px) {
  #navi-in .menu-header {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
    padding: 0 16px 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  #navi-in .menu-header::-webkit-scrollbar { display: none; }
  #navi-in .menu-header > li { flex: 0 0 auto; }
  #navi-in .menu-header > li > a {
    min-height: 40px;
    padding: 8px 14px;
    white-space: nowrap;
  }
  #header-in { min-height: 0; padding-top: 20px; padding-bottom: 14px; }
}

/* あわせて読みたい：明るい本文の中で、関連記事を読みやすくまとめる。 */
.article .entry-content .stfm-related {
  margin: 32px 0;
  padding: 18px 20px;
  border-left: 4px solid #b63227;
  border-radius: 4px;
  background: #eeede7;
  color: #202622;
}
.article .entry-content .stfm-related h2 {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #202622;
  font-size: 18px;
  line-height: 1.6;
}
.article .entry-content .stfm-related ul {
  margin: 0;
  padding: 0 0 0 1.2em;
}
.article .entry-content .stfm-related li {
  margin: 4px 0;
  line-height: 1.8;
}
.article .entry-content .stfm-related a {
  display: inline-block;
  min-height: 44px;
  padding: 8px 0;
  color: #202622;
  text-decoration: underline;
  text-underline-offset: .2em;
  overflow-wrap: anywhere;
}
.article .entry-content .stfm-related small {
  display: inline-block;
  margin-left: .4em;
  color: #4c554e;
  font-size: 13px;
}
