/*
Theme Name: nanashi
Theme URI: https://gamers-labo.com
Author: gamers-labo
Author URI: https://gamers-labo.com
Description: ゲームまとめサイト用オリジナルWordPressテーマ。2カラム・レスポンシブ・SEO対応。
Version: 1.0.0
License: Private
Text Domain: matome-theme
*/

/* =============================================================
   CSS Variables
   ============================================================= */
:root {
  --color-primary:     #2271b1;
  --color-primary-dk:  #1a5a90;
  --color-accent:      #dd3333;   /* THE THOR: fit_archiveList_ribbonColor */
  --color-bg:          #eaeaea;   /* THE THOR: fit_bsStyle_bgColor */
  --color-bg-card:     #ffffff;
  --color-header-bg:   #333333;   /* THE THOR: fit_conHeader_color */
  --color-header-text: #ffffff;
  --color-footer-bg:   #333333;
  --color-footer-text: #ffffff;
  --color-text:        #191919;   /* THE THOR: body color */
  --color-text-muted:  rgba(0,0,0,0.5);  /* THE THOR: dateList__item color */
  --color-border:      rgba(0,0,0,0.10); /* THE THOR: border style */
  --color-hr:          #8cb4db;

  --font-base: "Lato", "游ゴシック体", "Yu Gothic", YuGothic,
               "ヒラギノ角ゴシック Pro", "Hiragino Kaku Gothic Pro",
               "メイリオ", Meiryo, "ＭＳ Ｐゴシック", "MS PGothic", sans-serif;
  --font-size-base: 14px;          /* THE THOR: body 1.4rem @ 10px root = 14px */
  --line-height-base: 1.85;        /* THE THOR: .phrase line-height */

  --width-content: 1170px;         /* THE THOR: .l-wrapper max-width */
  --width-main:    calc(70% - 30px); /* THE THOR: .l-main width */
  --width-sidebar: 30%;              /* THE THOR: .l-sidebar width */

  --radius: 4px;
  --shadow: 0px 1px 3px 0px rgba(0,0,0,0.15); /* THE THOR: archive__item-shadow */
}

/* =============================================================
   Reset / Base
   ============================================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-base);
  font-size: 1rem;
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: var(--color-bg);
  word-break: break-word;
  overflow-wrap: break-word;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  opacity: .85;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

ul, ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* =============================================================
   Layout Container
   ============================================================= */
.container {
  max-width: var(--width-content);
  margin: 0 auto;
  padding: 0 16px;
}

/* =============================================================
   Header
   ============================================================= */
.site-header {
  background: var(--color-header-bg);
  color: var(--color-header-text);
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: var(--width-content);
  margin: 0 auto;
  padding: 18px 16px;
}

/* Logo — grid中央列に配置・中央揃え */
.site-logo {
  grid-column: 2;
  text-align: center;
}
.site-logo a {
  color: var(--color-header-text);
  font-size: 1.8rem;
  font-weight: bold;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  letter-spacing: .03em;
}
.site-logo img {
  max-height: 52px;
  width: auto;
}

/* Global Navigation (PC) — grid右列 */
.global-nav {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
}
.global-nav ul {
  display: flex;
  gap: 4px;
}
.global-nav a {
  color: var(--color-header-text);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: .9rem;
  text-decoration: none;
  display: block;
}
.global-nav a:hover {
  background: rgba(255,255,255,.15);
  text-decoration: none;
  opacity: 1;
}


/* =============================================================
   Breadcrumb
   ============================================================= */
