#headbox-bg,
#footer {
  background: #f7b52c;
}

/* PC 2カラム（本番 st-kanricss.php 相当） */
@media print, screen and (min-width: 960px) {
  #headbox,
  #gazou-wide,
  #content,
  #content-w,
  #footer-in,
  .footermenubox-in {
    max-width: 1060px;
    margin-left: auto;
    margin-right: auto;
  }

  #contentInner {
    float: left;
    width: 100%;
    margin-right: -300px;
  }

  #contentInner main {
    margin-right: 320px;
    margin-left: 0;
    background-color: #fff;
    border-radius: 4px;
    padding: 30px 50px;
  }

  #side {
    display: block;
  }

  #side aside {
    float: right;
    width: 300px;
    padding: 0;
  }

  #content.clearfix::after {
    clear: both;
    content: '';
    display: table;
  }
}

.st-infeed-adunit {
  border-top: 1px solid #ddd;
  border-bottom: 1px dotted #ccc;
  margin: 16px 0 20px;
  padding: 24px 0 10px;
  text-align: center;
}

.kanren .st-infeed-adunit {
  margin-bottom: 20px;
}

.sidebar-adsense {
  margin-top: 16px;
}

.adbox {
  margin: 24px 0;
}

/* 見出し前の挿入広告（旧 AFFINGER .st-h-ad 相当） */
.st-h-ad.article-inline-ad {
  margin: 20px 0;
  text-align: center;
}

.article-ad-slot--second {
  margin-top: 10px;
}

#gazou-wide {
  margin-bottom: 0;
}

.header-post-slider-container {
  max-width: 1060px;
  margin: 0 auto;
}

/* slick-theme.css が FontAwesome 矢印を上書きするため、旧WP（affinger5）相当に戻す */
.slick-prev,
.slick-next,
[dir='rtl'] .slick-prev,
[dir='rtl'] .slick-next {
  z-index: 9999;
  width: 37px;
  height: 37px;
  background: rgba(0, 0, 0, 0.5);
}

.slick-prev {
  left: 0;
}

.slick-next {
  right: 0;
}

[dir='rtl'] .slick-prev {
  right: 0;
  left: auto;
}

[dir='rtl'] .slick-next {
  right: auto;
  left: 0;
}

.slick-prev:hover,
.slick-prev:focus,
.slick-next:hover,
.slick-next:focus {
  background: rgba(0, 0, 0, 0.5);
}

.slick-prev:before,
.slick-next:before,
[dir='rtl'] .slick-prev:before,
[dir='rtl'] .slick-next:before {
  font-size: 12px;
  font-family: FontAwesome;
  color: #fff;
  opacity: 1;
}

.slick-prev:before {
  padding: 10px 15px 10px 11px;
  content: '\f053';
}

.slick-next:before {
  padding: 10px 11px 10px 15px;
  content: '\f054';
}

[dir='rtl'] .slick-prev:before {
  padding: 10px 11px 10px 15px;
  content: '\f054';
}

[dir='rtl'] .slick-next:before {
  padding: 10px 15px 10px 11px;
  content: '\f053';
}

.header-post-slider .slick-prev,
.header-post-slider .slick-next {
  background: rgba(0, 0, 0, 0.5);
}

.header-post-slider .slick-prev:hover,
.header-post-slider .slick-next:hover {
  background: rgba(0, 0, 0, 0.75);
}

/* ページネーション */
.st-pagelink {
  display: block;
  margin: 32px 0 24px;
  padding: 24px 0 0;
  border-top: 1px solid #e0e0e0;
  width: 100%;
}

.st-pagelink-summary {
  margin: 0 0 12px;
  font-size: 13px;
  color: #666;
  text-align: center;
}

