/*
Theme Name: okky Running Lab
Theme URI: https://nanndemoya-smartblog.com
Author: okky
Description: okkyのRunning Lab カスタムテーマ
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: okky-running-lab
*/

/* ── カラー変数 ── */
:root {
  --bg:      #07111f;
  --surface: #0d1c30;
  --card:    #112038;
  --accent:  #1a6aff;
  --accent-d:#0f4fc2;
  --text:    rgba(255,255,255,0.90);
  --sub:     rgba(255,255,255,0.52);
  --mute:    rgba(255,255,255,0.24);
  --border:  rgba(255,255,255,0.08);
  --font:    "Hiragino Kaku Gothic ProN","Hiragino Sans","Yu Gothic Medium","Yu Gothic","Meiryo",sans-serif;
  --max-w:   1100px;
}

/* ── リセット ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-d); }

/* ── レイアウト ── */
.site-wrapper { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.content-area {
  display: flex;
  gap: 4px;
  padding: 20px 0 48px;
  align-items: flex-start;
}
.main-content { flex: 1; min-width: 0; }
#sidebar { width: 260px; flex-shrink: 0; display: flex; flex-direction: column; gap: 3px; }

/* ── ヘッダー ── */
#masthead {
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-top {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  gap: 24px;
  border-bottom: 1px solid var(--border);
  max-width: var(--max-w);
  margin: 0 auto;
}
.site-logo-link { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.site-logo-svg { display: block; }
.header-spacer { flex: 1; }
.header-search form { display: flex; align-items: center; }
.header-search input[type="search"] {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  font-size: 12px;
  padding: 7px 12px;
  border-radius: 2px 0 0 2px;
  outline: none;
  width: 200px;
}
.header-search input[type="search"]::placeholder { color: var(--mute); }
.header-search input[type="submit"] {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: none;
  color: var(--sub);
  padding: 7px 12px;
  cursor: pointer;
  border-radius: 0 2px 2px 0;
  font-size: 13px;
}
.header-contact a {
  border: 1px solid var(--border);
  color: var(--sub);
  padding: 7px 14px;
  font-size: 11px;
  border-radius: 2px;
  white-space: nowrap;
  display: block;
}
.header-contact a:hover { border-color: var(--accent); color: var(--accent); }

/* ── ナビゲーション ── */
#site-navigation {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#primary-menu {
  list-style: none;
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0;
}
#primary-menu li a {
  display: block;
  padding: 12px 18px;
  font-size: 12px;
  color: var(--sub);
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
  white-space: nowrap;
}
#primary-menu li a:hover,
#primary-menu li.current-menu-item > a,
#primary-menu li.current_page_item > a {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
/* ハンバーガー */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.menu-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--sub); border-radius: 1px;
  transition: transform .3s, opacity .3s;
}

