@charset "UTF-8";
/*
Theme Name: Cocoon Child - こころ育ちノート
Template: cocoon-master
Version: 1.1.1
Description: Cocoon 子テーマ「こころ育ちノート」（フミblog）専用。人間関係・仕事・子育てをテーマにしたやさしい紙・手帳風デザイン。
Author: フミ
Author URI: https://example.com/
Theme URI: https://example.com/
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cocoon-child-kokoro
*/

/* ============================================================
   こころ育ちノート — 子テーマスタイル
   ------------------------------------------------------------
   親テーマ Cocoon の上に重ねて適用されます。
   Cocoonのショートコード・目次・SEO機能等はすべて残ります。
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --kk-bg: #FBF7EF;
  --kk-bg-alt: #F5EFE2;
  --kk-ink: #3A2E24;
  --kk-ink-soft: #6B5A48;
  --kk-ink-mute: #9C8B76;
  --kk-line: #E5DAC5;
  --kk-paper: #FFFBF3;

  --kk-c-relations: #8FA689;
  --kk-c-work:      #7A93AE;
  --kk-c-parenting: #C88A6B;

  --kk-c-relations-bg: #EEF1E9;
  --kk-c-work-bg:      #E9EEF3;
  --kk-c-parenting-bg: #F5E7DE;

  --kk-f-heading: "Zen Kaku Gothic New", "Noto Sans JP", system-ui, sans-serif;
  --kk-f-body:    "Noto Sans JP", system-ui, sans-serif;
  --kk-f-accent:  "Zen Maru Gothic", "Noto Sans JP", sans-serif;

  --kk-radius: 14px;
  --kk-radius-sm: 8px;
  --kk-shadow-card: 0 1px 2px rgba(58,46,36,0.04), 0 8px 24px rgba(58,46,36,0.06);
  --kk-shadow-hover: 0 2px 6px rgba(58,46,36,0.06), 0 16px 40px rgba(58,46,36,0.10);
}

/* ---------- Base overrides ---------- */
body {
  background: var(--kk-bg);
  color: var(--kk-ink);
  font-family: var(--kk-f-body);
  line-height: 1.85;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
}

/* subtle paper grain (very light, no perf hit) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(58,46,36,0.025) 1px, transparent 1px);
  background-size: 3px 3px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}
#container, #wrap, .main, #main, .site-content { position: relative; z-index: 1; }

a { color: var(--kk-ink); }
a:hover { color: var(--kk-ink-soft); }

/* ---------- Header ---------- */
#header {
  background: color-mix(in oklab, var(--kk-bg) 92%, transparent);
  border-bottom: 1px solid var(--kk-line);
  backdrop-filter: saturate(120%) blur(10px);
}
.site-name a, .header-container .site-name-text {
  font-family: var(--kk-f-accent);
  color: var(--kk-ink);
  letter-spacing: 0.06em;
  font-weight: 500;
}
.tagline, .site-name-description {
  color: var(--kk-ink-mute);
  letter-spacing: 0.14em;
  font-size: 11px;
}

/* Global nav */
#navi, .navi-in {
  background: transparent;
  border: none;
}
#navi .navi-in > .menu-header > .menu-item > a,
.navi-in > ul > li > a {
  color: var(--kk-ink-soft);
  font-size: 14px;
  letter-spacing: 0.06em;
  font-weight: 400;
  padding: 20px 18px;
  transition: color .2s;
}
.navi-in > ul > li > a:hover,
.navi-in > ul > li.current-menu-item > a {
  background: transparent;
  color: var(--kk-ink);
}

/* ---------- Buttons ---------- */
.wp-block-button__link,
.btn-kokoro,
.entry-card-button,
input[type="submit"],
button[type="submit"] {
  background: var(--kk-ink) !important;
  color: var(--kk-paper) !important;
  border-radius: 999px !important;
  padding: 14px 26px !important;
  font-size: 14px !important;
  letter-spacing: 0.06em !important;
  border: 1px solid var(--kk-ink) !important;
  font-weight: 500 !important;
  transition: all .2s !important;
}
.wp-block-button__link:hover,
.btn-kokoro:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
  background: var(--kk-ink-soft) !important;
  border-color: var(--kk-ink-soft) !important;
}
.btn-outline {
  background: transparent !important;
  color: var(--kk-ink) !important;
}
.btn-outline:hover {
  background: var(--kk-ink) !important;
  color: var(--kk-paper) !important;
}

/* ---------- Content wrap ---------- */
.main {
  background: transparent;
}
.article {
  background: var(--kk-paper);
  border: 1px solid var(--kk-line);
  border-radius: var(--kk-radius);
  padding: 32px;
  box-shadow: var(--kk-shadow-card);
}
@media (max-width: 640px) {
  .article { padding: 20px; border-radius: 10px; }
}

