/*
 * natto-static テーマ。現行 natto.moe（Cocoon / skin-innocence）の雰囲気に寄せた軽量スタイル。
 * 薄いドット地紋の背景・白い角丸カード・中央ロゴ・横並びグローバルメニュー・2カラムのサムネカード・右サイドバー。
 */
:root {
  --fg: #4a4a4a;
  --heading: #333;
  --muted: #888;
  --accent: #1e92bf;
  --accent-dark: #14789e;
  --bg: #eef0f1;
  --card: #fff;
  --bg-soft: #f6f7f8;
  --border: #e3e3e3;
  --max: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 18px;
}

body {
  margin: 0;
  color: var(--fg);
  background-color: var(--bg);
  /* skin-innocence の地紋（squ_ten2.png）を CSS のドットパターンで再現 */
  background-image: radial-gradient(rgba(0, 0, 0, 0.045) 1px, transparent 1px);
  background-size: 8px 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif;
  line-height: 1.8;
  font-size: 1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

/* ---- Header（中央ロゴ） ---- */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.site-header-in {
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px 16px 0;
}

.site-title {
  margin: 0;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.site-title a {
  color: var(--heading);
}

.global-nav {
  margin-top: 16px;
  border-top: 1px solid var(--border);
}

.global-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.global-nav li {
  border-left: 1px solid var(--border);
}

.global-nav li:last-child {
  border-right: 1px solid var(--border);
}

.global-nav a {
  display: block;
  padding: 12px 18px;
  color: var(--fg);
  font-size: 0.82rem;
  font-weight: 500;
}

.global-nav a:hover {
  background: var(--bg-soft);
  text-decoration: none;
  color: var(--accent);
}

/* ---- Layout ---- */
.main-body {
  display: flex;
  flex-direction: row-reverse;
  gap: 32px;
  align-items: flex-start;
  padding: 28px 0;
}

.main-conts {
  flex: 1 1 auto;
  min-width: 0;
}

.sidebar {
  flex: 0 0 300px;
  max-width: 300px;
}

@media (max-width: 768px) {
  .main-body {
    flex-direction: column;
    gap: 28px;
  }
  .sidebar {
    flex-basis: auto;
    max-width: none;
    width: 100%;
  }
}

/* ---- 一覧: 2カラムのサムネカード（Cocoon entry-card 風） ---- */
.entry-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 560px) {
  .entry-cards {
    grid-template-columns: 1fr;
  }
}

.entry-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.entry-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.entry-card-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-soft);
}

.entry-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.entry-card-body {
  padding: 12px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.entry-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.entry-card-title {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.5;
  font-weight: 700;
}

.entry-card-title a {
  color: var(--heading);
}

.entry-card-title a:hover {
  color: var(--accent);
  text-decoration: none;
}

.entry-card-excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- 記事単体ページ ---- */
.article.is-single {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px 32px;
}

@media (max-width: 560px) {
  .article.is-single {
    padding: 20px 16px;
  }
}

.article-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.article-title {
  margin: 0 0 12px;
  font-size: 1.5rem;
  line-height: 1.5;
  color: var(--heading);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.article-cat {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 3px;
  background: var(--cat-color, #8a6d3b);
  color: #fff !important;
  font-size: 0.72rem;
}

.article-cat:hover {
  text-decoration: none;
  opacity: 0.9;
}

.article-body :where(h2, h3) {
  margin-top: 1.6em;
  line-height: 1.5;
  color: var(--heading);
}

.article-body img {
  border-radius: 4px;
}

.article-hero {
  margin: 0 0 20px;
}

/* TikTok 埋め込みは中央寄せ・幅制御 */
.article-body .tiktok-embed {
  margin: 20px auto;
  max-width: 605px;
}

/* ---- Gallery ---- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}

.gallery-item {
  margin: 0;
}

.gallery-item img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 4px;
}

/* ---- Sidebar widgets ---- */
.widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 20px;
}

.widget-title {
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  font-size: 0.95rem;
  color: var(--heading);
}

.widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.widget-categories li {
  padding: 8px 0;
  border-bottom: 1px dotted var(--border);
  font-size: 0.85rem;
}

.widget-categories li:last-child {
  border-bottom: 0;
}

.widget .count {
  color: var(--muted);
  font-size: 0.78rem;
}

.widget-search form {
  display: flex;
  gap: 6px;
}

.widget-search input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.85rem;
}

.widget-search button {
  padding: 8px 14px;
  border: 0;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: 0.85rem;
}

.widget-search button:hover {
  background: var(--accent-dark);
}

.widget-archive select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.85rem;
}

/* ---- Pagination ---- */
.pagination {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 0;
  font-size: 0.9rem;
}

/* 番号ページネーション（トップ・カテゴリ一覧） */
.pagination-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 28px 0;
}

.pagination-nav .page-numbers {
  display: inline-block;
  min-width: 2.2em;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--fg);
  background: var(--card);
}

.pagination-nav a.page-numbers:hover {
  background: var(--bg-soft);
  text-decoration: none;
}

.pagination-nav .page-numbers.current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}

.pagination-nav .page-numbers.dots {
  border: none;
  background: transparent;
  min-width: auto;
  padding: 8px 2px;
  color: var(--muted);
}

.pagination-nav .page-numbers.prev,
.pagination-nav .page-numbers.next {
  min-width: auto;
}

/* アーカイブ・カテゴリ一覧の見出し */
.archive-title {
  font-size: 1.25rem;
  margin: 0 0 18px;
  padding: 10px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 5px solid var(--accent);
  border-radius: 6px;
  color: var(--heading);
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--card);
  margin-top: 20px;
}

.site-footer-in {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 16px;
  text-align: center;
}

.footer-title a {
  color: var(--heading);
  font-weight: 700;
}

.footer-copy {
  color: var(--muted);
  font-size: 0.78rem;
  margin: 8px 0 0;
}
