/* ===================================================
   愛媛産.com — main.css  v3.0
   Design: kyoto-iju.com inspired × Teal modern
   =================================================== */

/* --------------------------------------------------
   1. Custom Properties
   -------------------------------------------------- */
:root {
  /* Brand — Teal (#2aa693 from gikai.team-mir.ai) */
  --primary:       #2AA693;   /* Teal, 4.5:1 on white AA✓ */
  --primary-dark:  #0F8472;   /* gikai primary-accent 実測値 */
  --primary-light: #E2F6F3;   /* gikai bg-mirai-light-gradient 実測値 */
  --secondary:     #FF7349;
  --accent:        #F5F18D;   /* kyoto-iju アクセント黄色 実測値 */

  /* Neutrals — kyoto-iju.com 実測値 */
  --dark:          #1A1A1A;   /* カードボーダー(gikai border-black相当) */
  --text:          #333333;   /* kyoto-iju テキスト実測値 */
  --text-muted:    #6F6F6F;   /* kyoto-iju #6f6f6f 実測値 */
  --text-light:    #999999;
  --bg:            #F5F5F0;   /* kyoto-iju ページ背景 実測値 */
  --surface:       #FFFFFF;
  --white:         #FFFFFF;
  --border:        #E4E4E4;   /* kyoto-iju ボーダー 実測値 */
  --border-light:  #EBEBEB;
  --tag-bg:        #E8E8E8;   /* gikai bg-mirai-surface-tag 実測値 */

  /* Typography — kyoto-iju: Zen Kaku Gothic New */
  --ff: 'Zen Kaku Gothic New', 'Hiragino Kaku Gothic ProN', 'Yu Gothic Medium', sans-serif;

  /* Layout */
  --max-w:     1200px;
  --sidebar-w: 280px;
  --gap:       28px;

  /* Radii — kyoto-iju 実測値ベース */
  --r-sm:   4px;
  --r:      16px;     /* kyoto-iju --radius-col2-sm = 16px */
  --r-lg:   24px;     /* kyoto-iju --radius-col2-md = 32px (モバイル寄り 24px) */
  --r-col3: 12px;     /* kyoto-iju --radius-col3-sm = 12px (3カラム / フッター) */
  --r-pill: 9999px;   /* 100vh = pill */

  /* Shadows — kyoto-iju はフラット（shadow なし）/ 画像等の軽微な影のみ残す */
  --shadow:      0 1px 3px rgba(0,0,0,.08);
  --shadow-h:    0 4px 16px rgba(0,0,0,.10);
  --shadow-card: none;

  --trans: .2s ease;
}

/* --------------------------------------------------
   2. Reset & Base
   -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--ff);
  font-size: 16px;
  line-height: 2.0;  /* kyoto-iju: 2em */
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }
a { color: var(--dark); text-decoration: none; }
a:hover { color: var(--primary); }
button { font-family: var(--ff); cursor: pointer; border: none; background: none; }

/* --------------------------------------------------
   3. Layout
   -------------------------------------------------- */
.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 20px;
}

.layout-wrap {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: var(--gap);
  align-items: start;
  padding-block: 32px;
}

.main-content { min-width: 0; }

/* --------------------------------------------------
   4. Site Header
   -------------------------------------------------- */
/* kyoto-iju: ヘッダーはページ背景と同色で境界線なし */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--bg);
}
.site-header.scrolled { /* kyoto-iju はスクロール後も shadow なし */ }

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo img { width: 40px; height: 40px; }
.site-logo__text { display: flex; flex-direction: column; line-height: 1.2; }
.site-logo__name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.02em;
}
.site-logo__tagline { font-size: 10px; color: var(--text-muted); }