/* ---------- Entry cards (Cocoon default) ---------- */
.entry-card-wrap,
.entry-card {
  background: var(--kk-paper) !important;
  border: 1px solid var(--kk-line) !important;
  border-radius: var(--kk-radius) !important;
  padding: 0 !important;
  overflow: hidden !important;
  transition: transform .3s ease, box-shadow .3s ease;
  box-shadow: none !important;
}
.entry-card-wrap:hover,
.entry-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--kk-shadow-hover) !important;
}
.entry-card-thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.entry-card-thumb img {
  width: 100% !important; height: 100% !important;
  object-fit: cover !important;
  transition: transform .5s ease;
}
.entry-card-wrap:hover .entry-card-thumb img { transform: scale(1.04); }
.entry-card-content {
  padding: 20px 22px !important;
}
.entry-card-title,
.entry-card-content .entry-card-title,
.a-wrap .entry-card-title {
  font-family: var(--kk-f-accent) !important;
  font-size: 17px !important;
  font-weight: 500 !important;
  line-height: 1.7 !important;
  letter-spacing: 0.02em !important;
  color: var(--kk-ink) !important;
  margin-bottom: 8px !important;
}
.entry-card-meta,
.entry-card-info {
  font-size: 12px !important;
  color: var(--kk-ink-mute) !important;
}
.entry-card-snippet {
  color: var(--kk-ink-soft) !important;
  font-size: 13px !important;
  line-height: 1.9 !important;
}

/* Category label dots */
.cat-label, .category-name {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  background: transparent !important;
  color: var(--kk-ink-mute) !important;
  font-size: 11px !important;
  letter-spacing: 0.2em !important;
  padding: 0 !important;
  border: none !important;
}
.cat-label::before, .category-name::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--kk-ink-mute);
  display: inline-block;
}
/* Category-specific colors via slug */
.cat-relations .cat-label::before,
.cat-item-relations .cat-label::before,
body.category-relations .article h1.entry-title::before { background: var(--kk-c-relations); }

.cat-work .cat-label::before,
.cat-item-work .cat-label::before,
body.category-work .article h1.entry-title::before { background: var(--kk-c-work); }

.cat-parenting .cat-label::before,
.cat-item-parenting .cat-label::before,
body.category-parenting .article h1.entry-title::before { background: var(--kk-c-parenting); }

/* ---------- Article body typography ---------- */
.entry-title,
.article h1,
.article h2,
.article h3 {
  font-family: var(--kk-f-accent);
  color: var(--kk-ink);
  letter-spacing: 0.04em;
  line-height: 1.6;
  font-weight: 500;
}
.entry-title {
  font-size: clamp(24px, 3vw, 34px);
  margin-bottom: 20px;
  text-wrap: pretty;
}
.article h2 {
  font-size: 22px;
  margin-top: 48px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--kk-line);
  background: none;
  position: relative;
}
.article h2::before {
  content: "";
  position: absolute;
  bottom: -1px; left: 0;
  width: 60px; height: 2px;
  background: var(--kk-c-parenting);
}
body.category-relations .article h2::before { background: var(--kk-c-relations); }
body.category-work      .article h2::before { background: var(--kk-c-work); }
body.category-parenting .article h2::before { background: var(--kk-c-parenting); }

.article h3 {
  font-size: 18px;
  padding-left: 14px;
  border-left: 3px solid var(--kk-c-parenting);
  margin-top: 32px;
  margin-bottom: 14px;
  background: none;
}
body.category-relations .article h3 { border-left-color: var(--kk-c-relations); }
body.category-work      .article h3 { border-left-color: var(--kk-c-work); }
body.category-parenting .article h3 { border-left-color: var(--kk-c-parenting); }

.article p {
  font-size: 16px;
  line-height: 2.15;
  color: var(--kk-ink);
  margin-bottom: 24px;
}

.article blockquote,
blockquote {
  margin: 32px 0 !important;
  padding: 24px 28px !important;
  background: var(--kk-bg-alt) !important;
  border-left: 3px solid var(--kk-ink-mute) !important;
  border-radius: 4px !important;
  color: var(--kk-ink-soft) !important;
  font-size: 15px !important;
  line-height: 2 !important;
  font-style: normal !important;
}

.article ul, .article ol { padding-left: 24px; }
.article li { margin-bottom: 10px; line-height: 1.9; }

/* ---------- Sidebar ---------- */
#sidebar .widget {
  background: var(--kk-paper);
  border: 1px solid var(--kk-line);
  border-radius: var(--kk-radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: none;
}
#sidebar h3, #sidebar .widget-title {
  font-family: var(--kk-f-accent);
  font-size: 14px;
  letter-spacing: 0.16em;
  color: var(--kk-ink);
  border: none;
  padding: 0 0 12px 0;
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--kk-line);
  background: none;
}
#sidebar a {
  color: var(--kk-ink-soft);
  font-size: 13px;
}
#sidebar a:hover { color: var(--kk-ink); }

/* ---------- Breadcrumb ---------- */
#breadcrumb, .breadcrumb {
  background: transparent !important;
  padding: 12px 0 !important;
  font-size: 12px !important;
  color: var(--kk-ink-mute) !important;
  letter-spacing: 0.08em;
  border: none !important;
}
#breadcrumb a { color: var(--kk-ink-soft); }
#breadcrumb a:hover { color: var(--kk-ink); }

/* ---------- Pagination ---------- */
.pagination a, .pagination span,
.page-numbers {
  width: 40px; height: 40px;
  line-height: 38px;
  border-radius: 999px !important;
  border: 1px solid var(--kk-line) !important;
  color: var(--kk-ink-soft) !important;
  background: var(--kk-paper) !important;
  font-size: 13px !important;
  transition: all .2s;
  padding: 0 !important;
}
.pagination a:hover, .page-numbers:hover {
  border-color: var(--kk-ink) !important;
  color: var(--kk-ink) !important;
}
.pagination .current, .page-numbers.current {
  background: var(--kk-ink) !important;
  border-color: var(--kk-ink) !important;
  color: var(--kk-paper) !important;
}

