:root {
  --kii-navy: #172b3a;
  --kii-navy-soft: #25465a;
  --kii-green: #356859;
  --kii-green-pale: #edf5f1;
  --kii-gold: #b89455;
  --kii-gold-pale: #f8f3e8;
  --kii-ink: #263238;
  --kii-muted: #65727a;
  --kii-line: #dce5e2;
  --kii-paper: #ffffff;
  --kii-canvas: #f4f7f6;
  --kii-shadow: 0 16px 42px rgba(26, 52, 61, 0.08);
}

/* 投稿・トップ・記事一覧に共通するサイトトーン */
body.kii-editorial-surface {
  background:
    radial-gradient(circle at 8% 0%, rgba(53, 104, 89, 0.07), transparent 28rem),
    var(--kii-canvas);
  color: var(--kii-ink);
}

body.kii-editorial-surface .header-container {
  border-bottom: 1px solid rgba(53, 104, 89, 0.09);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 7px 24px rgba(23, 43, 58, 0.05);
}

body.kii-editorial-surface .site-name-text,
body.kii-editorial-surface .logo-text {
  color: var(--kii-navy);
  letter-spacing: 0.06em;
}

body.kii-editorial-surface #content {
  gap: 30px;
}

body.single-post {
  background: var(--kii-canvas);
  color: var(--kii-ink);
}

body.single-post #content {
  gap: 30px;
}

body.single-post #main {
  overflow: hidden;
  padding: clamp(22px, 3.2vw, 48px);
  border: 1px solid rgba(53, 104, 89, 0.11);
  border-radius: 22px;
  background: var(--kii-paper);
  box-shadow: var(--kii-shadow);
}

body.single-post .entry-title {
  margin: 0.4em 0 0.75em;
  color: var(--kii-navy);
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.45;
  letter-spacing: 0.02em;
}

body.single-post .eye-catch {
  overflow: hidden;
  margin-bottom: 30px;
  border-radius: 18px;
  background: #e9efed;
  box-shadow: 0 12px 30px rgba(23, 43, 58, 0.12);
}

body.single-post .eye-catch img {
  display: block;
  width: 100%;
  transition: transform 0.45s ease;
}

@media (hover: hover) {
  body.single-post .eye-catch:hover img {
    transform: scale(1.012);
  }
}

body.single-post .date-tags,
body.single-post .post-date,
body.single-post .post-update,
body.single-post .author-info {
  color: var(--kii-muted);
  font-size: 0.86rem;
}

body.single-post .entry-content {
  color: var(--kii-ink);
  font-size: clamp(1rem, 1.1vw, 1.08rem);
  line-height: 2;
  letter-spacing: 0.018em;
}

body.single-post .entry-content > p {
  margin: 1.65em 0;
}

body.single-post .article h2 {
  position: relative;
  margin: 3.5em 0 1.45em;
  padding: 0.88em 1.05em 0.88em 1.25em;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(120deg, var(--kii-navy), var(--kii-navy-soft));
  box-shadow: 0 9px 22px rgba(23, 43, 58, 0.15);
  color: #fff;
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  line-height: 1.55;
}

body.single-post .article h2::before {
  position: absolute;
  top: 18%;
  bottom: 18%;
  left: 0;
  width: 5px;
  border-radius: 0 4px 4px 0;
  background: var(--kii-gold);
  content: "";
}

body.single-post .article h3 {
  margin: 2.6em 0 1.15em;
  padding: 0.78em 1em;
  border: 0;
  border-left: 5px solid var(--kii-green);
  border-radius: 0 10px 10px 0;
  background: linear-gradient(90deg, var(--kii-green-pale), #fff);
  color: var(--kii-navy);
  font-size: clamp(1.13rem, 1.7vw, 1.36rem);
  line-height: 1.6;
}

body.single-post .article h4 {
  margin-top: 2.1em;
  padding-bottom: 0.45em;
  border-bottom: 2px solid var(--kii-line);
  color: var(--kii-green);
}

body.single-post .toc,
body.single-post .toc-content {
  margin: 2.3em auto 3em;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--kii-line);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(237, 245, 241, 0.85), rgba(255, 255, 255, 0.96));
  box-shadow: 0 9px 24px rgba(35, 69, 80, 0.07);
}

body.single-post .toc-title {
  color: var(--kii-navy);
  font-size: 1.22rem;
  letter-spacing: 0.08em;
}

body.single-post .toc a {
  color: var(--kii-navy-soft);
  text-decoration: none;
}

body.single-post .toc a:hover {
  color: var(--kii-green);
}

/* 長い目次は大見出し（H2）だけを表示します。 */
body.single-post .toc-list > li > ul,
body.single-post .toc-list > li > ol {
  display: none;
}

body.single-post .toc-list > li {
  margin: 0.65em 0;
}

body.single-post .entry-content ul,
body.single-post .entry-content ol {
  margin: 1.5em 0;
  padding: 1.15em 1.4em 1.15em 2.7em;
  border-radius: 12px;
  background: #f7f9f8;
}