.st-pagelink-in {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.st-pagelink .page-numbers,
.st-pagelink .previouspostslink,
.st-pagelink .nextpostslink {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  color: #333;
  font-size: 14px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  margin: 0;
  opacity: 1;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.st-pagelink a.page-numbers:hover,
.st-pagelink .previouspostslink:hover,
.st-pagelink .nextpostslink:hover {
  background: #f7b52c;
  border-color: #e5a318;
  color: #fff;
  opacity: 1;
}

.st-pagelink .page-numbers.current {
  background: #f7b52c;
  border-color: #e5a318;
  color: #fff;
  font-weight: 700;
  opacity: 1;
}

.st-pagelink .page-numbers.dots {
  min-width: auto;
  padding: 8px 6px;
  border: none;
  background: transparent;
  color: #999;
}

.st-pagelink .previouspostslink,
.st-pagelink .nextpostslink {
  min-width: auto;
  padding: 8px 16px;
  font-size: 13px;
}

@media print, screen and (min-width: 960px) {
  #gazou-wide {
    padding: 0 0 20px;
  }
}

header .sitename {
  max-width: 200px;
}

header .sitename a:hover {
  opacity: 1 !important;
}

.sp {
  display: none;
}

.wpp-list {
  counter-reset: wpp-ranking;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 10px 0 14px;
}

.wpp-list li {
  position: relative;
  list-style-type: none;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 0;
  min-height: auto;
}

.wpp-list li::before {
  content: counter(wpp-ranking, decimal);
  counter-increment: wpp-ranking;
  background: #f7b52c;
  color: #fff;
  font-size: 14px;
  line-height: 1;
  padding: 4px 8px;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
}

.wpp-list li .wpp-meta {
  display: none;
}

.wpp-list li .wpp-item-thumb {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  background: #f0f0f0;
}

.wpp-list li .wpp-item-thumb a {
  display: block;
  width: 100%;
  height: 100%;
}

.wpp-list li img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  display: block;
  margin: 0;
}

.wpp-list li .wpp-item-body {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.copyr {
  background: #c8870f;
  color: #fff;
  font-size: 12px;
  margin: 0;
  padding: 12px 15px;
  text-align: center;
}

/* フッター区切り・可読性 */
.site-footer-block {
  clear: both;
  margin-top: 40px;
}

.footermenubox {
  background: #fff;
  border-top: 2px solid #e0e0e0;
}

.footermenubox-in {
  max-width: 1060px;
  margin: 0 auto;
  padding: 14px 15px;
}

.footermenu ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footermenu a {
  color: #444;
  font-size: 13px;
  text-decoration: none;
}

.footermenu a:hover {
  color: #b22222;
  text-decoration: underline;
}

#footer {
  color: #2a2a2a;
  padding: 28px 15px 24px;
}

#footer .footerlogo {
  color: #1a1a1a;
}

#footer .st-widgets-title span {
  color: #333;
  font-weight: bold;
}

#footer a {
  color: #2a2a2a;
}

#footer a:hover {
  color: #b22222;
}

#footer-links ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

#footer-links a {
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-wbox {
  margin-bottom: 16px;
}

@media print, screen and (min-width: 960px) {
  .footer-wbox {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    text-align: left;
  }

  .footer-l {
    flex: 1;
  }

  .footer-r {
    flex-shrink: 0;
  }

  #footer-links ul {
    justify-content: flex-end;
  }
}

.tagcloud a {
  display: inline-block;
  margin: 0 5px 5px 0;
  padding: 2px 8px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;
  font-size: 12px;
  text-decoration: none;
}

.tagcloud a:hover {
  background: #f7b52c;
  border-color: #f7b52c;
  color: #fff;
}

.entry-content img {
  max-width: 100%;
  height: auto;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
}

.entry-content table th,
.entry-content table td {
  border: 1px solid #ddd;
  padding: 8px;
}

/* 記事本文見出し（旧WP affinger5 カスタマイズ相当） */
.post .entry-content h2:not(.st-css-no2),
.post .entry-content .h2modoki {
  background: #f7b52c;
  color: #fff;
  margin: 20px 0;
  padding: 10px 20px;
  border: none;
  font-size: 20px;
  line-height: 27px;
  font-weight: bold;
}