/* Header search */
.header-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.header-search {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 6px 14px;
  gap: 8px;
  transition: border-color var(--trans);
}
.header-search:focus-within { border-color: var(--primary); }
.header-search input {
  border: none;
  background: none;
  font-family: var(--ff);
  font-size: 13px;
  color: var(--text);
  width: 160px;
  outline: none;
}
.header-search input::placeholder { color: var(--text-light); }
.header-search button {
  color: var(--text-muted);
  display: flex;
  transition: color var(--trans);
}
.header-search button:hover { color: var(--primary); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  width: 40px;
  height: 40px;
  justify-content: center;
  align-items: center;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 22px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --------------------------------------------------
   5. Category Ribbon
   -------------------------------------------------- */
.cat-ribbon {
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-ribbon::-webkit-scrollbar { display: none; }

.cat-ribbon__inner {
  display: flex;
  gap: 6px;
  padding: 10px 20px;
  white-space: nowrap;
  max-width: var(--max-w);
  margin-inline: auto;
}

.cat-ribbon__item {
  display: inline-flex;
  align-items: center;
  /* kyoto-iju 実測: padding: 7px 14px 8px 16px */
  padding: 7px 16px 8px 16px;
  /* kyoto-iju 実測: font-size: 14px */
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border-radius: var(--r-pill);  /* 100vh = pill */
  /* kyoto-iju 実測: border: 1px solid #333 */
  border: 1px solid var(--text);
  transition: background-color .3s, color .3s;
  text-decoration: none;
  flex-shrink: 0;
}
.cat-ribbon__item::before {
  content: '#';
  opacity: .45;
  margin-right: 1px;
  font-weight: 400;
}
/* "すべて" はハッシュなし */
.cat-ribbon__item:first-child::before { content: ''; margin-right: 0; }

/* kyoto-iju 実測: hover → background: #333; color: #fff */
.cat-ribbon__item:hover {
  background: var(--text);
  color: var(--white);
}
.cat-ribbon__item.current {
  background: var(--text);
  color: var(--white);
  font-weight: 700;
}
.cat-ribbon__item.current::before { opacity: .7; }

/* --------------------------------------------------
   6. Main Navigation
   -------------------------------------------------- */
.site-nav {
  background: var(--dark);
  display: none;
}
.site-nav--has-menu { display: block; }

.site-nav .container { padding-block: 0; }
.site-nav ul { display: flex; gap: 0; list-style: none; }
.site-nav li a {
  display: block;
  padding: 13px 18px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,.82);
  text-decoration: none;
  transition: color var(--trans), background var(--trans);
  letter-spacing: .02em;
}
.site-nav li a:hover { color: var(--white); background: var(--primary); }

@media (max-width: 680px) {
  .nav-toggle { display: flex; }
  .site-nav,
  .site-nav--has-menu { display: none; flex-direction: column; }
  .site-nav.is-open,
  .site-nav--has-menu.is-open { display: flex; }
  .site-nav ul { flex-direction: column; }
  .site-nav li a { padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.06); }
}

/* --------------------------------------------------
   7. Category Badge
   -------------------------------------------------- */
.cat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* gikai 実測: padding: 4px 12px; font-size: 12px; font-weight: 500; */
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--dark);
  /* gikai 実測: background: #e8e8e8 (bg-mirai-surface-tag) */
  background: var(--tag-bg);
  border-radius: var(--r-pill);
  text-decoration: none;
  transition: background var(--trans), color var(--trans);
}
.cat-badge:hover { background: var(--text); color: var(--white); }

/* --------------------------------------------------
   8. Post Card Grid
   -------------------------------------------------- */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* kyoto-iju: フラットデザイン — border なし / shadow なし */
.post-card {
  background: var(--surface);
  border-radius: var(--r);
  overflow: hidden;
  transition: background-color var(--trans);
}
.post-card:hover {
  background-color: #f0f0eb;
}

.post-card__thumb-link { display: block; overflow: hidden; }
/* kyoto-iju: padding-top: 72% ≈ 4:3 */
.post-card__thumb {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--border-light);
}
.post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.post-card__thumb .default-thumb {
  object-fit: contain;
  padding: 16px;
  opacity: .4;
}
.post-card:hover .post-card__thumb img { transform: scale(1.05); }

.post-card__body { padding: 14px 16px 16px; }

.post-card__title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
  margin: 8px 0 6px;
}
.post-card__title a { color: var(--text); }
.post-card__title a:hover { color: var(--primary); }