body.single-post .entry-content li {
  margin: 0.45em 0;
}

body.single-post .entry-content li::marker {
  color: var(--kii-green);
  font-weight: 700;
}

body.single-post .entry-content blockquote {
  margin: 2em 0;
  padding: 1.35em 1.5em;
  border: 0;
  border-left: 5px solid var(--kii-gold);
  border-radius: 0 12px 12px 0;
  background: var(--kii-gold-pale);
  color: #4d473d;
}

body.single-post .entry-content table {
  overflow: hidden;
  width: 100%;
  margin: 2em 0;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--kii-line);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(35, 69, 80, 0.05);
}

body.single-post .entry-content th {
  border-color: var(--kii-navy-soft);
  background: var(--kii-navy);
  color: #fff;
}

body.single-post .entry-content td {
  border-color: var(--kii-line);
}

body.single-post .entry-content tr:nth-child(even) td {
  background: #f7faf9;
}

body.single-post .information-box,
body.single-post .question-box,
body.single-post .alert-box,
body.single-post .memo-box,
body.single-post .comment-box {
  margin: 2em 0;
  padding: 1.3em 1.45em;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(35, 69, 80, 0.05);
}

body.single-post .information-box,
body.single-post .memo-box {
  border-color: #aac9bc;
  background: var(--kii-green-pale);
}

body.single-post .alert-box {
  border-color: #d8bd83;
  background: var(--kii-gold-pale);
}

body.single-post #sidebar .widget,
body.single-post .sidebar .widget {
  margin-bottom: 24px;
  padding: 22px;
  border: 1px solid rgba(53, 104, 89, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 9px 26px rgba(35, 69, 80, 0.06);
}

body.single-post .widget-sidebar-title,
body.single-post .sidebar h3 {
  margin: 0 0 16px;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 2px solid var(--kii-line);
  background: transparent;
  color: var(--kii-navy);
  font-size: 1rem;
}

body.single-post .sidebar a {
  color: #41545e;
  text-decoration: none;
}

body.single-post .sidebar a:hover {
  color: var(--kii-green);
}

body.single-post .sns-share-buttons a,
body.single-post .sns-follow-buttons a {
  overflow: hidden;
  border-radius: 9px;
  box-shadow: 0 4px 12px rgba(23, 43, 58, 0.11);
}

body.single-post .footer-meta,
body.single-post .entry-footer {
  margin-top: 3em;
  padding-top: 2em;
  border-top: 1px solid var(--kii-line);
}

/* トップページ：投稿記事と同じ落ち着いた読み物デザイン */
body.home.kii-editorial-surface #main {
  overflow: hidden;
  padding: clamp(22px, 3.2vw, 48px);
  border: 1px solid rgba(53, 104, 89, 0.11);
  border-radius: 22px;
  background: var(--kii-paper);
  box-shadow: var(--kii-shadow);
}

body.home.kii-editorial-surface .entry-title {
  margin: 0.35em 0 1em;
  color: var(--kii-navy);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1.45;
  letter-spacing: 0.025em;
}

body.home.kii-editorial-surface .entry-content {
  color: var(--kii-ink);
  font-size: clamp(1rem, 1.1vw, 1.08rem);
  line-height: 2;
}

body.home.kii-editorial-surface .entry-content > p {
  margin: 1.65em 0;
}

body.home.kii-editorial-surface .article h2 {
  position: relative;
  margin: 3.2em 0 1.35em;
  padding: 0.86em 1.05em 0.86em 1.25em;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(120deg, var(--kii-navy), var(--kii-navy-soft));
  box-shadow: 0 9px 22px rgba(23, 43, 58, 0.15);
  color: #fff;
  font-size: clamp(1.32rem, 2.1vw, 1.66rem);
  line-height: 1.55;
}

body.home.kii-editorial-surface .article h2::before {
  position: absolute;
  top: 18%;
  bottom: 18%;
  left: 0;
  width: 5px;
  border-radius: 0 4px 4px 0;
  background: var(--kii-gold);
  content: "";
}

body.home.kii-editorial-surface .toc,
body.home.kii-editorial-surface .toc-content {
  margin: 2.2em auto 3em;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--kii-line);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(237, 245, 241, 0.86), #fff);
  box-shadow: 0 9px 24px rgba(35, 69, 80, 0.07);
}

body.home.kii-editorial-surface .toc-list > li > ul,
body.home.kii-editorial-surface .toc-list > li > ol {
  display: none;
}

body.home.kii-editorial-surface .entry-content ul,
body.home.kii-editorial-surface .entry-content ol {
  margin: 1.5em 0;
  padding: 1.15em 1.4em 1.15em 2.7em;
  border-radius: 12px;
  background: #f7f9f8;
}

body.home.kii-editorial-surface .entry-content li {
  margin: 0.45em 0;
}

body.home.kii-editorial-surface .entry-content li::marker {
  color: var(--kii-green);
  font-weight: 700;
}