/* カテゴリラベル（一覧・スライダー・関連記事） */
.catname,
.st-catgroup.itiran-category .catname {
  background: #f7b52c;
  color: #fff;
}

.post .st-catgroup a,
.post .st-catgroup.itiran-category a,
.header-post-slider .st-catgroup.itiran-category a {
  color: #fff;
  text-decoration: none;
}

.post .st-catgroup a:hover,
.post .st-catgroup.itiran-category a:hover,
.header-post-slider .st-catgroup.itiran-category a:hover {
  color: #fff;
  opacity: 0.9;
}

.post .entry-content h3:not(.st-css-no2):not(.rankh3):not(#reply-title),
.post .entry-content .h3modoki {
  background: transparent;
  color: #333;
  margin: 24px 0 16px;
  padding: 0 0 10px;
  border: none;
  border-bottom: 3px solid #f7b52c;
  font-size: 18px;
  line-height: 27px;
  font-weight: bold;
}

.post .entry-content h4:not(.st-css-no2):not(.point):not(.rankh4),
.post .entry-content .h4modoki {
  padding: 10px 15px;
  margin: 20px 0;
  background-color: #f3f3f3;
  font-size: 17px;
  line-height: 26px;
  font-weight: bold;
}

.post .entry-content h2 span[id],
.post .entry-content h3 span[id],
.post .entry-content h4 span[id] {
  scroll-margin-top: 80px;
}

@media only screen and (min-width: 600px) {
  .post .entry-content h2:not(.st-css-no2),
  .post .entry-content .h2modoki {
    font-size: 22px;
    line-height: 32px;
  }

  .post .entry-content h3:not(.st-css-no2):not(.rankh3):not(#reply-title),
  .post .entry-content .h3modoki {
    font-size: 19px;
    line-height: 28px;
  }
}

@media print, screen and (min-width: 960px) {
  .post .entry-content h2:not(.st-css-no2),
  .post .entry-content .h2modoki {
    font-size: 24px;
    line-height: 35px;
  }

  .post .entry-content h3:not(.st-css-no2):not(.rankh3):not(#reply-title),
  .post .entry-content .h3modoki {
    font-size: 20px;
    line-height: 30px;
  }
}

html {
  scroll-behavior: smooth;
}

.entry-content .wp-block-image {
  margin: 1.5em 0;
}

.kanren.pop-box {
  margin-top: 30px;
}

.kanren.pop-box .p-entry-t {
  margin-bottom: 15px;
}

.kanren.pop-box h5.kanren-t {
  font-size: 16px;
  line-height: 1.5;
  margin: 0 0 8px;
}

.kanren.pop-box dt.poprank img {
  width: 160px;
  height: auto;
}

.sns.st-sns-bottom {
  margin-top: 20px;
}

.sidebar-banner {
  width: 100%;
  height: auto;
  display: block;
}

.sidebar-ad-box {
  background: #f5f5f5;
  border: 1px dashed #ccc;
  color: #999;
  font-size: 12px;
  padding: 40px 10px;
  text-align: center;
}

.widget.popular-posts .wpp-post-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  text-decoration: none;
  word-break: break-all;
}

.kanren dt img {
  width: 100px;
  height: 100px;
  object-fit: cover;
}

.kanren .st-excerpt {
  font-size: 13px;
  line-height: 1.7;
  color: #666;
}

.dyshorts-placeholder,
.dyshorts-widget,
.youtube-shorts-widget {
  margin: 20px 0;
}

.youtube-shorts-list {
  display: flex;
  flex-direction: row;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 4px;
  padding: 4px 4px 12px;
  margin: 0 -4px;
}

.youtube-shorts-list::-webkit-scrollbar {
  height: 6px;
}

.youtube-shorts-list::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 3px;
}

.youtube-shorts-list::-webkit-scrollbar-thumb:hover {
  background: #f7b52c;
}

.youtube-short-item {
  position: relative;
  flex: 0 0 auto;
  width: 168px;
  scroll-snap-align: start;
  aspect-ratio: 9 / 16;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
}

.youtube-short-item iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.youtube-shorts-more {
  margin-top: 16px;
  text-align: center;
}

.youtube-shorts-more-btn {
  display: inline-block;
  padding: 10px 32px;
  background: #f7b52c;
  border: 1px solid #e5a318;
  border-radius: 4px;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.youtube-shorts-more-btn:hover {
  background: #e5a318;
  border-color: #d49516;
  color: #fff;
  text-decoration: none;
}

.sitemap-section {
  margin-bottom: 2em;
}

.sitemap-section h2 {
  font-size: 18px;
  margin-bottom: 0.75em;
}

.category-index {
  margin: 24px 0 40px;
}

.category-index-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.category-index-list a {
  display: block;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  color: #333;
  text-decoration: none;
}

.category-index-list a:hover {
  background: #f7b52c;
  border-color: #e5a318;
  color: #fff;
}

.sitemap-section ul {
  list-style: disc;
  margin-left: 1.5em;
}

.sitemap-section li {
  margin-bottom: 0.4em;
}

.contact-form {
  margin-top: 1em;
}

.contact-form label {
  display: block;
  font-weight: bold;
  margin-bottom: 0.4em;
}

.contact-form .wpforms-field {
  margin-bottom: 1.2em;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.contact-form .wpforms-submit {
  background: #f7b52c;
  border: 0;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  padding: 10px 24px;
}

.contact-form-recaptcha-notice {
  color: #888;
  font-size: 12px;
  line-height: 1.6;
  margin-top: 0.75em;
}

.contact-form-recaptcha-notice a {
  color: #888;
  text-decoration: underline;
}

.contact-form-message {
  margin-top: 1em;
}

.contact-form-message--success {
  color: #2e7d32;
}

.contact-form-message--error {
  color: #c62828;
}

.st-author-box {
  margin-top: 30px;
}

.st-author-box #st-tab-menu {
  border-bottom: 2px solid #f7b52c;
  list-style: none;
  margin: 0 0 15px;
  padding: 0;
}

.st-author-box #st-tab-menu li {
  display: inline-block;
  font-weight: bold;
  padding: 8px 0;
}

.st-author-box #st-tab-box dl {
  display: flex;
  gap: 16px;
}

