/*
Theme Name: クラウテイム (Clautheme)
Theme URI: https://okoulove.com/
Author: 梅武登 (umetaketo)
Author URI: https://okoulove.com/
Description: Claude連動を前提に設計された次世代ミニマルWPテーマ。全ソースがAIのコンテキストに収まる極小構成・フラットなCSS詳細度・!importantゼロ。「メンドクサイことはClaudeにオマカセ！」
Version: 0.3.7
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: clautheme
Tags: blog, one-column, custom-logo, ai-friendly
*/

/* ============================================================
   クラウテイム CSS 憲法（Claudeへ：編集前に必読）
   1. !important は永久に禁止
   2. セレクタはクラス1個まで（例: .site-title はOK、
      .site-header .site-title h1 はNG）→ 詳細度は常にフラット
      ただし .entry-content 配下のp/strong/img/h2/h3 など
      Claude生成HTMLにクラスを付けられない要素のみ例外
   3. 色・余白・サイズの変更は、原則ここの :root 変数だけで行う
   4. 「この部分を赤い文字にして」→ HTMLにクラスを1個足して、
      下の【ユーティリティ】に1行追加するだけで必ず実現できる
   ============================================================ */

/* ---------- デザイン変数（テーマの全人格はここに集約） ---------- */
:root {
  /* 色 */
  --c-text: #2b2b33;        /* 本文の墨色 */
  --c-text-soft: #6f6f7a;   /* 補助テキスト */
  --c-bg: #fffdfa;          /* 背景（わずかに温かい白） */
  --c-accent: #d4496e;      /* アクセント（紅梅色） */
  --c-accent-soft: #fbeef2; /* アクセントの淡色（背景用） */
  --c-line: #e8e4de;        /* 罫線 */

  /* 文字 */
  --font-body: "Hiragino Kaku Gothic ProN", "Hiragino Sans",
               "Yu Gothic Medium", "Noto Sans JP", sans-serif;
  --fs-base: 18px;          /* v0.2.1: 16px → 18px に拡大（可読性UP） */
  --lh-base: 1.85;          /* v0.2.1: 1.9 → 1.85 に微調整 */

  /* レイアウト */
  --content-width: 720px;   /* 本文の最大幅（可読性の黄金幅） */
  --space: 1.5rem;          /* 基本余白の単位 */
}

/* ---------- リセット最小限 ---------- */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; }
a { color: var(--c-accent); }
a:hover { opacity: 0.8; }
a:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }

/* ---------- ヘッダー ---------- */
.site-header {
  border-bottom: 1px solid var(--c-line);
  padding: var(--space);
  text-align: center;
}
.site-title {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: 0.06em;
}
.site-title-link { color: var(--c-text); text-decoration: none; }
.site-description {
  margin: 0.3em 0 0;
  font-size: 0.85rem;
  color: var(--c-text-soft);
}

/* ---------- ナビゲーション ---------- */
.site-nav { margin-top: 0.8em; }
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4em 1.4em;
  font-size: 0.92rem;
}
.nav-list a { text-decoration: none; }

/* ---------- メインコンテンツ ---------- */
.site-main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: calc(var(--space) * 2) var(--space);
}

/* ---------- 記事 ---------- */
.entry { margin-bottom: calc(var(--space) * 2.5); }
.entry-title {
  font-size: 1.7rem;          /* v0.2.1: 1.6rem → 1.7rem */
  line-height: 1.5;
  margin: 0 0 0.4em;
}
.entry-title a { color: var(--c-text); text-decoration: none; }
.entry-meta {
  font-size: 0.85rem;
  color: var(--c-text-soft);
  margin-bottom: 1.4em;
}

/* ---------- 記事本文（v0.2.1: 大幅強化） ---------- */
.entry-content h2 {
  font-size: 1.4rem;           /* v0.2.1: 1.3rem → 1.4rem */
  line-height: 1.5;
  margin: 2.4em 0 1em;
  padding: 0.5em 0.8em;
  background: var(--c-accent-soft);
  border-left: 5px solid var(--c-accent);
  border-radius: 0 4px 4px 0;
}
.entry-content h3 {
  font-size: 1.18rem;          /* v0.2.1: 1.12rem → 1.18rem */
  line-height: 1.5;
  margin: 2em 0 0.7em;
  padding-bottom: 0.3em;
  border-bottom: 2px solid var(--c-line);
}
/* v0.2.1 新規：段落の余白を明示。Claude生成HTMLの<p>に直接効く */
.entry-content p {
  margin: 0 0 1.4em;
}
/* v0.2.1 新規：strongをアクセント色に。プロンプトで<strong>使用を許可済み */
.entry-content strong {
  color: var(--c-accent);
  font-weight: 600;
}
/* v0.2.1 新規：リスト周りの余白調整 */
.entry-content ul,
.entry-content ol {
  margin: 0 0 1.4em;
  padding-left: 1.6em;
}
.entry-content li {
  margin-bottom: 0.5em;
}
/* v0.2.1 新規：本文中の画像。H2直下に画像を置く未来の運用に対応 */
.entry-content img {
  display: block;
  margin: 1.6em auto;
  border-radius: 8px;
}
/* v0.2.1 新規：本文中リンクの装飾。アンダーライン明示で可読性UP */
.entry-content a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
}