.breadcrumb-wrap {
  background: #f0f0f0;
  border-bottom: 1px solid #ddd;
}
.breadcrumb {
  max-width: var(--width-content);
  margin: 0 auto;
  padding: 6px 16px;
  font-size: .8rem;
  color: var(--color-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.breadcrumb a {
  color: var(--color-text-muted);
  text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
}
.breadcrumb .sep {
  color: #bbb;
}

/* =============================================================
   Main Layout (2 column)
   ============================================================= */
.l-wrapper {
  max-width: var(--width-content);
  margin: 40px auto;      /* THE THOR: margin: 40px 15px → auto centering equivalent */
  padding: 0 15px;        /* THE THOR: 15px side margin */
  display: flex;
  gap: 0;
  align-items: flex-start;
  justify-content: space-between;  /* THE THOR: justify-content: space-between */
}

.l-main {
  width: var(--width-main);   /* THE THOR: calc(70% - 30px) */
  min-width: 0;
}

.l-sidebar {
  width: var(--width-sidebar);  /* THE THOR: 30% */
  flex-shrink: 0;
}

/* =============================================================
   Page Title (archive/search header)
   ============================================================= */
.page-title-wrap {
  background: var(--color-bg-card);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 16px;
  border-left: 4px solid var(--color-primary);
  box-shadow: var(--shadow);
}
.page-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--color-text);
}
.page-title .cat-label {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-size: .75rem;
  padding: 2px 8px;
  border-radius: 2px;
  margin-right: 8px;
  vertical-align: middle;
}

/* =============================================================
   Article Card (Archive list)
   ============================================================= */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 20px;    /* THE THOR: archive__item margin-bottom: 20px */
}

/* THE THOR: archive__item-shadow = background:#fff; padding:15px; box-shadow */
.post-card {
  background: var(--color-bg-card);
  box-shadow: var(--shadow);
  /* border-radius なし（THE THOR に倣う） */
  display: flex;
  align-items: flex-start;
  padding: 15px;         /* THE THOR: archive__item-shadow padding */
  gap: 0;
  transition: box-shadow .2s;
}
.post-card:hover {
  box-shadow: 0px 3px 8px 0px rgba(0,0,0,0.18);
}

/* サムネイル + カテゴリバッジのラッパー（position context） */
/* THE THOR: eyecatch max-width:300px; padding-top:56.25% → 300×56.25%=168.75px */
.post-card__thumb-wrap {
  width: 300px;
  height: 169px;    /* 16:9（300 × 56.25% ≈ 169px） */
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background: #ddd;
}
.post-card__thumb {
  display: block;
  width: 100%;
  height: 100%;
}
.post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;   /* THE THOR: transition: .3s */
}
.post-card:hover .post-card__thumb img {
  transform: scale(1.2);   /* THE THOR: eyecatch__link:hover img scale(1.2) */
}
.post-card__thumb .no-img {
  width: 100%;
  height: 100%;
  background: #ccd6e0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: .8rem;
}

/* カテゴリバッジ（サムネイル右上に絶対配置） */
/* THE THOR: eyecatch__cat = top:0; right:0; padding:7.5px 10px; font-size:1rem(10px) */
.post-card__cat {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--color-accent);
  color: #fff;
  font-size: 10px;      /* THE THOR: eyecatch__cat a font-size:1rem = 10px */
  padding: 7.5px 10px;  /* THE THOR: padding:7.5px 10px */
  line-height: 1.35;    /* THE THOR: line-height:1.35 */
  z-index: 1;
  text-decoration: none;
}
.post-card__cat:hover {
  background: rgba(255,255,255,0.25);  /* THE THOR: eyecatch__cat a:hover */
  text-decoration: none;
  opacity: 1;
}

