/* =============================================
   FLAT CONTAINER — 共通スタイルシート
   fc-common.css
   ============================================= */

/* ===== Google Fonts は functions.php で wp_enqueue_style 読み込み ===== */

:root {
  --black: #1a1a1a;
  --white: #ffffff;
  --bg: #ffffff;
  --gray-light: #ebebeb;
  --gray-mid: #c8c8c8;
  --gray-dark: #666;
  --border: 2px solid #1a1a1a;
  --font-pixel: 'DotGothic16', monospace;
  --font-daruma: 'Darumadrop One', sans-serif;
  --font-gothic: 'Zen Kaku Gothic New', sans-serif;
  --font-body: 'Noto Sans JP', sans-serif;
  --sidebar-w: 320px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--black);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== JINデフォルト干渉抑制 ===== */
#jin-wrapper,
.jin-container { max-width: none !important; padding: 0 !important; margin: 0 !important; }
.jin-breadcrumb,
.jin-pager-box,
.jin-related-box,
#jin-header,
#jin-footer,
.jin-sp-menu,
#jin-sidebar { display: none !important; }

/* ===================== HEADER ===================== */
#fc-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: var(--white); border-bottom: var(--border) !important;
  height: var(--header-h); padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between;
}
.fc-header-left {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: var(--black);
}
.fc-header-logo { width: 40px; height: 40px; flex-shrink: 0; }
.fc-header-logo img { width: 100%; height: 100%; object-fit: contain; }
.fc-header-title { font-family: var(--font-daruma); line-height: 1.2; letter-spacing: 0.06em; }
.fc-header-title .main { font-size: 16px; display: block; }
.fc-header-title .sub  { font-size: 11px; color: var(--gray-dark); display: block; letter-spacing: 0.1em; }
.fc-header-right { display: flex; align-items: center; gap: 8px; }
.fc-header-icon {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 0; text-decoration: none; color: var(--black);
  transition: all 0.15s; font-size: 18px; background: transparent;
}
.fc-header-icon:hover { background: var(--black); color: var(--white); }
.fc-header-icon img { width: 22px; height: 22px; object-fit: contain; }
.fc-header-icon:hover img { filter: invert(1); }

/* ===================== ページ基底レイアウト ===================== */
#fc-page { margin-top: var(--header-h); min-height: calc(100vh - var(--header-h)); }

/* ===== 2カラム（トップ・一覧系） ===== */
#fc-body { display: flex; min-height: calc(100vh - var(--header-h)); border-bottom: var(--border) !important; }
#fc-main { flex: 1; min-width: 0; border-right: var(--border) !important; }
#fc-sidebar { width: var(--sidebar-w); flex-shrink: 0; display: flex; flex-direction: column; }

/* ===== 1カラム（記事・固定ページ系） ===== */
#fc-single { max-width: 800px; margin: 0 auto; padding: 48px 40px 80px; }

/* ===================== 記事リスト（共通） ===================== */
.fc-post-list { list-style: none; }
.fc-post-item { border-bottom: var(--border) !important; }
.fc-post-item:last-child { border-bottom: none !important; }
.fc-post-link {
  display: flex; align-items: center;
  text-decoration: none; color: var(--black); transition: background 0.12s;
}
.fc-post-link:hover { background: var(--black); }
.fc-post-link:hover .fc-post-meta { color: rgba(255,255,255,0.5); }
.fc-post-link:hover .fc-post-title { color: var(--white); }

.fc-thumb {
  flex-shrink: 0; width: 130px; height: 90px;
  overflow: hidden; border-right: var(--border) !important;
  background: var(--gray-light);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-pixel); font-size: 10px; color: var(--gray-dark);
}
.fc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.fc-post-info { flex: 1; padding: 18px 28px; min-width: 0; }
.fc-post-meta {
  font-family: var(--font-pixel); font-size: 11px;
  color: var(--gray-dark); letter-spacing: 0.1em; margin-bottom: 6px; transition: color 0.12s;
}
.fc-post-title {
  font-family: var(--font-gothic); font-weight: 700;
  font-size: clamp(14px, 2vw, 18px); letter-spacing: 0.03em; line-height: 1.4;
  transition: color 0.12s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ===================== ページヘッダー（アーカイブ系共通） ===================== */
.fc-archive-header {
  border-bottom: var(--border) !important; padding: 28px 32px 24px;
  background: var(--white);
}
.fc-archive-label {
  font-family: var(--font-pixel); font-size: 10px; letter-spacing: 0.2em;
  color: var(--gray-dark); margin-bottom: 6px; display: block; text-transform: uppercase;
}
.fc-archive-title {
  font-family: var(--font-gothic); font-weight: 900; font-size: clamp(20px, 3vw, 28px);
  letter-spacing: 0.03em; line-height: 1.3;
}
.fc-archive-desc {
  margin-top: 8px; font-family: var(--font-gothic); font-size: 13px;
  color: var(--gray-dark); line-height: 1.7;
}

/* ===================== ページネーション ===================== */
.fc-pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 8px; padding: 28px 20px; border-top: var(--border) !important;
}
.fc-pagination .page-numbers {
  font-family: var(--font-pixel); font-size: 12px;
  min-width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border: var(--border) !important; border-radius: 8px; text-decoration: none;
  color: var(--black); background: var(--white); letter-spacing: 0.06em; transition: all 0.12s;
}
.fc-pagination .page-numbers:hover { background: var(--black); color: var(--white); }
.fc-pagination .page-numbers.current { background: var(--black); color: var(--white); }
.fc-pagination ul { list-style: none; display: flex; gap: 8px; align-items: center; }