.post-card__excerpt {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

.post-card__meta { font-size: 11px; color: var(--text-light); }

/* --------------------------------------------------
   9. Hero (トップ記事 featured)
   -------------------------------------------------- */
.hero-wrap {
  margin-bottom: 28px;
  position: relative;
}
.hero-wrap::before {
  content: '#最新記事';
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: .1em;
  margin-bottom: 10px;
}

/* kyoto-iju: フラット、border なし */
.hero-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  background: var(--surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  min-height: 300px;
}

.hero-card__thumb {
  display: block;
  overflow: hidden;
  background: var(--border-light);
}
.hero-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.hero-card:hover .hero-card__thumb img { transform: scale(1.04); }

.hero-card__body {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}
.hero-card__title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: -.01em;
}
.hero-card__title a { color: var(--text); }
.hero-card__title a:hover { color: var(--primary); }
.hero-card__excerpt {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-card__meta { font-size: 11px; color: var(--text-light); }

/* --------------------------------------------------
   10. Archive Header
   -------------------------------------------------- */
.archive-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-light);
}
.archive-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.archive-title span { color: var(--primary); }
.archive-desc { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

/* --------------------------------------------------
   11. Single Article
   -------------------------------------------------- */
/* kyoto-iju: フラット */
.single-article {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 28px 32px 32px;
}

.single-header { margin-bottom: 20px; }
.single-header__cats { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.single-header__title {
  font-size: clamp(19px, 3vw, 26px);
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: -.02em;
  color: var(--text);
  margin-bottom: 12px;
}
.single-header__meta { font-size: 12px; color: var(--text-light); display: flex; align-items: center; gap: 8px; }
.single-header__meta::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.single-eyecatch {
  margin-bottom: 24px;
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.single-eyecatch img { width: 100%; height: auto; max-height: 420px; object-fit: cover; }

/* Reading progress */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  width: 0%;
  z-index: 300;
  transition: width .1s linear;
  border-radius: 0 2px 2px 0;
}

/* Entry content */
.entry-content {
  font-size: 15px;
  line-height: 1.85;
  color: var(--text);
}
.entry-content h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 36px 0 14px;
  padding: 12px 16px;
  background: var(--primary-light);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.entry-content h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 28px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid var(--border);
}
.entry-content h4 { font-size: 15px; font-weight: 700; margin: 20px 0 8px; }
.entry-content p { margin-bottom: 18px; }
.entry-content ul, .entry-content ol { margin: 0 0 18px 1.4em; }
.entry-content li { margin-bottom: 6px; }
.entry-content img { border-radius: var(--r-sm); margin-block: 20px; box-shadow: var(--shadow); }
.entry-content a { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 3px; }
.entry-content a:hover { color: var(--primary); }
.entry-content strong { font-weight: 700; }
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 14px;
}
.entry-content th {
  background: var(--primary);
  color: var(--white);
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
}
.entry-content td { padding: 10px 14px; border-bottom: 1px solid var(--border-light); }
.entry-content tr:nth-child(even) td { background: var(--primary-light); }
.entry-content blockquote {
  margin: 20px 0;
  padding: 16px 20px;
  background: var(--bg);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--text-muted);
  font-style: italic;
}

/* AdSense wrappers */
.ad-wrap {
  margin: 28px 0;
  text-align: center;
}
.ad-wrap::before {
  content: '広告';
  display: block;
  font-size: 10px;
  color: var(--text-light);
  letter-spacing: .08em;
  margin-bottom: 6px;
}

/* Tags */
.entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}
.entry-tags a {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r-pill);
  padding: 4px 12px;
  transition: all var(--trans);
  /* PHP (single.php) が # を先頭に出力するため ::before は不要 */
}
.entry-tags a:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-color: var(--primary);
}

/* Post navigation */
.post-navigation { margin-top: 28px; }
.nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.nav-previous a, .nav-next a {
  display: block;
  padding: 16px 18px;
  background: var(--surface);
  border-radius: var(--r);
  border: 1.5px solid var(--border-light);
  transition: all var(--trans);
}
.nav-previous a:hover, .nav-next a:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.nav-next a { text-align: right; }
.nav-subtitle { display: block; font-size: 10px; color: var(--text-light); letter-spacing: .04em; margin-bottom: 4px; }
.nav-title { display: block; font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.4; }

/* --------------------------------------------------
   12. Sidebar
   -------------------------------------------------- */