/* THE THOR: archive__contents = width:100%; margin-left:15px */
.post-card__body {
  flex: 1;
  padding: 0;
  margin-left: 15px;    /* THE THOR: archive__contents margin-left */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

/* THE THOR: heading-secondary = 1.6rem @ 10px root = 16px = 1rem @ 16px root */
.post-card__title {
  font-size: 1rem;
  font-weight: bold;
  line-height: 1.4;
  margin-bottom: 10px;  /* THE THOR: dateList-main margin-bottom: 10px */
}
.post-card__title a {
  color: var(--color-text);
  text-decoration: none;
}
.post-card__title a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

/* THE THOR: dateList__item = display:inline-block; color:rgba(0,0,0,0.5); font-size:1.2rem(12px) */
.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;             /* THE THOR: dateList__item margin-right: 5px */
  font-size: 12px;      /* THE THOR: 1.2rem = 12px */
  color: var(--color-text-muted);
  align-items: center;
}
.post-card__meta .icon {
  margin-right: 2.5px;  /* THE THOR: ::before margin-right: 2.5px */
}
.post-card__meta a {
  color: var(--color-text-muted);
  text-decoration: none;
}
/* THE THOR child CSS: li.dateList__item.icon-bubble2 { font-size:13px; font-weight:bold; color:#2271b1 } */
.post-card__meta .comment-count {
  font-size: 13px;
  font-weight: bold;
  color: #2271b1;
}

/* =============================================================
   Infeed Ad Slot
   ============================================================= */
.infeed-ad {
  margin: 12px 0;
  text-align: center;
}

/* =============================================================
   Home Top / Bottom Widget (トップページ専用広告エリア)
   ============================================================= */
.home-top-widget,
.home-bottom-widget {
  margin: 16px 0;
  text-align: left;
  overflow: hidden;   /* 固定幅ウィジェットのはみ出しを防ぐ */
  max-width: 100%;
}

/* ウィジェット内の iframe・img・embed が親幅を超えないようにする */
.home-top-widget iframe,
.home-top-widget img,
.home-top-widget embed,
.home-top-widget object,
.home-bottom-widget iframe,
.home-bottom-widget img,
.home-bottom-widget embed,
.home-bottom-widget object {
  max-width: 100%;
}

/* =============================================================
   Pagination
   THE THOR: .page-numbers → display:inline-block; color:#a83f3f; background:#fff;
             border:rgba(0,0,0,0.10) 1px solid; font-size:1.2rem(12px); padding:10px
   ============================================================= */
.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;           /* THE THOR: margin-left:-1px で隙間なし */
  margin-top: 24px;
}
.pagination a,
.pagination .current,
.pagination .dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: calc(12px + 20px);   /* THE THOR: calc(1.2rem + 20px) */
  padding: 10px;                  /* THE THOR: padding:10px */
  font-size: 12px;                /* THE THOR: 1.2rem = 12px */
  text-decoration: none;
  border: 1px solid rgba(0,0,0,0.10);
  margin-left: -1px;              /* THE THOR: margin-left:-1px */
  /* border-radius なし */
}
.pagination a {
  background: #fff;
  color: var(--color-accent);    /* THE THOR: color:#a83f3f ≈ accent red */
}
.pagination a:hover,
.pagination .current {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
  text-decoration: none;
  opacity: 1;
}
.pagination .current {
  font-weight: bold;
}
.pagination .dots {
  background: #f5f5f5;
  color: #999;
  border: 1px solid rgba(0,0,0,0.10);
}

/* =============================================================
   Single Post
   ============================================================= */