/* ===================== サイドバー ===================== */
.fc-box-menu {
  display: grid; grid-template-columns: 1fr 1fr;
  grid-auto-rows: 110px !important;
  background: #1a1a1a !important;
  gap: 2px !important;
}
.fc-box-item {
  border: none !important;
  text-decoration: none; color: var(--black);
  padding: 20px 10px; display: flex; flex-direction: column;
  align-items: center; gap: 8px; transition: all 0.12s; background: var(--white) !important;
  min-height: 90px; justify-content: center; box-sizing: border-box !important;
}
.fc-box-item:hover { background: var(--black) !important; color: var(--white); }
.fc-box-item:hover .fc-box-icon img { filter: invert(1); }
.fc-box-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; }
.fc-box-icon img { width: 100%; height: 100%; object-fit: contain; transition: filter 0.12s; }
.fc-box-label { font-family: var(--font-gothic) !important; font-weight: 700 !important; font-size: 11px; letter-spacing: 0.08em; text-align: center; }

.fc-side-tags { flex: 1; }
.fc-side-tags-header {
  background: var(--black); color: var(--white);
  font-family: var(--font-daruma); font-size: 14px; letter-spacing: 0.15em;
  padding: 12px 20px; border-bottom: var(--border) !important; text-align: center;
}
.fc-side-tags-inner { padding: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.fc-side-tags-inner a {
  font-family: var(--font-gothic) !important; font-weight: 700 !important; font-size: 10px;
  border: var(--border) !important; border-radius: 999px;
  padding: 5px 14px; text-decoration: none; color: var(--black);
  background: var(--white); letter-spacing: 0.06em; transition: all 0.12s; white-space: nowrap;
}
.fc-side-tags-inner a:hover { background: var(--black); color: var(--white); }

/* ===================== FOOTER ===================== */
#fc-footer {
  background: transparent !important;
  border: none !important;
  display: grid !important; grid-template-columns: 1fr 1fr 1fr !important;
  column-gap: 24px !important;
  margin: 0 !important; padding: 32px 32px 24px !important;
  width: 100% !important; box-sizing: border-box !important;
}
.fc-footer-col {
  border: var(--border) !important;
  border-right: var(--border) !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  background: var(--white) !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}
.fc-footer-col:first-child { border-left: var(--border) !important; }
.fc-footer-col:last-child { border-right: var(--border) !important; }
#fc-footer .fc-footer-col:last-child { border-right: var(--border) !important; }
.fc-footer-col-title {
  font-family: var(--font-daruma); font-size: 15px; letter-spacing: 0.15em;
  padding: 14px 20px; margin-bottom: 0;
  border-bottom: var(--border) !important; border-radius: 0 !important;
  text-align: center;
  background: var(--black) !important; color: var(--white) !important;
}
.fc-footer-col > *:not(.fc-footer-col-title) {
  padding: 20px 24px;
}
.fc-footer-menu { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.fc-footer-menu li { display: flex; align-items: center; gap: 6px; }
.fc-footer-menu li::before { content: '▶'; font-size: 9px; flex-shrink: 0; }
.fc-footer-menu a {
  font-family: var(--font-gothic); font-weight: 700; font-size: 13px;
  text-decoration: none; color: var(--black); letter-spacing: 0.04em; transition: opacity 0.12s;
}
.fc-footer-menu a:hover { opacity: 0.5; }
.fc-footer-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.fc-footer-tags a {
  font-family: var(--font-gothic) !important; font-weight: 700 !important; font-size: 10px;
  border: var(--border) !important; border-radius: 999px;
  padding: 5px 14px; text-decoration: none; color: var(--black);
  background: var(--white); letter-spacing: 0.06em; transition: all 0.12s; white-space: nowrap;
}
.fc-footer-tags a:hover { background: var(--black); color: var(--white); }
.fc-footer-about { display: flex; flex-direction: column; gap: 10px; }
.fc-footer-about-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.fc-footer-about-logo img { width: 32px; height: 32px; object-fit: contain; }
.fc-footer-about-logo span { font-family: var(--font-daruma); font-size: 14px; letter-spacing: 0.08em; line-height: 1.3; }
.fc-footer-about-url { font-family: var(--font-pixel); font-size: 10px; color: var(--gray-dark); letter-spacing: 0.06em; word-break: break-all; }
.fc-footer-about-url a { color: var(--black); text-decoration: none; border-bottom: 1px solid var(--gray-mid); }
.fc-footer-about-desc { font-family: var(--font-gothic); font-size: 12px; line-height: 1.75; color: var(--gray-dark); }
.fc-copyright {
  grid-column: 1 / -1; border-top: none !important; padding: 14px 28px;
  text-align: center; font-family: var(--font-pixel); font-size: 10px;
  color: var(--gray-dark); letter-spacing: 0.08em; background: var(--bg);
}

/* ===================== SCROLL TOP ===================== */
#fc-scroll-top {
  position: fixed; bottom: 24px; right: 24px; z-index: 300;
  width: 56px; height: 56px; border: none; background: transparent;
  cursor: pointer; padding: 0; opacity: 0; transform: translateY(10px); transition: all 0.2s;
}
#fc-scroll-top img { width: 100%; height: 100%; object-fit: contain; display: block; }
#fc-scroll-top.visible { opacity: 1; transform: translateY(0); }
#fc-scroll-top:hover { transform: translateY(-4px); }