/* ---------- Footer ---------- */
#footer, .footer {
  background: var(--kk-bg-alt) !important;
  border-top: 1px solid var(--kk-line);
  color: var(--kk-ink-soft);
}
#footer a { color: var(--kk-ink-soft); }
#footer a:hover { color: var(--kk-ink); }
.footer-bottom {
  background: transparent !important;
  color: var(--kk-ink-mute) !important;
  font-size: 11px;
  letter-spacing: 0.1em;
  border-top: 1px solid var(--kk-line);
}

/* ---------- Custom sections (used by front-page.php etc.) ---------- */
.kk-container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.kk-container-narrow { max-width: 780px; margin: 0 auto; padding: 0 24px; }

.kk-eyebrow {
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--kk-ink-mute);
  text-transform: uppercase;
  margin: 0 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.kk-eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--kk-ink-mute);
}

.kk-section-title {
  font-family: var(--kk-f-accent);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.4;
  margin: 0 0 16px;
  color: var(--kk-ink);
}
.kk-section-lead {
  font-size: 15px;
  color: var(--kk-ink-soft);
  max-width: 620px;
  line-height: 1.95;
  margin: 0 0 48px;
}

.kk-section { padding: 96px 0; position: relative; }
.kk-section-head-center { text-align: center; margin-bottom: 48px; }
.kk-section-head-center .kk-eyebrow { justify-content: center; }
.kk-section-head-center .kk-section-lead { margin-left: auto; margin-right: auto; }

/* Hero */
.kk-hero { padding: 64px 0 96px; overflow: hidden; }
.kk-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.kk-hero-title {
  font-family: var(--kk-f-accent);
  font-size: clamp(24px, 4vw, 48px);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.04em;
  margin: 0 0 24px;
  color: var(--kk-ink);
  text-wrap: balance;
}
.kk-hero-title .em { color: var(--kk-c-parenting); }
.kk-hero-line { display: block; }
@media (max-width: 768px) {
  .kk-hero-title { font-size: clamp(22px, 6vw, 30px); line-height: 1.6; letter-spacing: 0.02em; }
}
.kk-hero-sub {
  font-size: 15px;
  line-height: 2.1;
  color: var(--kk-ink-soft);
  margin: 0 0 32px;
}
.kk-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.kk-hero-visual {
  border-radius: var(--kk-radius);
  overflow: hidden;
  border: 1px solid var(--kk-line);
  box-shadow: var(--kk-shadow-card);
  aspect-ratio: 5/4;
}
.kk-hero-visual img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) {
  .kk-hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .kk-hero-copy { order: 2; }
  .kk-hero-visual { order: 1; aspect-ratio: 16/10; }
}

/* About */
.kk-about { background: var(--kk-bg-alt); padding: 96px 0; }
.kk-about-inner { display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; align-items: start; }
.kk-about-body p { font-size: 15px; line-height: 2.1; color: var(--kk-ink-soft); margin: 0 0 16px; }
.kk-about-body strong { color: var(--kk-ink); font-weight: 500; }
@media (max-width: 900px) { .kk-about-inner { grid-template-columns: 1fr; gap: 24px; } }

/* Category cards */
.kk-cats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.kk-cat-card {
  background: var(--kk-paper);
  border: 1px solid var(--kk-line);
  border-radius: var(--kk-radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all .3s;
}
.kk-cat-card:hover { transform: translateY(-3px); box-shadow: var(--kk-shadow-hover); }
.kk-cat-card.relations { border-top: 3px solid var(--kk-c-relations); }
.kk-cat-card.work      { border-top: 3px solid var(--kk-c-work); }
.kk-cat-card.parenting { border-top: 3px solid var(--kk-c-parenting); }
.kk-cat-head { display: flex; align-items: center; gap: 16px; }
.kk-cat-icon {
  width: 96px; height: 96px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--kk-line);
  background: var(--kk-bg-alt);
  flex-shrink: 0;
}
.kk-cat-icon img { width: 100%; height: 100%; object-fit: cover; }
.kk-cat-name {
  font-family: var(--kk-f-accent);
  font-size: 22px;
  font-weight: 500;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--kk-ink);
}
.kk-cat-name .dot { width: 10px; height: 10px; border-radius: 999px; display: inline-block; }
.kk-cat-card.relations .kk-cat-name .dot { background: var(--kk-c-relations); }
.kk-cat-card.work      .kk-cat-name .dot { background: var(--kk-c-work); }
.kk-cat-card.parenting .kk-cat-name .dot { background: var(--kk-c-parenting); }
.kk-cat-num { font-size: 11px; letter-spacing: 0.24em; color: var(--kk-ink-mute); }
.kk-cat-body { font-size: 14px; line-height: 2; color: var(--kk-ink-soft); margin: 0; flex: 1; }
.kk-cat-link {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--kk-ink);
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding-top: 12px;
  border-top: 1px dashed var(--kk-line);
  transition: gap .2s;
}
.kk-cat-link:hover { gap: 14px; }
@media (max-width: 900px) { .kk-cats-grid { grid-template-columns: 1fr; } }