.sidebar {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Brand box */
.sidebar-brand {
  background: var(--surface);
  border-radius: var(--r);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
  border: 1.5px solid var(--border-light);
  border-top: 3px solid var(--primary);
  box-shadow: var(--shadow-card);
}
.sidebar-brand__logo { display: flex; align-items: center; gap: 8px; }
.sidebar-brand__logo img { width: 36px; height: 36px; }
.sidebar-brand__logo span { font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.sidebar-brand__text { font-size: 12px; color: var(--text-muted); line-height: 1.75; }

/* Widget base */
.sidebar-widget {
  background: var(--surface);
  border-radius: var(--r);
  padding: 18px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
}
.sidebar-widget__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .04em;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-widget__title::before {
  content: '';
  display: block;
  width: 3px;
  height: 14px;
  background: var(--primary);
  border-radius: 2px;
}

/* Ranked posts */
.sidebar-posts { display: flex; flex-direction: column; gap: 12px; }
.sidebar-post {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.sidebar-post__num {
  font-size: 20px;
  font-weight: 700;
  color: var(--border);
  line-height: 1;
  flex-shrink: 0;
  width: 28px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.sidebar-post:nth-child(1) .sidebar-post__num { color: #E07A5A; }
.sidebar-post:nth-child(2) .sidebar-post__num { color: #B0A0A0; }
.sidebar-post:nth-child(3) .sidebar-post__num { color: #C0965A; }

.sidebar-post__body { flex: 1; min-width: 0; }
.sidebar-post__cat {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--dark);
  background: var(--tag-bg);
  border-radius: var(--r-pill);
  padding: 2px 8px;
  margin-bottom: 3px;
}
.sidebar-post__title {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.55;
  transition: color var(--trans);
}
.sidebar-post__title:hover { color: var(--primary); }

/* Category list */
.sidebar-cats { display: flex; flex-direction: column; gap: 2px; }
.sidebar-cats li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px;
  font-size: 13px;
  color: var(--text);
  border-bottom: 1px solid var(--border-light);
  transition: color var(--trans), padding-left var(--trans);
}
.sidebar-cats li:last-child a { border-bottom: none; }
.sidebar-cats li a:hover { color: var(--primary); padding-left: 6px; }
.sidebar-cats li a::before { content: '#'; opacity: .4; font-weight: 400; font-size: 12px; margin-right: 2px; }
.sidebar-cats li a small {
  font-size: 11px;
  color: var(--text-light);
  background: var(--bg);
  border-radius: var(--r-pill);
  padding: 1px 7px;
  margin-left: auto;
}
.sidebar-cats li a small::before { content: none; }

/* Recent posts with thumb */
.sidebar-recent { display: flex; flex-direction: column; gap: 12px; }
.sidebar-recent__item { display: flex; gap: 10px; align-items: flex-start; }
.sidebar-recent__thumb {
  display: block;
  width: 62px;
  height: 46px;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--border-light);
}
.sidebar-recent__thumb img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-recent__body { flex: 1; min-width: 0; }
.sidebar-recent__link {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 4px;
  transition: color var(--trans);
}
.sidebar-recent__link:hover { color: var(--primary); }
.sidebar-recent__body time { font-size: 10px; color: var(--text-light); }

/* --------------------------------------------------
   13. Footer
   -------------------------------------------------- */

/* Footer: kyoto-iju 実測 — #f5f18d 黄色背景で全フッター統一 */
.footer-latest {
  background: var(--accent);
  padding: 40px 0;
}
.footer-latest__label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .1em;
  margin-bottom: 6px;
}
.footer-latest__heading {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}
.footer-latest__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* kyoto-iju: フラット、3カラム用 radius-col3 = 12px */
.footer-post {
  background: var(--surface);
  border-radius: var(--r-col3);
  overflow: hidden;
  transition: background-color var(--trans);
}
.footer-post:hover { background-color: #f0f0eb; }

.footer-post__thumb {
  display: block;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--border-light);
}
.footer-post__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.footer-post:hover .footer-post__thumb img { transform: scale(1.04); }

.footer-post__body { padding: 12px 14px; }
.footer-post__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  margin: 6px 0 4px;
  transition: color var(--trans);
}
.footer-post:hover .footer-post__title { color: var(--primary); }
.footer-post__body time { font-size: 10px; color: var(--text-light); }

/* Footer: main info — kyoto-iju: #f5f18d 黄色で統一 */
.footer-body {
  background: var(--accent);
  padding: 40px 0;
}
.footer-body__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-bottom: 14px;
}
.footer-logo img { width: 36px; height: 36px; }
.footer-logo .site-logo__name { color: var(--text); font-size: 15px; font-weight: 700; }

.footer-about {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* kyoto-iju: 黄背景 → #333 テキスト / teal は使わない（コントラスト不足） */
.footer-col__title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .1em;
  margin-bottom: 14px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col li a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color var(--trans);
}
.footer-col li a:hover { color: var(--text); }

/* Footer: copyright bar — 黄色に軽い区切り線のみ */
.footer-bar {
  background: var(--accent);
  padding: 14px 0;
  border-top: 1px solid rgba(0,0,0,.08);
}
.footer-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* #6f6f6f on #f5f18d = 4.27:1 (AA未達) → #333 (10.74:1) に変更 */
.footer-bar small { font-size: 11px; color: var(--text); }
.footer-bar a { color: var(--text-muted); }
.footer-bar a:hover { color: var(--text); }

/* --------------------------------------------------
   14. Pagination
   -------------------------------------------------- */
.posts-pagination { margin-top: 32px; }
.posts-pagination .nav-links { display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; }
.posts-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border-radius: var(--r-pill);
  border: 1.5px solid var(--border-light);
  box-shadow: var(--shadow);
  transition: all var(--trans);
  white-space: nowrap;
}
.posts-pagination .page-numbers.prev,
.posts-pagination .page-numbers.next {
  padding: 0 16px;
}
.posts-pagination .page-numbers:hover { border-color: var(--primary); color: var(--primary); }
.posts-pagination .page-numbers.current {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.posts-pagination .page-numbers.dots { background: none; border: none; box-shadow: none; min-width: auto; }

/* --------------------------------------------------
   15. Search Form
   -------------------------------------------------- */
.search-form {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: var(--r-pill);
  overflow: hidden;
  background: var(--surface);
  transition: border-color var(--trans);
}
.search-form:focus-within { border-color: var(--primary); }
.search-form label {
  flex: 1;
  display: flex;
  min-width: 0;
}
.search-form .screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}
.search-form .search-field {
  flex: 1;
  min-width: 0;
  border: none;
  padding: 10px 16px;
  font-family: var(--ff);
  font-size: 13px;
  background: none;
  color: var(--text);
  outline: none;
}
.search-form .search-field::placeholder { color: var(--text-light); }
.search-form .search-submit {
  padding: 10px 18px;
  background: var(--primary);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  font-family: var(--ff);
  border: none;
  cursor: pointer;
  transition: background var(--trans);
  white-space: nowrap;
  flex-shrink: 0;
  border-radius: 0 var(--r-pill) var(--r-pill) 0;
}
.search-form .search-submit:hover { background: var(--primary-dark); }