/* ===================== 記事本文スタイル（single / page 共通） ===================== */
.fc-entry-header { margin-bottom: 40px; padding-bottom: 0; border-bottom: none !important; }
.fc-entry-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.fc-entry-cat {
  font-family: var(--font-pixel); font-size: 10px; letter-spacing: 0.1em;
  border: var(--border) !important; border-radius: 999px; padding: 4px 14px;
  text-decoration: none; color: var(--black); background: var(--white);
  transition: all 0.12s; white-space: nowrap;
}
.fc-entry-cat:hover { background: var(--black); color: var(--white); }
.fc-entry-title {
  font-family: var(--font-gothic) !important; font-weight: 900 !important; font-size: clamp(22px, 3.5vw, 32px);
  letter-spacing: 0.03em; line-height: 1.4; margin-bottom: 16px;
  padding-bottom: 16px; border-bottom: var(--border) !important;
}
.fc-entry-meta {
  font-family: var(--font-pixel); font-size: 11px; color: var(--gray-dark);
  letter-spacing: 0.1em; display: flex; gap: 20px; flex-wrap: wrap; align-items: center;
}
.fc-entry-meta-thumb {
  margin-top: 28px; width: 100%; aspect-ratio: 16/9; overflow: hidden;
  border: var(--border) !important; border-radius: 4px; background: var(--gray-light);
}
.fc-entry-meta-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 本文エリア */
.fc-entry-content {
  font-family: var(--font-body); font-size: 15px; line-height: 1.9; color: var(--black);
}
.fc-entry-content h2 {
  font-family: var(--font-gothic) !important; font-weight: 900 !important; font-size: 22px; letter-spacing: 0.08em;
  margin: 48px 0 18px; padding-bottom: 12px; border-bottom: var(--border) !important;
}
.fc-entry-content h3 {
  font-family: var(--font-gothic); font-weight: 900; font-size: 17px;
  margin: 36px 0 12px; padding-left: 14px; border-left: 4px solid var(--black);
}
.fc-entry-content h4 {
  font-family: var(--font-gothic); font-weight: 700; font-size: 15px;
  margin: 28px 0 10px;
}
.fc-entry-content p { margin-bottom: 20px; }
.fc-entry-content a { color: var(--black); text-decoration: underline; text-underline-offset: 3px; }
.fc-entry-content a:hover { opacity: 0.6; }
.fc-entry-content img { max-width: 100%; height: auto; border: var(--border) !important; margin: 20px 0; display: block; }
.fc-entry-content ul,
.fc-entry-content ol { margin: 16px 0 20px 24px; }
.fc-entry-content li { margin-bottom: 8px; line-height: 1.7; }
.fc-entry-content blockquote {
  margin: 24px 0; padding: 20px 24px; border-left: 4px solid var(--black);
  background: var(--gray-light); font-style: italic; color: var(--gray-dark);
  font-family: var(--font-gothic);
}
.fc-entry-content pre,
.fc-entry-content code {
  font-family: 'Courier New', monospace; font-size: 13px;
  background: var(--black); color: var(--white);
  padding: 2px 6px; border-radius: 3px;
}
.fc-entry-content pre { padding: 20px; overflow-x: auto; margin: 20px 0; border-radius: 4px; }
.fc-entry-content pre code { background: none; padding: 0; }
.fc-entry-content table { width: 100%; border-collapse: collapse; margin: 24px 0; }
.fc-entry-content th,
.fc-entry-content td { border: var(--border) !important; padding: 10px 14px; font-size: 14px; text-align: left; }
.fc-entry-content th { background: var(--black); color: var(--white); font-family: var(--font-gothic); font-weight: 700; }