/* カテゴリー・タグ・日付・検索などの記事一覧 */
body.archive.kii-editorial-surface #main,
body.search.kii-editorial-surface #main,
body.blog.kii-editorial-surface #main {
  padding: clamp(20px, 2.8vw, 38px);
  border: 1px solid rgba(53, 104, 89, 0.11);
  border-radius: 22px;
  background: var(--kii-paper);
  box-shadow: var(--kii-shadow);
}

body.archive.kii-editorial-surface .list-title,
body.archive.kii-editorial-surface .archive-title,
body.archive.kii-editorial-surface #list > h1,
body.search.kii-editorial-surface .list-title,
body.search.kii-editorial-surface #list > h1,
body.blog.kii-editorial-surface .list-title,
body.blog.kii-editorial-surface #list > h1 {
  margin: 0 0 1.35em;
  padding: 0 0 0.72em;
  border-bottom: 3px solid var(--kii-line);
  color: var(--kii-navy);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
}

body.kii-editorial-surface .entry-card-wrap {
  overflow: hidden;
  margin-bottom: 22px;
  padding: clamp(14px, 2vw, 20px);
  border: 1px solid var(--kii-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(35, 69, 80, 0.07);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

@media (hover: hover) {
  body.kii-editorial-surface .entry-card-wrap:hover {
    transform: translateY(-3px);
    border-color: rgba(53, 104, 89, 0.32);
    box-shadow: 0 14px 32px rgba(35, 69, 80, 0.12);
  }
}

body.kii-editorial-surface .entry-card-thumb {
  overflow: hidden;
  border-radius: 11px;
  background: var(--kii-green-pale);
}

body.kii-editorial-surface .entry-card-thumb img {
  transition: transform 0.35s ease;
}

@media (hover: hover) {
  body.kii-editorial-surface .entry-card-wrap:hover .entry-card-thumb img {
    transform: scale(1.025);
  }
}

body.kii-editorial-surface .entry-card-title {
  color: var(--kii-navy);
  font-size: clamp(1.08rem, 1.55vw, 1.28rem);
  line-height: 1.65;
}

body.kii-editorial-surface .entry-card-snippet {
  color: var(--kii-muted);
  line-height: 1.75;
}

body.kii-editorial-surface .post-date,
body.kii-editorial-surface .post-update,
body.kii-editorial-surface .entry-card-meta {
  color: var(--kii-muted);
}

/* トップ・一覧でもサイドバーを投稿記事と統一 */
body.kii-editorial-surface #sidebar .widget,
body.kii-editorial-surface .sidebar .widget {
  margin-bottom: 24px;
  padding: 22px;
  border: 1px solid rgba(53, 104, 89, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 9px 26px rgba(35, 69, 80, 0.06);
}

body.kii-editorial-surface .widget-sidebar-title,
body.kii-editorial-surface .sidebar h3 {
  margin: 0 0 16px;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 2px solid var(--kii-line);
  background: transparent;
  color: var(--kii-navy);
  font-size: 1rem;
}

body.kii-editorial-surface .sidebar a {
  color: #41545e;
  text-decoration: none;
}

body.kii-editorial-surface .sidebar a:hover {
  color: var(--kii-green);
}

@media screen and (max-width: 1023px) {
  body.single-post #content {
    gap: 0;
  }

  body.single-post #main {
    border-radius: 16px;
  }

  body.home.kii-editorial-surface #main,
  body.archive.kii-editorial-surface #main,
  body.search.kii-editorial-surface #main,
  body.blog.kii-editorial-surface #main {
    border-radius: 16px;
  }
}

@media screen and (max-width: 767px) {
  body.single-post,
  body.home.kii-editorial-surface,
  body.archive.kii-editorial-surface,
  body.search.kii-editorial-surface,
  body.blog.kii-editorial-surface {
    background: #fff;
  }

  body.single-post #main {
    padding: 18px 16px 28px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body.single-post .entry-title {
    font-size: 1.55rem;
  }

  body.single-post .article h2 {
    margin-top: 2.8em;
    padding: 0.8em 0.9em 0.8em 1.1em;
    border-radius: 10px;
  }

  body.single-post .article h3 {
    margin-top: 2.2em;
    padding: 0.7em 0.75em;
  }

  body.single-post .entry-content {
    font-size: 1rem;
    line-height: 1.9;
  }

  body.single-post .entry-content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  body.home.kii-editorial-surface #main,
  body.archive.kii-editorial-surface #main,
  body.search.kii-editorial-surface #main,
  body.blog.kii-editorial-surface #main {
    padding: 18px 16px 28px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body.home.kii-editorial-surface .entry-title {
    font-size: 1.55rem;
  }

  body.home.kii-editorial-surface .article h2 {
    margin-top: 2.7em;
    padding: 0.8em 0.9em 0.8em 1.1em;
    border-radius: 10px;
  }

  body.kii-editorial-surface .entry-card-wrap {
    margin-bottom: 16px;
    padding: 12px;
    border-radius: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.single-post .eye-catch img {
    transition: none;
  }

  body.kii-editorial-surface .entry-card-wrap,
  body.kii-editorial-surface .entry-card-thumb img {
    transition: none;
  }
}