/* Featured */
.kk-featured-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; }
.kk-featured-lg {
  display: flex;
  flex-direction: column;
  background: var(--kk-paper);
  border: 1px solid var(--kk-line);
  border-radius: var(--kk-radius);
  overflow: hidden;
  transition: transform .3s;
}
.kk-featured-lg:hover { transform: translateY(-3px); box-shadow: var(--kk-shadow-hover); }
.kk-featured-lg .kk-media { aspect-ratio: 16/10; overflow: hidden; }
.kk-featured-lg .kk-media img { width: 100%; height: 100%; object-fit: cover; }
.kk-featured-lg .kk-body { padding: 32px; }
.kk-featured-lg .kk-title {
  font-family: var(--kk-f-accent);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--kk-ink);
  margin: 8px 0;
}
.kk-featured-lg .kk-excerpt { color: var(--kk-ink-soft); font-size: 14px; line-height: 2; margin: 8px 0 0; }
.kk-featured-list { display: flex; flex-direction: column; gap: 16px; }
.kk-mini {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  padding: 16px;
  background: var(--kk-paper);
  border: 1px solid var(--kk-line);
  border-radius: var(--kk-radius-sm);
  transition: transform .2s;
}
.kk-mini:hover { transform: translateX(3px); }
.kk-mini-media { aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: var(--kk-bg-alt); }
.kk-mini-media img { width: 100%; height: 100%; object-fit: cover; }
.kk-mini-title {
  font-size: 14px;
  line-height: 1.7;
  color: var(--kk-ink);
  margin: 6px 0 0;
  font-weight: 500;
}
.kk-catlabel {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--kk-ink-mute);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.kk-catlabel .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--kk-ink-mute); }
.kk-catlabel.relations .dot { background: var(--kk-c-relations); }
.kk-catlabel.work      .dot { background: var(--kk-c-work); }
.kk-catlabel.parenting .dot { background: var(--kk-c-parenting); }
@media (max-width: 900px) { .kk-featured-grid { grid-template-columns: 1fr; } }

/* Concept */
.kk-concept {
  background: var(--kk-paper);
  padding: 96px 0;
  border-top: 1px solid var(--kk-line);
  border-bottom: 1px solid var(--kk-line);
}
.kk-concept-inner { max-width: 720px; margin: 0 auto; text-align: center; padding: 0 24px; }
.kk-concept-mark { font-family: var(--kk-f-accent); font-size: 24px; color: var(--kk-ink-mute); letter-spacing: 0.4em; margin: 0 0 12px; }
.kk-concept-title {
  font-family: var(--kk-f-accent);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.7;
  margin: 16px 0 32px;
  color: var(--kk-ink);
}
.kk-concept-body p {
  font-size: 15px;
  line-height: 2.2;
  color: var(--kk-ink-soft);
  margin: 0 0 24px;
  text-wrap: pretty;
}
.kk-concept-body strong { color: var(--kk-ink); font-weight: 500; }

/* Contact banner */
.kk-contact-banner { background: var(--kk-bg-alt); padding: 64px 0; text-align: center; }
.kk-contact-banner p { color: var(--kk-ink-soft); max-width: 520px; margin: 0 auto 24px; line-height: 2; font-size: 14px; }

/* Grid for archives */
.kk-articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .kk-articles-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .kk-articles-grid { grid-template-columns: 1fr; } }

/* Filter bar for category archive */
.kk-filter-bar {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 24px 0 48px;
  flex-wrap: wrap;
}
.kk-filter-btn {
  padding: 10px 22px;
  border: 1px solid var(--kk-line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--kk-ink-soft);
  background: var(--kk-paper);
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none !important;
  transition: all .2s;
}
.kk-filter-btn:hover { border-color: var(--kk-ink-soft); color: var(--kk-ink); }
.kk-filter-btn.active { background: var(--kk-ink); color: var(--kk-paper); border-color: var(--kk-ink); }
.kk-filter-btn .dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }
.kk-filter-btn.relations .dot { background: var(--kk-c-relations); }
.kk-filter-btn.work      .dot { background: var(--kk-c-work); }
.kk-filter-btn.parenting .dot { background: var(--kk-c-parenting); }

/* Page hero (archive/page) */
.kk-page-hero { padding: 64px 0 32px; text-align: center; }
.kk-page-hero .kk-eyebrow { justify-content: center; }
.kk-page-title {
  font-family: var(--kk-f-accent);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.5;
  margin: 0 0 16px;
  color: var(--kk-ink);
}
.kk-page-desc {
  color: var(--kk-ink-soft);
  font-size: 15px;
  max-width: 560px;
  margin: 0 auto;
  line-height: 2;
}

/* Ornament */
.kk-ornament {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--kk-ink-mute);
  font-size: 11px;
  letter-spacing: 0.24em;
}
.kk-ornament::before, .kk-ornament::after {
  content: "";
  width: 20px; height: 1px;
  background: var(--kk-ink-mute);
}

/* Profile page specific */
.kk-profile-intro { display: grid; grid-template-columns: 1fr 1.5fr; gap: 64px; align-items: center; padding: 0 0 64px; }
.kk-profile-visual {
  aspect-ratio: 4/5;
  border-radius: var(--kk-radius);
  overflow: hidden;
  border: 1px solid var(--kk-line);
}
.kk-profile-visual img { width: 100%; height: 100%; object-fit: cover; }
.kk-profile-name {
  font-family: var(--kk-f-accent);
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 500;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
  color: var(--kk-ink);
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.kk-profile-name .en { font-size: 14px; letter-spacing: 0.24em; color: var(--kk-ink-mute); font-family: var(--kk-f-body); }
@media (max-width: 900px) { .kk-profile-intro { grid-template-columns: 1fr; } .kk-profile-visual { max-width: 360px; margin: 0 auto; } }

.kk-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 16px 0; }
.kk-fact { background: var(--kk-paper); border: 1px solid var(--kk-line); border-radius: var(--kk-radius); padding: 20px; }
.kk-fact-label { font-size: 11px; letter-spacing: 0.24em; color: var(--kk-ink-mute); text-transform: uppercase; margin-bottom: 8px; }
.kk-fact-value { font-family: var(--kk-f-accent); font-size: 16px; color: var(--kk-ink); letter-spacing: 0.04em; line-height: 1.7; }
@media (max-width: 700px) { .kk-facts { grid-template-columns: 1fr; } }