/* 記事フッター（タグ・ナビ） */
.fc-entry-footer { margin-top: 56px; padding-top: 28px; border-top: var(--border) !important; }
.fc-entry-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.fc-entry-tag {
  font-family: var(--font-pixel); font-size: 10px;
  border: var(--border) !important; border-radius: 999px;
  padding: 5px 14px; text-decoration: none; color: var(--black);
  background: var(--white); letter-spacing: 0.06em; transition: all 0.12s;
}
.fc-entry-tag:hover { background: var(--black); color: var(--white); }

.fc-post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fc-post-nav-item {
  border: var(--border) !important; border-radius: 4px; padding: 16px 20px;
  text-decoration: none; color: var(--black); background: var(--white);
  transition: all 0.12s; display: block;
}
.fc-post-nav-item:hover { background: var(--black); color: var(--white); }
.fc-post-nav-label {
  font-family: var(--font-pixel); font-size: 10px; letter-spacing: 0.12em;
  color: var(--gray-dark); margin-bottom: 6px; display: block; transition: color 0.12s;
}
.fc-post-nav-item:hover .fc-post-nav-label { color: rgba(255,255,255,0.5); }
.fc-post-nav-title { font-family: var(--font-gothic); font-weight: 700; font-size: 13px; line-height: 1.5; }
.fc-post-nav-item.next { text-align: right; }

/* ===================== 特殊ページ（404 / 検索） ===================== */
.fc-special-wrap {
  max-width: 640px; margin: 0 auto; padding: 80px 40px;
  text-align: center;
}
.fc-special-code {
  font-family: var(--font-daruma); font-size: clamp(80px, 15vw, 140px);
  letter-spacing: 0.05em; line-height: 1; display: block; margin-bottom: 8px;
}
.fc-special-title {
  font-family: var(--font-daruma); font-size: clamp(18px, 3vw, 24px);
  letter-spacing: 0.12em; margin-bottom: 20px;
}
.fc-special-desc {
  font-family: var(--font-gothic); font-size: 14px; color: var(--gray-dark);
  line-height: 1.8; margin-bottom: 36px;
}
.fc-special-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: var(--border) !important; border-radius: 999px; padding: 12px 28px;
  font-family: var(--font-pixel); font-size: 12px; letter-spacing: 0.1em;
  text-decoration: none; color: var(--black); background: var(--white);
  transition: all 0.15s;
}
.fc-special-btn:hover { background: var(--black); color: var(--white); }

/* 検索フォーム */
.fc-search-form { display: flex; border: var(--border) !important; border-radius: 999px; overflow: hidden; margin-bottom: 40px; }
.fc-search-input {
  flex: 1; border: none; padding: 12px 20px; font-family: var(--font-gothic);
  font-size: 14px; background: var(--white); outline: none; color: var(--black);
}
.fc-search-btn {
  border: none; border-left: var(--border) !important; background: var(--black); color: var(--white);
  padding: 0 20px; cursor: pointer; font-family: var(--font-pixel); font-size: 12px;
  letter-spacing: 0.08em; transition: opacity 0.12s;
}
.fc-search-btn:hover { opacity: 0.7; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  #fc-body { flex-direction: column; }
  #fc-main { border-right: none; border-bottom: var(--border) !important; }
  #fc-sidebar { width: 100%; }
  /* 3列レイアウトに切り替え */
  .fc-box-menu { grid-template-columns: repeat(3, 1fr); }
  .fc-box-item { border: none !important; }
  #fc-footer { grid-template-columns: 1fr 1fr; padding: 24px 24px 0 !important; column-gap: 16px !important; }
  .fc-post-nav { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  :root { --header-h: 56px; }
  #fc-header { padding: 0 16px; }
  .fc-header-title .main { font-size: 13px; }
  .fc-thumb { width: 90px; height: 70px; }
  .fc-post-info { padding: 12px 16px; }
  /* フッターTAGカラムをスマホで非表示、残り2つを縦並びに */
  #fc-footer { grid-template-columns: 1fr !important; padding: 20px 16px 0 !important; column-gap: 0 !important; row-gap: 16px !important; }
  #fc-footer .fc-footer-col:nth-child(2) { display: none !important; }
  .fc-footer-col { border-right: var(--border) !important; border-bottom: var(--border) !important; }
  #fc-single { padding: 32px 20px 60px; }
  .fc-archive-header { padding: 20px 16px 18px; }
  .fc-special-wrap { padding: 60px 20px; }
}