.post-header {
  background: var(--color-bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.post-eyecatch {
  width: 100%;
  max-height: 420px;
  overflow: hidden;
}
.post-eyecatch img {
  width: 100%;
  object-fit: cover;
  display: block;
}

.post-header__body {
  padding: 20px 24px 16px;
}

.post-header__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.post-header__cat-link {
  background: var(--color-primary);
  color: #fff;
  font-size: .75rem;
  padding: 3px 10px;
  border-radius: 3px;
  text-decoration: none;
}
.post-header__cat-link:hover {
  background: var(--color-primary-dk);
  text-decoration: none;
  opacity: 1;
  color: #fff;
}

.post-title {
  font-size: 1.5rem;
  font-weight: bold;
  line-height: 1.5;
  margin-bottom: 12px;
  color: var(--color-text);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .82rem;
  color: var(--color-text-muted);
  align-items: center;
}
.post-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.post-meta .meta-icon {
  font-size: 1em;
}
.post-meta a {
  color: var(--color-text-muted);
  text-decoration: none;
}
.post-meta a:hover {
  text-decoration: underline;
}
.post-meta .comment-count {
  color: var(--color-primary);
  font-weight: bold;
}

/* =============================================================
   Article Ad Slots (top / bottom)
   ============================================================= */
.post-ad {
  margin: 16px 0;
  text-align: center;
}
.post-ad--double {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.post-ad--double > * {
  flex: 1;
  min-width: 280px;
  text-align: center;
}
.ad-label {
  font-size: .7rem;
  color: #aaa;
  text-align: center;
  display: block;
  margin-bottom: 4px;
}

/* =============================================================
   Post Content (article body)
   ============================================================= */
.post-content {
  background: var(--color-bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.85;
}

/* Content typography */
.post-content h2 {
  font-size: 1.3rem;
  font-weight: bold;
  margin: 1.8em 0 .7em;
  padding: .45em .75em;
  border-left: 4px solid var(--color-primary);
  background: #f0f5fb;
  border-radius: 0 var(--radius) var(--radius) 0;
  line-height: 1.4;
}
.post-content h3 {
  font-size: 1.15rem;
  font-weight: bold;
  margin: 1.5em 0 .6em;
  padding-bottom: .3em;
  border-bottom: 2px solid var(--color-border);
  line-height: 1.4;
}
.post-content h4 {
  font-size: 1.05rem;
  font-weight: bold;
  margin: 1.2em 0 .5em;
}
.post-content p {
  margin: 0 0 1em;
}
.post-content ul,
.post-content ol {
  margin: 0 0 1em 1.5em;
}
.post-content ul {
  list-style: disc;
}
.post-content ol {
  list-style: decimal;
}
.post-content li {
  margin-bottom: .3em;
}
.post-content blockquote {
  margin: 1em 0;
  padding: .75em 1em;
  background: #f8f8f8;
  border-left: 4px solid var(--color-hr);
  color: #555;
  font-size: .95em;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.post-content blockquote p:last-child {
  margin-bottom: 0;
}
.post-content table {
  margin: 1em 0;
  font-size: .95em;
}
.post-content table th,
.post-content table td {
  border: 1px solid var(--color-border);
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}
.post-content table th {
  background: #f0f5fb;
  font-weight: bold;
}
.post-content table tr:nth-child(even) td {
  background: #fafafa;
}
.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
  margin: .5em auto;
}
.post-content a {
  color: var(--color-primary);
  text-decoration: underline;
}
.post-content a:hover {
  opacity: .8;
}
.post-content hr {
  border: none;
  border-top: 1px solid var(--color-hr);
  margin: 1.5em 0;
}
.post-content strong, .post-content b {
  font-weight: bold;
}
.post-content em, .post-content i {
  font-style: italic;
}
.post-content code {
  background: #f0f0f0;
  padding: .1em .4em;
  border-radius: 3px;
  font-family: "Courier New", monospace;
  font-size: .9em;
}
.post-content pre {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 1em;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: .88em;
  margin: 1em 0;
}
.post-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* WordPress core blocks compat */
.post-content .wp-block-image {
  margin: 1em 0;
}
.post-content .wp-block-image figcaption {
  text-align: center;
  font-size: .82em;
  color: var(--color-text-muted);
  margin-top: .3em;
}

/* =============================================================
   5ch Thread Style (まとめサイト引用レス)
   ============================================================= */
.matome-res {
  background: #f8f9fa;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin: .6em 0;
  font-size: .95em;
  line-height: 1.7;
}
.matome-res .res-num {
  color: var(--color-primary);
  font-weight: bold;
  font-size: .82em;
  display: block;
  margin-bottom: 4px;
}
.matome-res .res-name {
  color: #888;
  font-size: .8em;
}

/* =============================================================
   Post Navigation (prev/next)
   ============================================================= */
.post-nav {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.post-nav__item {
  flex: 1;
  background: var(--color-bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.post-nav__item a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  color: var(--color-text);
  text-decoration: none;
  font-size: .88rem;
  line-height: 1.4;
}
.post-nav__item a:hover {
  background: #f5f8fb;
  text-decoration: none;
  opacity: 1;
}
.post-nav__item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
}
.post-nav__dir {
  font-size: .72rem;
  color: var(--color-primary);
  font-weight: bold;
  display: block;
  margin-bottom: 3px;
}

/* =============================================================
   Related Posts
   ============================================================= */
.related-posts {
  background: var(--color-bg-card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.related-posts__title {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-primary);
  color: var(--color-text);
}
.related-posts__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.related-post__thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 3px;
  background: #ddd;
  display: block;
  margin-bottom: 6px;
}
.related-post__title {
  font-size: .85rem;
  line-height: 1.4;
  color: var(--color-text);
}
.related-post__title a {
  color: var(--color-text);
  text-decoration: none;
}
.related-post__title a:hover {
  color: var(--color-primary);
}

/* =============================================================
   Comments
   ============================================================= */
.comments-area {
  background: var(--color-bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.comments-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-primary);
}

/* Comment list */
.comment-list {
  margin-bottom: 28px;
}
.comment-list li {
  list-style: none;
}

.comment-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
}
.comment-item:last-child {
  border-bottom: none;
}

.comment-avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

.comment-main {
  flex: 1;
  min-width: 0;
}
.comment-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 6px;
}
.comment-author-name {
  font-weight: bold;
  font-size: .9rem;
  color: var(--color-text);
}
.comment-date {
  font-size: .78rem;
  color: var(--color-text-muted);
}
.comment-body {
  font-size: .95rem;
  line-height: 1.75;
  color: var(--color-text);
}
.comment-body p {
  margin: 0 0 .5em;
}
.comment-body p:last-child {
  margin-bottom: 0;
}
.comment-reply {
  margin-top: 6px;
}
.comment-reply a {
  font-size: .78rem;
  color: var(--color-text-muted);
  text-decoration: none;
  border: 1px solid var(--color-border);
  padding: 2px 8px;
  border-radius: 3px;
}
.comment-reply a:hover {
  background: var(--color-border);
  text-decoration: none;
  opacity: 1;
}

/* Awaiting moderation */
.comment-awaiting-moderation {
  font-size: .8rem;
  color: #e67e22;
  font-style: italic;
  margin-bottom: 4px;
}

/* Nested comments (replies) */
.comment-list .children {
  padding-left: 52px;
  margin-top: 0;
}

/* Comment form */
.comment-form-wrap {
  margin-top: 24px;
}
.comment-form-title {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 16px;
}
.comment-form label {
  display: block;
  font-size: .85rem;
  font-weight: bold;
  margin-bottom: 4px;
  color: var(--color-text-muted);
}
.comment-form input[type="text"],
.comment-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: .95rem;
  font-family: var(--font-base);
  background: #fafafa;
  transition: border-color .2s;
}
.comment-form input[type="text"]:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  background: #fff;
}
.comment-form textarea {
  min-height: 120px;
  resize: vertical;
}
.comment-form-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 14px;
}
.comment-form .form-group {
  display: flex;
  flex-direction: column;
}
.comment-form .submit-btn {
  background: var(--color-primary);
  color: #fff;
  border: none;
  padding: 11px 28px;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: bold;
  cursor: pointer;
  font-family: var(--font-base);
  transition: background .2s;
}
.comment-form .submit-btn:hover {
  background: var(--color-primary-dk);
}
.comment-form .comment-notes {
  font-size: .8rem;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

/* =============================================================
   Sidebar / Widgets
   THE THOR: .u-shadowfix = background:#fff; padding:15px; box-shadow:0px 1px 3px rgba(0,0,0,.15)
   THE THOR: .heading-widgetsimplewide = font-size:1.5rem(15px); padding:10px;
             margin:-15px -15px 20px -15px; background:fit_conWidget_color(#333); color:#fff
   ============================================================= */
.l-sidebar {
  display: flex;
  flex-direction: column;
  gap: 40px;    /* THE THOR: .widget margin-bottom: 40px */
}

.widget {
  background: var(--color-bg-card);
  /* border-radius なし（THE THOR に倣う） */
  padding: 15px;    /* THE THOR: u-shadowfix/borderfix SP padding */
  box-shadow: var(--shadow);
}
.widget-title {
  font-size: 15px;     /* THE THOR: heading-widgetsimplewide 1.5rem = 15px */
  font-weight: bold;
  background: #333333; /* THE THOR: fit_conWidget_color */
  color: #fff;
  padding: 10px;       /* THE THOR: padding:10px */
  margin: -15px -15px 20px;  /* THE THOR: margin:-15px -15px 20px -15px */
  /* border-radius なし */
}

/* Sticky widget */
.widget-sticky {
  position: sticky;
  top: 72px;
}

/* Recent posts widget */
.widget ul li {
  padding: 7px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: .88rem;
  list-style: none;
}
.widget ul li:last-child {
  border-bottom: none;
}
.widget ul li a {
  color: var(--color-text);
  text-decoration: none;
  line-height: 1.4;
  display: block;
}
.widget ul li a:hover {
  color: var(--color-primary);
}

/* Category widget */
.widget_categories ul li {
  display: flex;
  justify-content: space-between;
}
.widget_categories ul li a {
  color: var(--color-text);
}

/* =============================================================
   Footer
   ============================================================= */
.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  margin-top: 32px;
}