.kk-values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 16px 0; }
.kk-value-card { padding: 24px; border-radius: var(--kk-radius); background: var(--kk-paper); border: 1px solid var(--kk-line); }
.kk-value-num { font-family: var(--kk-f-accent); font-size: 13px; letter-spacing: 0.2em; color: var(--kk-ink-mute); margin-bottom: 8px; }
.kk-value-title { font-family: var(--kk-f-accent); font-size: 17px; margin: 0 0 12px; color: var(--kk-ink); line-height: 1.6; font-weight: 500; }
.kk-value-desc { font-size: 13px; line-height: 2; color: var(--kk-ink-soft); margin: 0; }
@media (max-width: 900px) { .kk-values-grid { grid-template-columns: 1fr; } }

.kk-timeline { border-left: 1px dashed var(--kk-line); padding-left: 24px; margin: 16px 0; }
.kk-tl-item { position: relative; padding-bottom: 24px; }
.kk-tl-item::before { content: ""; position: absolute; left: -29px; top: 6px; width: 8px; height: 8px; border-radius: 999px; background: var(--kk-ink); }
.kk-tl-year { font-family: var(--kk-f-accent); font-size: 14px; color: var(--kk-ink-mute); letter-spacing: 0.14em; margin-bottom: 4px; }
.kk-tl-text { font-size: 14px; color: var(--kk-ink); line-height: 1.9; margin: 0; }

.kk-pf-section { margin-bottom: 64px; }
.kk-pf-section h2 {
  font-family: var(--kk-f-accent);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.08em;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--kk-line);
  color: var(--kk-ink);
  display: flex;
  align-items: center;
  gap: 12px;
}
.kk-pf-section h2::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--kk-c-parenting);
  border-radius: 999px;
}
.kk-pf-section p { font-size: 15px; line-height: 2.1; color: var(--kk-ink-soft); margin: 0 0 16px; }
.kk-pf-section strong { color: var(--kk-ink); font-weight: 500; }

/* Contact page */
.kk-contact-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 64px; padding: 32px 0 96px; }
@media (max-width: 900px) { .kk-contact-grid { grid-template-columns: 1fr; } }
.kk-note-card { background: var(--kk-paper); border: 1px solid var(--kk-line); border-radius: var(--kk-radius); padding: 20px; margin-bottom: 20px; }
.kk-note-title { font-family: var(--kk-f-accent); font-size: 15px; letter-spacing: 0.1em; margin: 0 0 12px; color: var(--kk-ink); display: flex; align-items: center; gap: 10px; }
.kk-note-title .icon {
  width: 24px; height: 24px;
  border-radius: 999px;
  background: var(--kk-c-parenting-bg);
  color: var(--kk-c-parenting);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}
.kk-note-body { font-size: 13px; line-height: 1.95; color: var(--kk-ink-soft); margin: 0; }

/* Contact Form 7 styling (if used) */
.wpcf7-form { background: var(--kk-paper); border: 1px solid var(--kk-line); border-radius: var(--kk-radius); padding: 32px; }
.wpcf7-form label { display: block; font-size: 12px; color: var(--kk-ink-soft); letter-spacing: 0.08em; margin-bottom: 8px; font-weight: 500; }
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea {
  width: 100%;
  background: var(--kk-bg);
  border: 1px solid var(--kk-line);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: var(--kk-f-body);
  font-size: 14px;
  color: var(--kk-ink);
  line-height: 1.8;
}
.wpcf7-form input:focus, .wpcf7-form textarea:focus { outline: none; border-color: var(--kk-ink); background: var(--kk-paper); }

/* ---------- Utility ---------- */
.kk-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  border: 1px solid var(--kk-ink);
  color: var(--kk-ink);
  background: transparent;
  transition: all .2s;
  text-decoration: none !important;
}
.kk-btn:hover { background: var(--kk-ink); color: var(--kk-paper); }
.kk-btn-primary { background: var(--kk-ink); color: var(--kk-paper); }
.kk-btn-primary:hover { background: var(--kk-ink-soft); border-color: var(--kk-ink-soft); }

/* Cocoon固有の要素（アピールエリア）を非表示にできるフック */
.appeal { display: none; }

/* ============================================================
   モバイル最適化 (スマートフォン / タブレット)
   ------------------------------------------------------------
   ブレークポイント:
   - ~1024px : タブレット
   - ~768px  : タブレット縦 / 大きめスマホ
   - ~640px  : スマホ全般
   - ~380px  : 小型スマホ
   ============================================================ */

/* --- グローバル: 横スクロール防止 --- */
html, body { overflow-x: hidden; }
.kk-container, .kk-container-narrow { width: 100%; }
img, video { max-width: 100%; height: auto; }