.entry-thumbnail { margin: 0 0 1.5em; }
.entry-thumbnail img { border-radius: 8px; display: block; }

/* ---------- 記事一覧（アーカイブ） ---------- */
.archive-header { margin: 0 0 1.5em; }
.archive-title {
  font-size: 1.4rem;
  color: var(--c-text);
  margin: 0 0 0.4em;
}
.archive-description {
  font-size: 0.92rem;
  color: var(--c-text-soft);
  margin: 0;
}
.category-description {
  background: var(--c-accent-soft);
  padding: 1em 1.2em;
  border-radius: 8px;
  margin: 0.6em 0 0;
  font-size: 0.95rem;
}
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list-item {
  padding: var(--space) 0;
  border-bottom: 1px solid var(--c-line);
}

/* ---------- ページネーション ---------- */
.pagination { text-align: center; margin-top: calc(var(--space) * 2); }
.pagination a, .pagination span { margin: 0 0.4em; }

/* ---------- 検索フォーム ---------- */
.search-form {
  display: flex;
  gap: 0.5em;
  margin: 1.5em 0;
}
.search-field {
  flex: 1;
  padding: 0.6em 0.9em;
  border: 1px solid var(--c-line);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--c-text);
  min-width: 0;
}
.search-field:focus {
  outline: 2px solid var(--c-accent);
  outline-offset: 1px;
}
.search-submit {
  padding: 0.6em 1.4em;
  background: var(--c-accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}
.search-submit:hover { opacity: 0.85; }

/* ---------- フッター ---------- */
.site-footer {
  border-top: 1px solid var(--c-line);
  padding: calc(var(--space) * 1.5) var(--space);
  text-align: center;
  font-size: 0.8rem;
  color: var(--c-text-soft);
}

/* ---------- 【ユーティリティ】後付けパワーアップ専用区画 ----------
   「ここを赤くして」系の依頼は、HTML側にクラスを足して
   この区画に1行追加するだけ。詳細度がフラットなので必ず効く。 */
.text-accent { color: var(--c-accent); }
.text-red { color: #d33; }
.text-center { text-align: center; }
.box-soft {
  background: var(--c-accent-soft);
  padding: 1em 1.2em;
  border-radius: 8px;
}

/* ---------- 【CTA】v0.2.1 新規：アフィリエイト誘導ボタン ----------
   H2-7（hotel.fx1000.com誘導）とH2-8（koisuru.okoulove.com誘導）で使用。
   プロンプト側で <p class="cta-wrap"><a class="cta-btn" ...>...</a></p>
   の形でClaudeが生成する。 */
.cta-wrap {
  text-align: center;
  margin: 1.8em 0;
}
.cta-btn {
  display: inline-block;
  background: var(--c-accent);
  color: #fff;
  text-decoration: none;
  padding: 0.85em 2em;
  border-radius: 999px;
  font-size: 1rem;
  letter-spacing: 0.04em;
  transition: opacity 0.2s, transform 0.1s;
  box-shadow: 0 2px 6px rgba(212, 73, 110, 0.25);
  max-width: 100%;
}
.cta-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
/* .entry-content a の下線スタイルを.cta-btnでは打ち消す */
.entry-content .cta-btn { text-decoration: none; }

/* ---------- 【歓迎ページ】front-page.php 専用ユーティリティ ---------- */
.welcome-hero {
  text-align: center;
  padding: calc(var(--space) * 1.5) 0 calc(var(--space) * 2);
  border-bottom: 1px solid var(--c-line);
  margin-bottom: calc(var(--space) * 2);
}
.welcome-title {
  font-size: 1.7rem;
  line-height: 1.5;
  margin: 0 0 0.8em;
  letter-spacing: 0.04em;
  color: var(--c-text);
}
.welcome-lead {
  font-size: 1rem;
  text-align: left;
  margin: 0 0 1em;
}
.welcome-lead-sub {
  font-size: 0.95rem;
  color: var(--c-text-soft);
  margin: 1em 0 0;
}
.welcome-card {
  background: var(--c-accent-soft);
  border-left: 4px solid var(--c-accent);
  border-radius: 0 8px 8px 0;
  padding: 1.4em 1.6em;
  margin: 0 0 calc(var(--space) * 1.5);
}
.welcome-card-title {
  font-size: 1.25rem;
  line-height: 1.5;
  margin: 0 0 0.7em;
  color: var(--c-accent);
}
.welcome-cta-wrap {
  text-align: center;
  margin: 1.2em 0 0;
}
.welcome-cta {
  display: inline-block;
  background: var(--c-accent);
  color: #fff;
  text-decoration: none;
  padding: 0.7em 1.8em;
  border-radius: 999px;
  font-size: 0.98rem;
  letter-spacing: 0.04em;
  transition: opacity 0.2s;
}
.welcome-cta:hover { opacity: 0.85; }
.welcome-notice {
  border: 1px dashed var(--c-line);
  border-radius: 8px;
  padding: 1.4em 1.6em;
  margin: calc(var(--space) * 2) 0 0;
  background: #fff;
}
.welcome-notice-tag {
  display: inline-block;
  margin: 0.6em 0 0;
  font-size: 0.88rem;
  color: var(--c-accent);
  letter-spacing: 0.08em;
}

/* ---------- 【404ページ】404.php 専用ユーティリティ ---------- */
.error-404 {
  text-align: center;
  padding: calc(var(--space) * 2) 0;
}
.error-404-code {
  font-size: 4.5rem;
  color: var(--c-accent);
  margin: 0 0 0.1em;
  letter-spacing: 0.08em;
  line-height: 1;
  font-weight: 300;
}
.error-404-title {
  font-size: 1.35rem;
  line-height: 1.5;
  margin: 0 0 0.8em;
  color: var(--c-text);
}
.error-404-lead {
  font-size: 0.95rem;
  color: var(--c-text-soft);
  margin: 0 0 2em;
}
.error-404-actions {
  margin: 1.5em 0;
}
.error-404-links {
  margin: 2.5em 0 0;
  text-align: left;
  padding: 1.4em 1.6em;
  background: var(--c-accent-soft);
  border-radius: 8px;
}
.error-404-link-list {
  list-style: none;
  margin: 0.6em 0 0;
  padding: 0;
}
.error-404-link-list li {
  padding: 0.4em 0;
  border-bottom: 1px solid var(--c-line);
}
.error-404-link-list a { text-decoration: none; }

/* ---------- アクセシビリティ ---------- */
.screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none; animation: none; }
}