.footer-widgets {
  max-width: var(--width-content);
  margin: 0 auto;
  padding: 28px 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.footer-widgets .widget {
  background: none;
  box-shadow: none;
  padding: 0;
}
.footer-widgets .widget-title {
  background: rgba(255,255,255,.1);
  color: var(--color-footer-text);
  font-size: .9rem;
}
.footer-widgets .widget ul li {
  border-bottom-color: rgba(255,255,255,.1);
}
.footer-widgets .widget ul li a {
  color: rgba(255,255,255,.8);
}
.footer-widgets .widget ul li a:hover {
  color: #fff;
}

.footer-bottom {
  background: #222;
  border-top: 1px solid #444;
}
.footer-bottom-inner {
  max-width: var(--width-content);
  margin: 0 auto;
  padding: 16px 16px 66px; /* 66px: スマホ固定フッター分の余白 */
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: .82rem;
  color: rgba(255,255,255,.6);
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-nav a {
  color: rgba(255,255,255,.6);
  text-decoration: none;
}
.footer-nav a:hover {
  color: #fff;
  text-decoration: none;
  opacity: 1;
}
.footer-copyright a {
  color: rgba(255,255,255,.5);
  text-decoration: none;
}
.footer-copyright a:hover {
  color: #fff;
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 56px; /* スマホフッターの上 */
  right: 12px;
  width: 40px;
  height: 40px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}
@media (min-width: 768px) {
  .back-to-top {
    bottom: 20px;
  }
}
.back-to-top:hover {
  background: var(--color-primary-dk);
  opacity: 1 !important;
  text-decoration: none;
}

/* Mobile fixed footer nav */
.mobile-footer-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--color-border);
  display: flex;
  z-index: 90;
  box-shadow: 0 -2px 8px rgba(0,0,0,.1);
}
.mobile-footer-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  font-size: .65rem;
  color: var(--color-text-muted);
  text-decoration: none;
  gap: 3px;
}
.mobile-footer-nav a:hover {
  color: var(--color-primary);
  text-decoration: none;
  opacity: 1;
}
.mobile-footer-nav .icon {
  font-size: 1.3rem;
  line-height: 1;
}