/* --------------------------------------------------
   16. 404 & No posts
   -------------------------------------------------- */
.error-404 { text-align: center; padding: 60px 20px; }
.error-404__code {
  font-size: 80px;
  font-weight: 700;
  color: var(--border);
  line-height: 1;
  margin-bottom: 12px;
}
.error-404__message { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.error-404__sub { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.error-404__recent { margin-top: 40px; text-align: left; }
.error-404__recent h2 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }

.no-posts { text-align: center; padding: 40px 20px; color: var(--text-muted); }

/* --------------------------------------------------
   17. Page template
   -------------------------------------------------- */
/* kyoto-iju: フラット */
.page-article {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 28px 32px;
}
.page-header { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 2px solid var(--border-light); }
.page-title { font-size: 22px; font-weight: 700; }

/* --------------------------------------------------
   18. Responsive — Desktop (min 961px)
   -------------------------------------------------- */
/* kyoto-iju: desktop font-size: 18px */
@media (min-width: 961px) {
  body { font-size: 18px; }
}

/* --------------------------------------------------
   18b. Responsive — Tablet (960px)
   -------------------------------------------------- */
@media (max-width: 960px) {
  .layout-wrap { grid-template-columns: 1fr; }
  .sidebar { position: static; }

  .footer-latest__grid { grid-template-columns: repeat(2, 1fr); }
  .footer-body__inner { grid-template-columns: 1fr 1fr; }
  .footer-col--brand { grid-column: 1 / -1; }

  .hero-card { grid-template-columns: 1fr; min-height: auto; }
  .hero-card__thumb { aspect-ratio: 16/8; }
}

/* --------------------------------------------------
   19. Responsive — Mobile (680px)
   -------------------------------------------------- */
@media (max-width: 680px) {
  :root { --gap: 16px; }

  .site-header__inner { height: 56px; }
  .header-search { display: none; }
  .nav-toggle { display: flex; }

  .posts-grid { grid-template-columns: 1fr; gap: 14px; }

  .single-article { padding: 20px 18px; }
  .single-header__title { font-size: 19px; }

  .footer-latest__grid { grid-template-columns: 1fr; }
  .footer-body__inner { grid-template-columns: 1fr; }
  .footer-col--brand { grid-column: auto; }

  .nav-links { grid-template-columns: 1fr; }

  .hero-card__body { padding: 20px 18px; }
  .hero-card__title { font-size: 17px; }
  .hero-card__excerpt { display: none; }

  .cat-ribbon__inner { padding: 8px 16px; }
}