/* ── ヒーローセクション ── */
.hero-section {
  position: relative;
  height: 300px;
  overflow: hidden;
}
.hero-section .hero-bg {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(7,17,31,.96) 0%, rgba(7,17,31,.65) 55%, rgba(7,17,31,.15) 100%);
}
.hero-accent-line {
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.hero-content {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  padding: 0 40px; max-width: 560px;
}
.hero-label {
  font-size: 11px; color: var(--accent); letter-spacing: .2em;
  font-weight: 700; margin-bottom: 10px;
}
.hero-title {
  font-size: 32px; font-weight: 700;
  line-height: 1.35; letter-spacing: -.5px;
  margin-bottom: 14px; color: var(--text);
}
.hero-desc {
  font-size: 12px; color: var(--sub); line-height: 2;
  margin-bottom: 22px; max-width: 380px;
}
.hero-buttons { display: flex; gap: 10px; }
.btn-primary {
  background: var(--accent); color: #fff;
  padding: 9px 22px; font-size: 12px; font-weight: 700;
  border-radius: 2px; display: inline-block;
  transition: background .2s;
}
.btn-primary:hover { background: var(--accent-d); color: #fff; }
.btn-secondary {
  border: 1px solid rgba(255,255,255,.2); color: var(--sub);
  padding: 9px 22px; font-size: 12px; border-radius: 2px;
  display: inline-block; transition: border-color .2s, color .2s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ── セクションラベル ── */
.section-label {
  font-size: 11px; font-weight: 700; color: var(--mute);
  letter-spacing: .12em;
  padding: 12px 0 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3px;
}

/* ── ピックアップカード（横長） ── */
.pickup-card {
  background: var(--card);
  display: flex;
  overflow: hidden;
  margin-bottom: 3px;
  transition: opacity .2s;
}
.pickup-card:hover { opacity: .85; }
.pickup-card .card-thumb {
  width: 260px; flex-shrink: 0; overflow: hidden;
}
.pickup-card .card-thumb img {
  width: 100%; height: 175px; object-fit: cover;
}
.pickup-card .card-thumb .no-thumb {
  width: 100%; height: 175px;
  background: repeating-linear-gradient(45deg, #0d1c30 0, #0d1c30 8px, #071120 8px, #071120 16px);
}
.pickup-card .card-body {
  flex: 1; padding: 20px 22px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.pickup-card .card-title {
  font-weight: 700; font-size: 17px; line-height: 1.55;
  color: var(--text); margin: 9px 0;
}
.pickup-card .card-excerpt {
  font-size: 12px; color: var(--sub); line-height: 1.9; flex: 1;
}
.card-meta-row {
  display: flex; align-items: center; gap: 14px; margin-top: 12px;
}
.card-meta-row span { font-size: 11px; color: var(--mute); }
.card-read-more {
  margin-left: auto; font-size: 11px;
  color: var(--accent); font-weight: 700;
}

/* ── リストカード ── */
.list-card {
  background: var(--card); display: flex;
  margin-bottom: 3px; overflow: hidden; transition: opacity .2s;
}
.list-card:hover { opacity: .85; }
.list-card .card-thumb { width: 150px; flex-shrink: 0; }
.list-card .card-thumb img { width: 100%; height: 100px; object-fit: cover; }
.list-card .card-thumb .no-thumb {
  width: 100%; height: 100px;
  background: repeating-linear-gradient(45deg, #0d1c30 0, #0d1c30 8px, #071120 8px, #071120 16px);
}
.list-card .card-body { flex: 1; padding: 13px 16px; display: flex; flex-direction: column; justify-content: space-between; }
.list-card .card-title { font-weight: 700; font-size: 14px; line-height: 1.6; color: var(--text); margin-bottom: 6px; }
.list-card .card-excerpt { font-size: 11px; color: var(--sub); line-height: 1.8; }

/* ── カテゴリラベル ── */
.cat-label {
  display: inline-block;
  background: rgba(26,106,255,.18); color: var(--accent);
  font-size: 10px; font-weight: 700; padding: 2px 9px;
  border-radius: 2px; letter-spacing: .04em;
}

/* ── もっと見るボタン ── */
.load-more-wrap { text-align: center; margin-top: 16px; }
.load-more-btn {
  display: inline-block;
  border: 1px solid var(--border); color: var(--sub);
  padding: 9px 40px; font-size: 12px; border-radius: 2px;
  transition: border-color .2s, color .2s;
}
.load-more-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── ページネーション ── */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 24px 0; }
.pagination .page-numbers {
  background: var(--card); color: var(--sub);
  border: 1px solid var(--border);
  padding: 7px 13px; font-size: 12px; border-radius: 2px;
  transition: background .2s, color .2s;
}
.pagination .page-numbers.current {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.pagination .page-numbers:hover:not(.current) {
  background: var(--surface); color: var(--accent);
}

/* ── サイドバー ── */
.widget-box {
  background: var(--card); padding: 20px; margin-bottom: 3px;
}
.widget-box-title {
  font-size: 11px; font-weight: 700; color: var(--mute);
  letter-spacing: .12em; padding-bottom: 10px;
  border-bottom: 1px solid var(--border); margin-bottom: 14px;
}
/* プロフィール */
.profile-box { background: var(--card); padding: 22px 18px; margin-bottom: 3px; }
.profile-inner { display: flex; gap: 14px; align-items: center; margin-bottom: 13px; }
.profile-avatar img, .profile-avatar .no-avatar {
  width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.profile-avatar .no-avatar {
  background: repeating-linear-gradient(45deg, #0d1c30 0, #0d1c30 6px, #071120 6px, #071120 12px);
}
.profile-name { font-weight: 700; font-size: 15px; color: var(--text); }
.profile-role { font-size: 11px; color: var(--sub); margin-top: 3px; }
.profile-desc { font-size: 12px; color: var(--sub); line-height: 2; }
.sns-buttons { display: flex; gap: 6px; margin-top: 14px; }
.sns-btn {
  flex: 1; text-align: center; padding: 6px 4px;
  font-size: 10px; font-weight: 700; border-radius: 2px;
  border: 1px solid transparent; transition: opacity .2s;
}
.sns-btn:hover { opacity: .8; }
.sns-btn.twitter { background: rgba(29,161,242,.18); color: #1da1f2; border-color: rgba(29,161,242,.3); }
.sns-btn.instagram { background: rgba(225,48,108,.18); color: #e1306c; border-color: rgba(225,48,108,.3); }
.sns-btn.youtube { background: rgba(255,0,0,.18); color: #ff0000; border-color: rgba(255,0,0,.3); }
/* 人気記事 */
.popular-item {
  display: flex; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid var(--border); align-items: flex-start;
}
.popular-item:last-child { border-bottom: none; }
.popular-num { font-weight: 700; font-size: 18px; color: rgba(26,106,255,.4); width: 22px; flex-shrink: 0; text-align: center; line-height: 1.2; }
.popular-title { font-size: 12px; color: var(--text); line-height: 1.6; }
.popular-date { font-size: 10px; color: var(--mute); margin-top: 3px; }
/* 広告枠 */
.ad-box { margin-bottom: 3px; }
.ad-placeholder {
  background: rgba(255,255,255,.03);
  border: 1px dashed rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  min-height: 120px; border-radius: 2px;
  font-size: 11px; color: var(--mute);
}
/* ウィジェット */
.widget { background: var(--card); padding: 20px; margin-bottom: 3px; }
.widget-title {
  font-size: 11px; font-weight: 700; color: var(--mute);
  letter-spacing: .12em; padding-bottom: 10px;
  border-bottom: 1px solid var(--border); margin-bottom: 14px;
}
.widget ul { list-style: none; padding: 0; }
.widget ul li {
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 12px; color: var(--sub);
}
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--sub); }
.widget ul li a:hover { color: var(--accent); }

/* ── 記事詳細 ── */
.breadcrumb {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 9px 0;
}
.breadcrumb-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; display: flex; gap: 6px; align-items: center; }
.breadcrumb a { font-size: 11px; color: var(--accent); }
.breadcrumb span { font-size: 11px; color: var(--mute); }
.breadcrumb .sep { color: var(--mute); font-size: 10px; }

.single-article { background: var(--card); }
.article-hero { position: relative; height: 280px; overflow: hidden; }
.article-hero img { width: 100%; height: 100%; object-fit: cover; }
.article-hero .no-thumb {
  width: 100%; height: 100%;
  background: repeating-linear-gradient(45deg, #0d1c30 0, #0d1c30 8px, #071120 8px, #071120 16px);
}
.article-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(17,32,56,1) 0%, rgba(17,32,56,.1) 60%);
}
.article-hero-content {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 20px 28px;
}
.article-title { font-weight: 700; font-size: 22px; line-height: 1.4; color: var(--text); margin-top: 8px; }

.article-meta {
  padding: 13px 28px; border-bottom: 1px solid var(--border);
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
}
.article-meta .author-box { display: flex; gap: 10px; align-items: center; }
.article-meta .author-box img, .article-meta .author-box .no-avatar {
  width: 30px; height: 30px; border-radius: 50%; object-fit: cover;
}
.article-meta .author-box .no-avatar {
  background: repeating-linear-gradient(45deg, #0d1c30 0, #0d1c30 5px, #071120 5px, #071120 10px);
}
.article-meta .author-name { font-size: 12px; font-weight: 700; color: var(--text); }
.article-meta span { font-size: 11px; color: var(--mute); }
.share-buttons { margin-left: auto; display: flex; gap: 7px; }
.share-btn {
  background: var(--surface); color: var(--sub); padding: 4px 10px;
  font-size: 10px; border-radius: 2px; border: 1px solid var(--border);
  cursor: pointer; transition: border-color .2s, color .2s; white-space: nowrap;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }

/* 広告（記事内） */
.ad-in-article { padding: 16px 28px 0; }
.ad-in-article .ad-placeholder { min-height: 90px; }
.ad-below-content { padding: 0 28px 16px; }
.ad-mid { margin: 24px 28px; }
.ad-mid .ad-placeholder { min-height: 90px; }

/* 本文 */
.entry-content { padding: 24px 28px 32px; font-size: 13px; color: var(--sub); line-height: 2.2; }
.entry-content p { margin-bottom: 1.5em; color: var(--sub); }
.entry-content h2 {
  font-size: 17px; font-weight: 700; color: var(--text);
  border-left: 3px solid var(--accent); padding: 4px 0 4px 12px;
  margin: 2em 0 1em; background: none; border-bottom: none;
}
.entry-content h3 {
  font-size: 15px; font-weight: 700; color: var(--text);
  border-left: 3px solid rgba(26,106,255,.55); padding: 3px 0 3px 10px;
  margin: 1.6em 0 .8em;
}
.entry-content h4 { font-size: 14px; font-weight: 700; color: var(--text); margin: 1.4em 0 .6em; }
.entry-content ul, .entry-content ol { padding-left: 1.5em; margin-bottom: 1.4em; }
.entry-content li { color: var(--sub); margin-bottom: .4em; }
.entry-content blockquote {
  background: var(--surface); border-left: 4px solid var(--accent);
  padding: 14px 18px; margin: 1.4em 0; border-radius: 0 2px 2px 0;
}
.entry-content blockquote p { color: var(--sub); margin-bottom: 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin-bottom: 1.4em; }
.entry-content table th { background: var(--accent); color: #fff; padding: 10px 14px; font-size: 12px; }
.entry-content table td { background: var(--card); color: var(--sub); padding: 10px 14px; font-size: 12px; border: 1px solid var(--border); }
.entry-content table tr:nth-child(even) td { background: var(--surface); }
.entry-content img { max-width: 100%; height: auto; margin: 1em 0; }
.entry-content a { color: var(--accent); text-decoration: underline; }
.entry-content a:hover { color: var(--accent-d); }
/* 目次プラグイン対応 */
#toc_container {
  background: var(--surface) !important; border: 1px solid var(--border) !important;
  border-radius: 2px !important; padding: 16px 20px !important; margin-bottom: 1.4em !important;
}
#toc_container p.toc_title { color: var(--mute) !important; font-size: 11px !important; font-weight: 700 !important; }
#toc_container ul li a { color: var(--sub) !important; font-size: 12px !important; }
#toc_container ul li a:hover { color: var(--accent) !important; }
/* Rinker対応 */
.rinker-box { background: var(--surface) !important; border: 1px solid var(--border) !important; border-radius: 2px !important; }
.rinker-box__title a { color: var(--text) !important; }

/* シェアボタン（本文下） */
.share-section { border-top: 1px solid var(--border); padding: 20px 28px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.share-section-label { font-size: 12px; color: var(--mute); }

/* 関連記事 */
.related-posts { padding: 0 0 40px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.related-card { background: var(--card); overflow: hidden; transition: opacity .2s; }
.related-card:hover { opacity: .85; }
.related-card .thumb img { width: 100%; height: 130px; object-fit: cover; display: block; }
.related-card .thumb .no-thumb {
  width: 100%; height: 130px;
  background: repeating-linear-gradient(45deg, #0d1c30 0, #0d1c30 8px, #071120 8px, #071120 16px);
}
.related-card .r-body { padding: 12px 14px; }
.related-card .r-title { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.6; }
.related-card .r-meta { display: flex; gap: 8px; align-items: center; margin-bottom: 7px; }

/* ── アーカイブ ── */
.archive-header { padding: 24px 0 16px; }
.archive-header h1 { font-size: 20px; font-weight: 700; color: var(--text); }
.archive-header .archive-desc { font-size: 12px; color: var(--sub); margin-top: 6px; }

/* ── 固定ページ ── */
.page-content { background: var(--card); padding: 28px 32px; }
.page-title { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }

/* ── 検索 ── */
.search-header { padding: 24px 0 8px; }
.search-header h1 { font-size: 18px; font-weight: 700; color: var(--text); }

/* ── 404 ── */
.error-404 { text-align: center; padding: 80px 20px; }
.error-404 .error-code { font-size: 80px; font-weight: 700; color: var(--accent); opacity: .3; line-height: 1; }
.error-404 h2 { font-size: 20px; font-weight: 700; color: var(--text); margin: 16px 0 10px; }
.error-404 p { color: var(--sub); margin-bottom: 24px; }

/* ── フッター ── */
#colophon {
  background: var(--surface);
  border-top: 2px solid var(--accent);
  padding: 36px 0 20px;
}
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.footer-top { display: flex; gap: 40px; margin-bottom: 28px; flex-wrap: wrap; }
.footer-brand { flex: 2; min-width: 200px; }
.footer-brand p { font-size: 12px; color: var(--sub); line-height: 2; margin-top: 10px; max-width: 300px; }
.footer-col { flex: 1; min-width: 120px; }
.footer-col-title { font-size: 10px; color: var(--mute); letter-spacing: .12em; font-weight: 700; margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 9px; }
.footer-col ul li a { font-size: 12px; color: var(--sub); }
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 16px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
}
.footer-bottom small { font-size: 11px; color: var(--mute); }
.footer-tagline { font-size: 11px; color: var(--mute); }

/* ── レスポンシブ ── */
@media screen and (max-width: 900px) {
  .content-area { flex-direction: column; }
  #sidebar { width: 100%; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-content { padding: 0 20px; }
  .hero-title { font-size: 24px; }
}
@media screen and (max-width: 640px) {
  .header-top { padding: 10px 16px; gap: 12px; }
  .header-search { display: none; }
  .header-contact { display: none; }
  .menu-toggle { display: flex; }
  #site-navigation #primary-menu {
    display: none; flex-direction: column;
    background: var(--surface); position: absolute;
    top: 100%; left: 0; right: 0; z-index: 200;
    border-bottom: 1px solid var(--border);
  }
  #site-navigation #primary-menu.is-open { display: flex; }
  #site-navigation #primary-menu li a { padding: 14px 20px; border-bottom: 1px solid var(--border); border-left: none; }
  #site-navigation { position: relative; }
  .nav-inner { flex-direction: column; align-items: flex-start; }
  .hero-section { height: 220px; }
  .hero-title { font-size: 20px; }
  .hero-desc { display: none; }
  .pickup-card { flex-direction: column; }
  .pickup-card .card-thumb { width: 100%; }
  .pickup-card .card-thumb img { height: 180px; }
  .list-card .card-thumb { width: 100px; }
  .list-card .card-thumb img { height: 72px; }
  .article-hero { height: 200px; }
  .article-title { font-size: 17px; }
  .entry-content { padding: 16px; }
  .entry-content h2 { font-size: 15px; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; gap: 24px; }
  .share-buttons { margin-left: 0; margin-top: 6px; }
  .article-meta { gap: 10px; }
}