/* --- iOS Safari のフォームズーム防止（16px以上を保証） --- */
@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  input[type="search"],
  input[type="password"],
  textarea,
  select,
  .wpcf7-form input,
  .wpcf7-form textarea {
    font-size: 16px !important;
  }
}

/* --- タブレット (~1024px) --- */
@media (max-width: 1024px) {
  .kk-hero { padding: 40px 0 64px; }
  .kk-section { padding: 72px 0; }
  .kk-about { padding: 72px 0; }
  .kk-concept { padding: 72px 0; }
  .kk-section-lead { margin-bottom: 32px; }
}

/* --- タブレット縦 / 大きめスマホ (~768px) --- */
@media (max-width: 768px) {

  /* ヘッダー */
  #header, .header-container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .site-name a, .header-container .site-name-text {
    font-size: 17px !important;
  }
  .tagline, .site-name-description {
    font-size: 10px !important;
  }

  /* コンテナの余白を絞る */
  .kk-container, .kk-container-narrow {
    padding-left: 20px;
    padding-right: 20px;
  }

  /* セクション間の余白 */
  .kk-hero { padding: 24px 0 48px; }
  .kk-section, .kk-about, .kk-concept { padding: 56px 0; }
  .kk-contact-banner { padding: 48px 0; }
  .kk-page-hero { padding: 40px 0 24px; }

  /* Hero */
  .kk-hero-inner { gap: 28px !important; }
  .kk-hero-copy { order: 2; }
  .kk-hero-visual { order: 1; aspect-ratio: 16/10 !important; }
  .kk-hero-title {
    font-size: clamp(24px, 6.4vw, 32px) !important;
    line-height: 1.55 !important;
    letter-spacing: 0.02em !important;
  }
  .kk-hero-sub {
    font-size: 14px !important;
    line-height: 2 !important;
  }
  .kk-hero-cta {
    width: 100%;
    justify-content: stretch;
    flex-direction: column;
  }
  .kk-hero-cta .kk-btn {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
  }

  /* Section 見出し */
  .kk-section-title {
    font-size: clamp(22px, 5.6vw, 28px) !important;
    line-height: 1.5 !important;
    letter-spacing: 0.02em !important;
  }
  .kk-section-lead {
    font-size: 14px !important;
    line-height: 2 !important;
    text-wrap: pretty;
  }

  /* About */
  .kk-about-body p { font-size: 14px !important; line-height: 2 !important; }

  /* カテゴリカード */
  .kk-cat-card {
    padding: 22px !important;
    gap: 14px !important;
  }
  .kk-cat-icon {
    width: 72px !important;
    height: 72px !important;
  }
  .kk-cat-name { font-size: 19px !important; }
  .kk-cat-num { font-size: 10px !important; letter-spacing: 0.2em !important; }
  .kk-cat-body { font-size: 13.5px !important; line-height: 1.95 !important; }

  /* Featured */
  .kk-featured-lg .kk-body { padding: 20px !important; }
  .kk-featured-lg .kk-title { font-size: 18px !important; line-height: 1.65 !important; }
  .kk-featured-lg .kk-excerpt { font-size: 13px !important; }
  .kk-mini {
    grid-template-columns: 80px 1fr !important;
    padding: 12px !important;
    gap: 12px !important;
  }
  .kk-mini-title { font-size: 13px !important; line-height: 1.6 !important; }

  /* Concept */
  .kk-concept-title {
    font-size: clamp(20px, 5vw, 26px) !important;
    line-height: 1.7 !important;
    margin: 12px 0 20px !important;
  }
  .kk-concept-body p {
    font-size: 14px !important;
    line-height: 2.05 !important;
  }
  .kk-concept-mark { font-size: 18px !important; }

  /* 記事カード (Cocoon entry-card) */
  .entry-card-content { padding: 16px 18px !important; }
  .entry-card-title { font-size: 15px !important; line-height: 1.65 !important; }
  .entry-card-snippet { font-size: 12.5px !important; line-height: 1.85 !important; }
  .entry-card-meta { font-size: 11px !important; }

  /* 記事詳細本文 */
  .article { padding: 20px !important; border-radius: 10px !important; }
  .entry-title { font-size: clamp(22px, 5vw, 28px) !important; line-height: 1.55 !important; }
  .article h2 { font-size: 19px !important; margin-top: 36px !important; }
  .article h3 { font-size: 16px !important; margin-top: 24px !important; }
  .article p { font-size: 15px !important; line-height: 2 !important; margin-bottom: 20px !important; }
  .article blockquote { padding: 18px 20px !important; font-size: 14px !important; }

  /* Profile page */
  .kk-profile-intro { gap: 32px !important; padding: 0 0 40px !important; }
  .kk-profile-visual { max-width: 260px !important; }
  .kk-profile-name {
    font-size: clamp(24px, 6vw, 32px) !important;
    justify-content: center;
    text-align: center;
    gap: 10px !important;
  }
  .kk-profile-name .en { font-size: 12px !important; }
  .kk-profile-intro > div:last-child { text-align: center; }
  .kk-profile-intro > div:last-child p { text-align: left; }

  .kk-pf-section { margin-bottom: 40px !important; }
  .kk-pf-section h2 { font-size: 18px !important; }
  .kk-pf-section p { font-size: 14px !important; line-height: 2 !important; }
  .kk-fact { padding: 16px !important; }
  .kk-value-card { padding: 20px !important; }
  .kk-value-title { font-size: 15px !important; }
  .kk-timeline { padding-left: 20px !important; }
  .kk-tl-item::before { left: -25px !important; }

  /* Contact page */
  .kk-contact-grid { gap: 32px !important; padding: 24px 0 64px !important; }
  .kk-note-card { padding: 16px !important; }
  .kk-note-title { font-size: 14px !important; }
  .kk-note-body { font-size: 12.5px !important; }
  .wpcf7-form { padding: 20px !important; border-radius: 10px !important; }

  /* Page hero */
  .kk-page-title {
    font-size: clamp(24px, 6vw, 34px) !important;
    line-height: 1.5 !important;
  }
  .kk-page-desc { font-size: 14px !important; line-height: 1.95 !important; }

  /* フィルタバー: 横スクロールできるように */
  .kk-filter-bar {
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 20px;
    margin-left: -20px;
    margin-right: -20px;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .kk-filter-bar::-webkit-scrollbar { display: none; }
  .kk-filter-btn {
    flex-shrink: 0;
    padding: 10px 18px !important;
    font-size: 12.5px !important;
    min-height: 44px;   /* iOSのタップ推奨サイズ */
  }

  /* ボタン: タップ領域 44px 以上を保証 */
  .kk-btn, .btn-kokoro, .wp-block-button__link {
    min-height: 44px !important;
    padding: 12px 22px !important;
    font-size: 14px !important;
    justify-content: center;
  }

  /* Contact banner */
  .kk-contact-banner .kk-btn { width: 100%; }

  /* Ornament (01/04) */
  .kk-ornament { font-size: 10px !important; }

  /* Cocoon グローバルナビ: モバイルメニュー時の余白 */
  #navi { font-size: 15px !important; }
  .navi-in > ul > li > a {
    padding: 16px 12px !important;
    min-height: 48px;
  }

  /* Cocoon サイドバー: モバイルでは記事下に */
  #sidebar .widget { padding: 18px !important; margin-bottom: 16px !important; }
}