.st-author-box #st-tab-box dt img {
  border-radius: 50%;
}

.st-author-box .author-name {
  font-size: 16px;
  font-weight: bold;
  margin: 0 0 8px;
}

.st-author-box .author-description {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.st-author-box .author-sns,
.author-page-box .author-sns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.st-author-box .author-sns a,
.author-page-box .author-sns a {
  font-size: 12px;
}

.article-summary-box {
  background: #fffef5;
  border: 1px solid #f7b52c;
  border-radius: 4px;
  margin: 20px 0;
  padding: 16px 18px;
}

.article-summary-heading {
  font-size: 15px;
  font-weight: bold;
  margin: 0 0 10px;
}

.article-summary-list {
  margin: 0;
  padding-left: 1.4em;
}

.article-summary-list li {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 4px;
}

.archive-description {
  color: #555;
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 16px;
}

.author-page-box dl {
  display: flex;
  gap: 20px;
}

.author-page-box .author-job {
  color: #888;
  font-size: 13px;
  margin: 0 0 8px;
}

.author-back {
  margin-top: 24px;
}

/* フッター下の余白スクロール防止 */
html,
body {
  height: auto !important;
  min-height: 100%;
  overflow-x: hidden;
}

#st-ami,
#wrapper,
#wrapper-in {
  height: auto !important;
  min-height: 0 !important;
}

body.fixed-footer #wrapper {
  height: auto !important;
  min-height: 0 !important;
}

.site-footer-block {
  margin-bottom: 0;
}

#content-w::after {
  clear: both;
  content: '';
  display: table;
}