/* =============================================================
   404 / No results
   ============================================================= */
.not-found {
  background: var(--color-bg-card);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}
.not-found h1 {
  font-size: 3rem;
  color: var(--color-border);
  margin-bottom: 12px;
}
.not-found p {
  color: var(--color-text-muted);
  margin-bottom: 24px;
}
.not-found .home-link {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  padding: 10px 24px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: bold;
}
.not-found .home-link:hover {
  background: var(--color-primary-dk);
  text-decoration: none;
  opacity: 1;
}

/* =============================================================
   Search form (page / sidebar)
   ============================================================= */
.search-form {
  display: flex;
  gap: 0;
}
.search-form input[type="search"] {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: .95rem;
  font-family: var(--font-base);
  background: #fafafa;
}
.search-form input[type="search"]:focus {
  outline: none;
  border-color: var(--color-primary);
  background: #fff;
}
.search-form button {
  background: var(--color-primary);
  color: #fff;
  border: none;
  padding: 0 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
  font-size: 1rem;
}
.search-form button:hover {
  background: var(--color-primary-dk);
}

/* =============================================================
   Utility
   ============================================================= */
.u-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.text-muted {
  color: var(--color-text-muted);
}

/* =============================================================
   Responsive
   ============================================================= */

/* Tablet (768px–1024px) */
@media (max-width: 1024px) {
  :root {
    --width-main:    64%;
    --width-sidebar: 32%;
  }
  .l-sidebar {
    width: 260px;
  }
  .related-posts__list {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-widgets {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile (max 767px) → single column */
@media (max-width: 767px) {
  :root {
    --font-size-base: 14px;
  }

  /* Header */
  .header-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 12px 16px;
  }
  .site-logo {
    grid-column: 1;
  }
  .site-logo a {
    font-size: 1.2rem;
  }
  .global-nav {
    display: none;
  }

  /* Layout: stack to single column */
  .l-wrapper {
    flex-direction: column;
    margin: 20px auto;
    gap: 0;
  }
  .l-main {
    width: 100%;
    margin-bottom: 20px;
  }
  .l-sidebar {
    width: 100%;
    gap: 20px;   /* モバイルは間隔を縮小 */
  }

  /* Post card: THE THOR child CSS → padding:10px; eyecatch 160×90px */
  .post-card {
    padding: 10px;
  }
  .post-card__thumb-wrap {
    width: 160px;
    height: 90px;    /* 16:9（160 × 56.25% = 90px） */
  }

  /* Post title */
  .post-title {
    font-size: 1.2rem;
  }

  /* Related posts */
  .related-posts__list {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Post nav */
  .post-nav {
    flex-direction: column;
  }

  /* Footer widgets */
  .footer-widgets {
    grid-template-columns: 1fr;
    padding: 20px 16px;
    gap: 16px;
  }

  /* Footer bottom */
  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 80px;
  }

  /* Mobile footer nav: show */
  .mobile-footer-nav {
    display: flex;
  }

  /* Comment nested */
  .comment-list .children {
    padding-left: 20px;
  }

  /* Post ad double: stack */
  .post-ad--double {
    flex-direction: column;
  }

  /* Page title */
  .page-title {
    font-size: 1rem;
  }
}

/* Desktop: hide mobile footer nav */
@media (min-width: 768px) {
  .mobile-footer-nav {
    display: none;
  }
}

/* Very small mobile: THE THOR child CSS → eyecatch max-width:90px */
@media (max-width: 480px) {
  .post-card__thumb-wrap {
    width: 90px;
    height: 51px;   /* 16:9（90 × 56.25% ≈ 51px） */
  }
  .related-posts__list {
    grid-template-columns: 1fr;
  }
}

/* =============================================================
   Axis Page (軸ページ)
   ============================================================= */
.axis-page {
  background: var(--color-bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.axis-page-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 12px;
  line-height: 1.4;
  border-left: 4px solid var(--color-primary);
  padding-left: 12px;
}

.axis-page-content {
  margin-bottom: 16px;
  line-height: 1.8;
}

.axis-updated {
  font-size: .8rem;
  color: var(--color-text-muted);
  margin-bottom: 28px;
}

/* カテゴリ別セクション */
.axis-categories-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.axis-category-section {
  border-top: 2px solid var(--color-border);
  padding-top: 20px;
}

.axis-category-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 14px;
}
.axis-category-title a {
  color: var(--color-text);
  text-decoration: none;
}
.axis-category-title a:hover {
  color: var(--color-primary);
}

/* 記事リスト */
.axis-post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.axis-post-item {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 10px;
}
.axis-post-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.axis-post-link {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--color-text);
  text-decoration: none;
}
.axis-post-link:hover {
  text-decoration: none;
  opacity: 1;
}
.axis-post-link:hover .axis-post-title {
  color: var(--color-primary);
}

.axis-post-thumb {
  width: 100px;
  height: 56px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
  background: #ddd;
  display: block;
}
.axis-post-thumb.no-image {
  background: #e8ecf0;
}

.axis-post-info {
  flex: 1;
  min-width: 0;
}

.axis-post-title {
  display: block;
  font-size: .92rem;
  line-height: 1.45;
  margin-bottom: 4px;
  transition: color .15s;
}

.axis-post-date {
  font-size: .78rem;
  color: var(--color-text-muted);
}

/* もっと見るリンク */
.axis-more-link {
  display: inline-block;
  margin-top: 8px;
  font-size: .85rem;
  color: var(--color-primary);
  text-decoration: none;
  border: 1px solid var(--color-primary);
  padding: 5px 14px;
  border-radius: var(--radius);
  transition: background .15s, color .15s;
}
.axis-more-link:hover {
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
  opacity: 1;
}

/* カテゴリ未設定メッセージ */
.axis-no-categories {
  color: var(--color-text-muted);
  font-size: .9rem;
  border: 1px dashed var(--color-border);
  padding: 16px;
  border-radius: var(--radius);
}

/* 404ページ: 最新記事 */
.not-found-recent {
  margin-top: 28px;
  text-align: left;
}
.not-found-recent-title {
  font-size: .95rem;
  font-weight: bold;
  color: var(--color-text-muted);
  margin-bottom: 10px;
  text-align: center;
}
.not-found-post-list {
  list-style: none;
  border-top: 1px solid var(--color-border);
}
.not-found-post-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: .88rem;
}
.not-found-post-item a {
  color: var(--color-text);
  text-decoration: none;
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}
.not-found-post-item a:hover {
  color: var(--color-primary);
}
.not-found-post-date {
  font-size: .78rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Responsive: Axis Page */
@media (max-width: 767px) {
  .axis-page {
    padding: 16px;
  }
  .axis-page-title {
    font-size: 1.2rem;
  }
  .axis-post-thumb {
    width: 80px;
    height: 45px;
  }
}

/* =============================================================
   RSS Widget [matome_rss]
   ============================================================= */
.matome-rss-widget {
  margin: 12px 0;
}

.matome-rss-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 8px;
  padding: 4px 8px;
  border-left: 3px solid var(--color-accent);
  background: var(--color-bg-sub, #f5f5f5);
}

.matome-rss-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.matome-rss-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border, #e0e0e0);
  font-size: .9rem;
  line-height: 1.4;
}

.matome-rss-item:last-child {
  border-bottom: none;
}

.matome-rss-link {
  flex: 1;
  color: var(--color-text);
  text-decoration: none;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.matome-rss-link:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.matome-rss-date {
  font-size: .75rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .matome-rss-item {
    flex-direction: column;
    gap: 2px;
  }
  .matome-rss-date {
    font-size: .7rem;
  }
}