/* --- スマホ (~640px) --- */
@media (max-width: 640px) {

  /* 3カラムをすべて1カラムに（既定に加えて念押し） */
  .kk-cats-grid,
  .kk-featured-grid,
  .kk-articles-grid,
  .kk-facts,
  .kk-values-grid,
  .kk-contact-grid {
    grid-template-columns: 1fr !important;
  }

  /* カテゴリカード: 縦積みで大きめタップ領域 */
  .kk-cat-card {
    padding: 20px !important;
  }
  .kk-cat-head { gap: 14px !important; }

  /* Featured: 縦積み時にmini cardの画像を少し大きく */
  .kk-mini { grid-template-columns: 96px 1fr !important; }

  /* Aboutセクション: 見出し中央寄せ */
  .kk-about-inner .kk-eyebrow { justify-content: flex-start; }

  /* Hero の装飾 */
  .kk-hero::before, .kk-hero::after { display: none; }
  .hero-tag { top: 10px !important; left: 10px !important; font-size: 10px !important; padding: 4px 10px !important; }
}

/* --- 小型スマホ (~380px) --- */
@media (max-width: 380px) {
  .kk-container, .kk-container-narrow {
    padding-left: 16px;
    padding-right: 16px;
  }
  .kk-hero-title { font-size: 22px !important; }
  .kk-section-title { font-size: 20px !important; }
  .kk-cat-name { font-size: 17px !important; }
  .kk-cat-icon { width: 64px !important; height: 64px !important; }
  .kk-btn { padding: 12px 18px !important; font-size: 13px !important; }
  .entry-card-title { font-size: 14.5px !important; }

  /* Featured mini: 極小画面は完全縦 */
  .kk-mini {
    grid-template-columns: 1fr !important;
  }
  .kk-mini-media { aspect-ratio: 16/9 !important; }
}

/* --- 横向きスマホ / 特殊 --- */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  .kk-hero { padding: 20px 0 32px; }
  .kk-hero-inner { grid-template-columns: 1fr 1fr !important; }
  .kk-hero-copy { order: 1 !important; }
  .kk-hero-visual { order: 2 !important; aspect-ratio: 4/3 !important; }
}

/* --- タッチデバイス: hover 効果をオフ --- */
@media (hover: none) {
  .entry-card-wrap:hover,
  .entry-card:hover,
  .kk-cat-card:hover,
  .kk-featured-lg:hover,
  .card:hover {
    transform: none !important;
    box-shadow: none !important;
  }
  .kk-btn:hover, .btn-kokoro:hover {
    /* タップ後のスタイル残留を防ぐ */
  }
}

/* --- Print --- */
@media print {
  body::before { display: none; }
  .kk-contact-banner, .site-footer, #footer { display: none; }
  .article { border: none; box-shadow: none; }
}

/* ============================================================
   v1.1: モバイル見切れ対策（パターン③対応）
   ------------------------------------------------------------
   - ヘッダー固定によるコンテンツの隠れを解消
   - フッターまでスクロールできることを保証
   - iOS Safari の URL バー変動に対応
   ============================================================ */