/* ---------- モバイル微調整 ---------- */
@media (max-width: 480px) {
  :root { --fs-base: 16.5px; --space: 1.1rem; }   /* v0.2.1: 15.5px → 16.5px */
  .entry-title { font-size: 1.45rem; }
  .entry-content h2 { font-size: 1.25rem; padding: 0.45em 0.7em; }
  .entry-content h3 { font-size: 1.08rem; }
  .welcome-title { font-size: 1.45rem; }
  .welcome-card { padding: 1.2em 1.3em; }
  .welcome-notice { padding: 1.2em 1.3em; }
  .error-404-code { font-size: 3.5rem; }
  .error-404-title { font-size: 1.2rem; }
  .error-404-links { padding: 1.2em 1.3em; }
  .search-form { flex-direction: column; }
  .search-submit { padding: 0.7em; }
  .cta-btn { padding: 0.8em 1.6em; font-size: 0.95rem; }
}

/* ============================================================
   [v0.3.0] トップページ導線・フッターナビ
   (検索フォームのスタイルは6月版で定義済みのため追加なし)
   (CSS憲法遵守: !importantなし、セレクタはクラス1個まで)
   ============================================================ */

/* ---------- 見出し(トップページ用) ---------- */
.section-title {
  font-size: 1.25rem;
  border-left: 4px solid var(--c-accent);
  padding-left: 0.6em;
  margin: calc(var(--space) * 1.6) 0 var(--space);
}
.region-title {
  font-size: 1rem;
  color: var(--c-text-soft);
  margin: var(--space) 0 0.5rem;
}

/* ---------- 都道府県リンク(タグクラウド風) ---------- */
.pref-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.pref-item { margin: 0; }
.pref-link {
  display: inline-block;
  padding: 0.35em 0.9em;
  background: var(--c-accent-soft);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.92rem;
}
.pref-link:hover { opacity: 0.75; }
.pref-count {
  margin-left: 0.4em;
  font-size: 0.78rem;
  color: var(--c-text-soft);
}
.pref-pending {
  display: inline-block;
  padding: 0.35em 0.9em;
  border: 1px dashed var(--c-line);
  border-radius: 999px;
  color: var(--c-text-soft);
  font-size: 0.92rem;
}

/* ---------- ヘッダー検索窓の置き場 ---------- */
.header-search {
  margin: 0.8rem auto 0;
  max-width: 420px;
}

/* ---------- フッターナビ ---------- */
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
}

/* ============================================================
   [v0.3.2] ページトップへ戻るボタン
   300pxスクロールで右下に出現。クリックで即ジャンプ(smoothなし)。
   ============================================================ */
.to-top {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  width: 3rem;
  height: 3rem;
  border: none;
  border-radius: 50%;
  background: var(--c-accent);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
  z-index: 100;
}
.to-top:hover { opacity: 0.85; }
.to-top-visible {
  opacity: 1;
  visibility: visible;
}