/* --- ヘッダー固定分のオフセットを本文コンテンツに確保 --- */
@media (max-width: 768px) {
  /* Cocoon のモバイルヘッダー（スティッキー）を上書き対応 */
  #header, .header {
    position: sticky;
    top: 0;
    z-index: 999;
    /* 高さを縮めてコンテンツ領域を広げる */
    min-height: 56px;
  }
  .header-container {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }

  /* トップ〜最初のセクション間の余白を確保（ヘッダーの下に潜り込む問題を回避） */
  #content-in, #main, .main {
    padding-top: 8px;
  }

  /* Hero やページヒーローの上余白をリセット（既にヘッダー分のオフセットがあるため） */
  .kk-hero { padding-top: 8px !important; }
  .kk-page-hero { padding-top: 24px !important; }

  /* iOS Safari の URL バーが出入りしたときの視覚的な安定化 */
  body {
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic Viewport Height（対応ブラウザで最下部まで正確に描画） */
  }

  /* Cocoon のモバイルボタンバー（下部固定バー）と重なる場合の余白確保 */
  #footer, .site-footer {
    padding-bottom: max(24px, env(safe-area-inset-bottom, 24px));
  }

  /* ページ最下部が見切れないよう、コンテンツ末尾に余白 */
  .site-content, #main {
    padding-bottom: 24px;
  }
}

/* --- 極小スマホ (~380px) 追加調整 --- */
@media (max-width: 380px) {
  #header, .header { min-height: 52px; }
  .header-container {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }
}

/* --- iPhone のセーフエリア（ノッチ・ホームバー）対応 --- */
@supports (padding: env(safe-area-inset-top)) {
  #header, .header {
    padding-top: env(safe-area-inset-top);
  }
  #footer, .site-footer {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
}

/* --- スマホでの anchor リンク時のズレ防止（見出しがヘッダーに隠れる問題） --- */
@media (max-width: 768px) {
  h1[id], h2[id], h3[id], h4[id],
  .article h2, .article h3 {
    scroll-margin-top: 72px;
  }
}

/* --- Cocoon 標準のスマホ用トップに戻るボタン等と重ならないよう調整 --- */
@media (max-width: 768px) {
  .go-to-top {
    bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* ============================================================
   v1.1.1: 横スクロール完全防止（緊急修正）
   ------------------------------------------------------------
   症状: スマホで画面右側が見切れる（横スクロール発生）
   原因: どこかの要素が画面幅を超えている、または vw 単位の要素が
        スクロールバー分はみ出している可能性。
   ------------------------------------------------------------ */

/* --- ルート要素で横方向を完全にロック --- */
html {
  overflow-x: hidden !important;
  overflow-x: clip !important; /* モダンブラウザで最も確実な方法 */
  width: 100%;
  max-width: 100vw;
}
body {
  overflow-x: hidden !important;
  overflow-x: clip !important;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

/* --- コンテナ類が画面幅を超えないよう強制 --- */
#wrap, #container, #content, #content-in, #main, .main,
.wrap, .site, .site-content,
.kk-container, .kk-container-narrow {
  max-width: 100% !important;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* --- 画像・動画・iframe・埋め込みは絶対にはみ出させない --- */
img, video, iframe, embed, object, svg {
  max-width: 100% !important;
  height: auto;
}

/* --- テーブルもはみ出しがち → 横スクロール可能に --- */
@media (max-width: 768px) {
  .article table,
  .entry-content table,
  table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* --- 長い英数字・URLの折り返し（はみ出し防止） --- */
p, li, td, th, .entry-content, .article, .kk-catlabel, .card-title, .entry-card-title {
  word-break: break-word;
  overflow-wrap: break-word;
}

/* --- Grid / Flex コンテナが子要素で膨らむのを防ぐ --- */
.kk-cats-grid, .kk-articles-grid, .kk-featured-grid,
.kk-facts, .kk-values-grid, .kk-contact-grid,
.footer-grid {
  min-width: 0;
}
.kk-cats-grid > *, .kk-articles-grid > *, .kk-featured-grid > *,
.kk-facts > *, .kk-values-grid > *, .kk-contact-grid > *,
.footer-grid > * {
  min-width: 0;
}

/* --- Cocoon の一部要素にある強制幅を打ち消す --- */
@media (max-width: 768px) {
  .main, .sidebar, #main, #sidebar,
  #content-in .main {
    width: 100% !important;
    float: none !important;
  }

  /* Cocoon の記事カードグリッドが3列で残っていた場合の保険 */
  .list.front-page-type-index .entry-card-wrap,
  .front-page-thumbnail-list .entry-card-wrap {
    width: 100% !important;
    margin-right: 0 !important;
  }
}

/* --- letter-spacing による最終文字のはみ出し防止 --- */
h1, h2, h3, h4, h5, h6,
.kk-hero-title, .kk-section-title, .kk-page-title,
.kk-eyebrow, .kk-catlabel {
  max-width: 100%;
}

/* --- vw 単位を使っている箇所のフォールバック --- */
@media (max-width: 768px) {
  .kk-hero-title,
  .kk-section-title,
  .kk-page-title,
  .entry-title {
    max-width: 100%;
    word-break: keep-all;
    overflow-wrap: break-word;
  }
}

/* --- スマホでの hero visual や画像枠のはみ出し対策 --- */
@media (max-width: 768px) {
  .kk-hero-visual,
  .kk-profile-visual,
  .card-media,
  .entry-card-thumb,
  .kk-mini-media {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }
}

/* --- pre / code のはみ出し対策 --- */
pre, code {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* --- 装飾要素（角の罫線など）がはみ出さないよう pointer-events で無効化 --- */
.kk-hero::before,
.kk-hero::after {
  max-width: 100%;
  overflow: hidden;
}
@media (max-width: 768px) {
  .kk-hero::before, .kk-hero::after,
  .hero::before, .hero::after { display: none !important; }
}
