/*
Theme Name: Chocho Lab
Theme URI: https://chocho-g.com/
Author: ugwat
Description: ツール検証ブログ「チョチョラボ」のためのオリジナルテーマ。白地に極細罫線のグリッド、角丸の検証スクリーンショット、ステマ規制対応のPR表記を組み込んでいます。
Version: 1.7.0
Requires at least: 6.0
Tested up to: 6.8
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: chocho
Tags: blog, one-column, custom-menu, featured-images, translation-ready
*/

/* =========================================================
   1. トークン
   角丸ルール：押せるもの（ボタン・タグ・バッジ）は完全な丸、
   面（画像・ブロック）は 10px。この2種類だけを使う。
   ========================================================= */

:root {
  --bg:        #ffffff;
  --bg-sub:    #f4f4f1;
  --line:      #e3e3dd;
  --line-soft: #eeeee9;
  --text:      #1c1c1a;
  --text-2:    #6e6e68;
  --text-3:    #93938c;
  --accent:    #0f6b5c;
  --accent-in: #ffffff;
  --chip:      #1c1c1a;
  --chip-text: #ffffff;
  --shadow:    0 1px 2px rgba(28, 28, 26, .04), 0 8px 24px rgba(28, 28, 26, .06);

  --r:      10px;
  --r-pill: 999px;

  --wrap:   1180px;
  --gutter: clamp(20px, 5vw, 56px);

  --font-display: "Zen Maru Gothic", -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
               "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;
  --font-mono: "DM Mono", ui-monospace, "SFMono-Regular", "Menlo", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #141513;
    --bg-sub:    #1c1e1b;
    --line:      #30332e;
    --line-soft: #262924;
    --text:      #ecebe4;
    --text-2:    #9d9d94;
    --text-3:    #7b7b73;
    --accent:    #5cccb2;
    --accent-in: #10221e;
    --chip:      #ecebe4;
    --chip-text: #141513;
    --shadow:    0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

/* =========================================================
   2. リセットと基礎
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.9;
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .01em;
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: var(--r-pill);
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--text-2);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* =========================================================
   3. ヘッダー
   デスクトップで必ず1行、高さ 68px。
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
@supports not (backdrop-filter: blur(1px)) {
  .site-header { background: var(--bg); }
}

.site-header__inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: .04em;
  white-space: nowrap;
}
.brand__mark {
  width: 26px; height: 26px;
  border-radius: var(--r-pill);
  border: 1.6px solid currentColor;
  display: grid; place-items: center;
  align-self: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0;
  flex: none;
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav ul {
  display: flex; align-items: center; gap: 2px;
  list-style: none; margin: 0; padding: 0;
  white-space: nowrap;
}
.nav a {
  display: block;
  padding: 7px 13px;
  border-radius: var(--r-pill);
  font-size: 13.5px;
  color: var(--text-2);
  transition: color .2s ease, background-color .2s ease;
}
.nav a:hover { color: var(--text); background: var(--bg-sub); }
.nav .current-menu-item > a,
.nav .current-cat > a { color: var(--text); }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: none;
}
.nav-toggle span {
  width: 3.5px; height: 3.5px;
  border-radius: var(--r-pill);
  background: currentColor;
}

@media (max-width: 1000px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute;
    inset: 68px 0 auto;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 22px;
    display: none;
  }
  .nav[data-open="true"] { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav a {
    padding: 13px 2px;
    border-radius: 0;
    border-bottom: 1px solid var(--line-soft);
    font-size: 15px;
  }
  .nav a:hover { background: transparent; }
}

/* =========================================================
   4. イントロ帯（トップのみ）
   ========================================================= */

.intro {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.intro__inner {
  padding-block: clamp(52px, 9vw, 96px);
  position: relative;
  z-index: 1;
}
.intro h1 {
  font-size: clamp(29px, 5.2vw, 52px);
  line-height: 1.34;
  letter-spacing: .005em;
  margin-bottom: 20px;
  max-width: 17em;
}
.intro p {
  margin: 0;
  color: var(--text-2);
  font-size: 15px;
  max-width: 30em;
}
.intro__ghost {
  position: absolute;
  right: -3vw; bottom: -14%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(120px, 27vw, 340px);
  line-height: .8;
  letter-spacing: -.02em;
  color: transparent;
  -webkit-text-stroke: 1.4px var(--line);
  pointer-events: none;
  user-select: none;
}
@media (max-width: 700px) { .intro__ghost { display: none; } }

/* =========================================================
   5. セクション見出し
   ========================================================= */

.section { padding-block: clamp(48px, 7vw, 88px); }
.section--sub { background: var(--bg-sub); }

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.section__head h2 { font-size: clamp(20px, 2.6vw, 27px); }
.section__head a { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-2); }
.section__head a:hover { color: var(--accent); }

/* =========================================================
   6. 記事グリッド
   カードではなく罫線で区切る。影は使わない。
   ========================================================= */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) {
  .grid, .grid--2 { grid-template-columns: 1fr; }
}

.cell {
  display: flex;
  flex-direction: column;
  padding: 24px clamp(16px, 2.4vw, 30px) 26px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  position: relative;
}
.cell:nth-child(3n) { border-right: 0; }
@media (max-width: 960px) {
  .cell:nth-child(3n) { border-right: 1px solid var(--line); }
  .cell:nth-child(2n) { border-right: 0; }
}
@media (max-width: 620px) {
  .cell, .cell:nth-child(3n), .cell:nth-child(2n) { border-right: 0; }
}

.cell__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  min-height: 44px;
}
.cell__cat {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  color: var(--text-2);
  padding-top: 3px;
}
.cell__badge {
  flex: none;
  width: 44px; height: 44px;
  border: 1.2px solid var(--line);
  border-radius: var(--r-pill);
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--text-2);
}

.cell__thumb {
  display: block;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg-sub);
  aspect-ratio: 4 / 3;
  margin-bottom: 16px;
}
.cell__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.16, 1, .3, 1);
}
.cell:hover .cell__thumb img { transform: scale(1.035); }
@media (prefers-reduced-motion: reduce) {
  .cell__thumb img, .cell:hover .cell__thumb img { transition: none; transform: none; }
}

/* =========================================================
   自動生成アイキャッチ
   画像をアップロードしなくても、一覧と記事上部に絵が出る。
   絵柄は記事ごとに選択でき、未指定ならカテゴリから自動で決まる。
   ========================================================= */

.cell__thumb--empty {
  position: relative;
  display: block;
  background: transparent;
  border: 0;
  aspect-ratio: 4 / 3;
}

.ec {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 90% at 82% 12%,
      color-mix(in srgb, var(--accent) 13%, transparent), transparent 62%),
    var(--bg-sub);
}

/* 方眼。実験ノートの雰囲気を出す */
.ec__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px;
  opacity: .85;
  pointer-events: none;
}

.ec__top,
.ec__foot {
  position: absolute;
  left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 18px;
  z-index: 2;
}
.ec__top { top: 16px; }
.ec__foot { bottom: 16px; }

.ec__cat {
  display: inline-block;
  background: var(--chip);
  color: var(--chip-text);
  border-radius: var(--r-pill);
  padding: 4px 12px;
  font-size: 11.5px;
  line-height: 1.7;
  white-space: nowrap;
  max-width: 62%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ec__date,
.ec__site {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  color: var(--text-3);
  white-space: nowrap;
}

.ec__mark {
  width: 22px; height: 22px;
  border-radius: var(--r-pill);
  border: 1.4px solid var(--text-3);
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-3);
  flex: none;
}
.ec__foot { justify-content: flex-start; gap: 9px; }

/* 絵柄。中央に置き、上下のラベルと重ならないよう余白を確保する */
.ec__art {
  position: absolute;
  inset: 48px 16px 48px;
  display: grid;
  place-items: center;
  color: var(--text-2);
  z-index: 1;
}
.ec__art svg {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
}

.ec__ghost {
  position: absolute;
  right: -12px; bottom: -22px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 96px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.2px var(--line);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

/* 記事上部の大きい版 */
.entry__thumb--generated { border: 0; border-radius: 0; overflow: visible; }
.ec--hero {
  aspect-ratio: 16 / 7;
  border-radius: var(--r);
}
.ec--hero .ec__top { top: 22px; padding-inline: 26px; }
.ec--hero .ec__foot { bottom: 22px; padding-inline: 26px; }
.ec--hero .ec__cat { font-size: 12.5px; padding: 5px 15px; }
.ec--hero .ec__date, .ec--hero .ec__site { font-size: 11.5px; }
.ec--hero .ec__art { inset: 60px 24px 60px; }
.ec--hero .ec__ghost { font-size: 150px; right: -16px; bottom: -32px; }
.ec--hero .ec__mark { width: 26px; height: 26px; font-size: 10px; }

@media (max-width: 560px) {
  .ec--hero { aspect-ratio: 4 / 3; }
  .ec--hero .ec__art { inset: 54px 20px 54px; }
}

/* 一覧でホバーしたとき、絵だけ少し前に出る */
.cell:hover .ec__art { transform: scale(1.04); }
.ec__art { transition: transform .5s cubic-bezier(.16, 1, .3, 1); }
@media (prefers-reduced-motion: reduce) {
  .ec__art, .cell:hover .ec__art { transition: none; transform: none; }
}

/* =========================================================
   アイキャッチのアニメーション（CSSのみ・画像不要）
   検証ラボのモチーフ：スキャンライン＋計測グリッド＋カーソル点滅。
   動きを抑える設定（prefers-reduced-motion）では全て静止する。
   ========================================================= */

/* 背景に薄い方眼を敷く。ラボの計測用紙のイメージ */
.cell__thumb--empty,
.post-hero {
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 28px 28px;
  background-color: var(--bg-sub);
}

@media (prefers-reduced-motion: no-preference) {

  /* 1. スキャンライン。上から下へゆっくり検査していく */
  .cell__thumb--empty::before,
  .post-hero::before {
    content: "";
    position: absolute;
    left: 0; right: 0;
    top: 0;
    height: 68px;
    background: linear-gradient(
      to bottom,
      transparent,
      color-mix(in srgb, var(--accent) 10%, transparent) 82%,
      color-mix(in srgb, var(--accent) 45%, transparent) 99%,
      var(--accent) 100%
    );
    opacity: .55;
    animation: chocho-scan 5.2s cubic-bezier(.45, 0, .55, 1) infinite;
    pointer-events: none;
  }

  @keyframes chocho-scan {
    0%   { transform: translateY(-70px); }
    62%  { transform: translateY(240px); }
    100% { transform: translateY(240px); opacity: 0; }
  }

  .post-hero::before {
    animation-name: chocho-scan-hero;
    animation-duration: 6.5s;
  }
  @keyframes chocho-scan-hero {
    0%   { transform: translateY(-70px); }
    62%  { transform: translateY(200px); }
    100% { transform: translateY(200px); opacity: 0; }
  }

  /* 2. カーソル点滅。「いま検証中」の気配を出す */
  .cell__thumb-title::after,
  .post-hero__title::after {
    content: "_";
    color: var(--accent);
    margin-left: .12em;
    font-weight: 700;
    animation: chocho-blink 1.15s steps(1, end) infinite;
  }
  @keyframes chocho-blink {
    0%, 55%  { opacity: 1; }
    56%, 100% { opacity: 0; }
  }

  /* 3. 輪郭文字がゆっくり漂う */
  .cell__thumb-ghost,
  .post-hero__ghost {
    animation: chocho-drift 16s ease-in-out infinite alternate;
  }
  @keyframes chocho-drift {
    from { transform: translate(0, 0); }
    to   { transform: translate(-14px, 8px); }
  }

  /* 4. ホバーで枠がアクセント色に灯る（一覧のみ） */
  .cell:hover .cell__thumb--empty {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
    transition: border-color .35s ease;
  }
}

.cell__title {
  font-size: 16.5px;
  line-height: 1.62;
  margin-bottom: 14px;
}
.cell__title a { transition: color .2s ease; }
.cell:hover .cell__title a { color: var(--accent); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.tag {
  display: inline-block;
  background: var(--chip);
  color: var(--chip-text);
  border-radius: var(--r-pill);
  padding: 4px 12px;
  font-size: 11.5px;
  line-height: 1.7;
  transition: opacity .2s ease;
}
.tag:hover { opacity: .78; }
.tag--ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--line);
}

.cell__foot {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.cell__more {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text);
}
.cell:hover .cell__more { color: var(--accent); }

/* =========================================================
   7. カテゴリ一覧（グリッドとは別のレイアウト家系）
   ========================================================= */

.cats { display: flex; flex-wrap: wrap; gap: 10px; }
.cats a {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 11px 22px;
  font-size: 14.5px;
  transition: border-color .2s ease, color .2s ease;
}
.cats a:hover { border-color: var(--accent); color: var(--accent); }
.cats span { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-3); }

/* =========================================================
   8. このサイトについて帯
   ========================================================= */

.about-band { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 72px); align-items: start; }
@media (max-width: 820px) { .about-band { grid-template-columns: 1fr; } }
.about-band h2 { font-size: clamp(21px, 3vw, 30px); line-height: 1.5; }
.about-band p { color: var(--text-2); font-size: 15px; margin: 0 0 18px; }

.btn {
  display: inline-block;
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
  border-radius: var(--r-pill);
  padding: 12px 26px;
  font-size: 14px;
  white-space: nowrap;
  transition: transform .16s ease, opacity .2s ease;
}
.btn:hover { opacity: .86; }
.btn:active { transform: translateY(1px); }
.btn--quiet { background: transparent; color: var(--text); border-color: var(--line); }
.btn--quiet:hover { border-color: var(--text); opacity: 1; }

/* =========================================================
   9. 記事ページ
   ========================================================= */

.crumbs {
  padding-block: 20px 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-3);
  display: flex; flex-wrap: wrap; gap: 8px;
}
.crumbs a { color: var(--text-2); }
.crumbs a:hover { color: var(--accent); }

.entry { max-width: 760px; margin-inline: auto; padding-bottom: 20px; }

.entry__head { padding-block: 26px 8px; }
.entry__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  margin-bottom: 16px;
}
.entry__title {
  font-size: clamp(25px, 4.2vw, 38px);
  line-height: 1.46;
  letter-spacing: .005em;
  margin-bottom: 18px;
}
.entry__dates {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-3);
  margin-bottom: 22px;
}

/* PR表記。ステマ規制のためファーストビューに置く。 */
.pr-notice {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg-sub);
  padding: 12px 16px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-2);
  margin-bottom: 26px;
}
.pr-notice b {
  flex: none;
  background: var(--chip);
  color: var(--chip-text);
  border-radius: var(--r-pill);
  padding: 3px 11px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
}

.entry__thumb { border-radius: var(--r); overflow: hidden; margin-bottom: 34px; }

/* 本文タイポグラフィ */
.prose { font-size: 16.5px; line-height: 2.05; }
.prose > * { margin-block: 0; }
.prose > * + * { margin-top: 1.5em; }
/* 見出し前の余白。
   本文に &nbsp; や空見出しを入れて余白を作らなくて済むよう、
   CSS側で確保する。数値は手動調整版の見え方に合わせている。 */
.prose h2 {
  font-size: 22px;
  line-height: 1.55;
  margin-top: 4.2em;
  margin-bottom: .2em;
  padding-bottom: .55em;
  border-bottom: 1px solid var(--line);
}
.prose h3 {
  font-size: 18.5px;
  margin-top: 3.2em;
  margin-bottom: .1em;
}
.prose h4 { font-size: 16.5px; margin-top: 2.4em; }

/* 見出しが連続したときは詰める */
.prose h2 + h3, .prose h3 + h4 { margin-top: 1.4em; }

/* 記事の最初の見出しは上を詰める */
.prose > h2:first-child, .prose > h3:first-child { margin-top: 0; }

/* 空の見出しは表示しない（エディタ操作で生まれた場合の保険） */
.prose h2:empty, .prose h3:empty, .prose h4:empty { display: none; }
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.prose a:hover { text-decoration-thickness: 2px; }

/* ボタン類は本文リンクの色・下線指定より優先させる。
   .prose a（0,1,1）が .btn（0,1,0）に勝ってしまい、
   ボタンの文字が背景と同色になって消えるため。 */
.prose a.btn,
.prose a.cta__btn,
.prose a.tag {
  text-decoration: none;
}
.prose a.btn { color: var(--bg); }
.prose a.btn--quiet { color: var(--text); }
.prose a.cta__btn { color: var(--accent-in); }
.prose a.tag { color: var(--chip-text); }
.prose a.tag--ghost { color: var(--text-2); }
/* 強調。マーカーで引いたように見せる。
   リンク（アクセント色＋下線）と見分けがつくよう、文字色は変えず背景で示す。 */
.prose strong,
.prose b {
  font-weight: 700;
  background: linear-gradient(
    transparent 58%,
    color-mix(in srgb, var(--accent) 30%, transparent) 58%
  );
  padding: 0 .08em .06em;
  border-radius: 2px;
}

/* 部品の中の太字にはマーカーを引かない（枠内で二重に主張しないため） */
.prose .cta strong, .prose .cta b,
.prose .fig strong, .prose .fig b,
.prose .karte strong, .prose .karte b,
.prose .shot strong, .prose .shot b {
  background: none;
  padding: 0;
}

.prose img, .prose figure img { border-radius: var(--r); }
.prose figure { margin: 2em 0; }
.prose figcaption {
  font-size: 12.5px;
  color: var(--text-3);
  margin-top: 10px;
  line-height: 1.7;
}
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .5em; }
.prose ul { list-style: none; padding-left: 0; }
.prose ul > li { position: relative; padding-left: 1.3em; }
.prose ul > li::before {
  content: "";
  position: absolute;
  left: .25em; top: .82em;
  width: 6px; height: 1.5px;
  background: var(--text-3);
}
.prose blockquote {
  margin: 2em 0;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--line);
  color: var(--text-2);
}
.prose blockquote p { margin: 0; }
.prose code {
  font-family: var(--font-mono);
  font-size: .88em;
  background: var(--bg-sub);
  border-radius: 5px;
  padding: .15em .45em;
}
.prose pre {
  background: var(--bg-sub);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.75;
}
.prose pre code { background: none; padding: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 3em 0; }

.table-scroll { overflow-x: auto; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.7;
}
.prose th, .prose td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.prose th { font-weight: 700; color: var(--text); white-space: nowrap; }
.prose thead th { border-bottom: 1.5px solid var(--text-3); }

/* =========================================================
   9.5 本文中の図版（CSSだけで作る。画像アップロード不要）
   文字なのでGoogleに読まれ、スマホでも折り返し、ダークモードも追従する。
   ========================================================= */

.fig {
  margin: 2.6em 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg);
}
.fig__head { padding: 20px 24px 0; }
.fig__label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--text-3);
  display: block;
  margin-bottom: 6px;
}
.fig__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.6;
  margin: 0 0 18px;
}

/* 2カラム対比 */
.fig__two { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.fig__two > div { padding: 22px 24px; }
.fig__two > div + div { border-left: 1px solid var(--line); background: var(--bg-sub); }
@media (max-width: 600px) {
  .fig__two { grid-template-columns: 1fr; }
  .fig__two > div + div { border-left: 0; border-top: 1px solid var(--line); }
}

.fig ul { list-style: none; padding: 0; margin: 14px 0 0; }
.fig li {
  position: relative;
  padding-left: 18px;
  font-size: 14.5px;
  line-height: 1.95;
  color: var(--text);
}
.fig li + li { margin-top: 2px; }
.fig li::before {
  content: "";
  position: absolute;
  left: 0; top: .95em;
  width: 9px; height: 1.5px;
  background: var(--text-3);
}

/* ラベルチップ */
.fig__chip {
  display: inline-block;
  border-radius: var(--r-pill);
  padding: 4px 14px;
  font-size: 12px;
  line-height: 1.7;
  background: var(--chip);
  color: var(--chip-text);
}
.fig__chip--ok { background: var(--accent); color: var(--accent-in); }
.fig__chip--ng { background: #9c3b2e; color: #fff; }
.fig__chip--line {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--line);
}

/* 手順フロー */
.fig__flow { padding: 20px 24px; border-top: 1px solid var(--line); }
.fig__flow + .fig__flow { border-top: 1px solid var(--line); }
.fig__flow--ok { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.fig__steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.fig__steps span[aria-hidden] { color: var(--text-3); }
.fig__note {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.8;
  margin: 12px 0 0;
  color: var(--text-2);
}
.fig__note--ng { color: #9c3b2e; }
.fig__note--ok { color: var(--accent); }

/* 数値を見せる分担図 */
.fig__split { display: grid; grid-template-columns: 220px 1fr; border-top: 1px solid var(--line); }
.fig__split > div { padding: 22px 24px; }
.fig__split > div:first-child { background: var(--bg-sub); border-right: 1px solid var(--line); }
@media (max-width: 600px) {
  .fig__split { grid-template-columns: 1fr; }
  .fig__split > div:first-child { border-right: 0; border-bottom: 1px solid var(--line); }
}
.fig__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  line-height: 1.2;
  margin: 12px 0 4px;
}
.fig__num small { font-size: 15px; margin-left: 2px; }
.fig__num--ok { color: var(--accent); }

/* アイキャッチ画像が無い記事の見出しカード。画像を用意しなくても記事が成立する。 */
.post-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 34px 32px 38px;
  margin-bottom: 34px;
  background: var(--bg-sub);
}
.post-hero__cat {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  color: var(--text-2);
}
.post-hero__title {
  font-size: clamp(20px, 3.4vw, 27px);
  line-height: 1.5;
  margin: 12px 0 0;
  max-width: 20em;
  position: relative;
  z-index: 1;
}
.post-hero__ghost {
  position: absolute;
  right: -10px; bottom: -34%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 190px;
  line-height: .8;
  color: transparent;
  -webkit-text-stroke: 1.4px var(--line);
  pointer-events: none;
  user-select: none;
}

/* =========================================================
   9.6 CTAボックス
   本文中のリンクを枠で囲い、価格や特典を並べて判断材料を渡す。
   ボタンだけ置くより、押す前の不安が減る。
   ========================================================= */

.cta {
  position: relative;
  margin: 3.4em 0;
  padding: 26px 28px 28px;
  border: 1.5px solid color-mix(in srgb, var(--accent) 38%, var(--line));
  border-radius: var(--r);
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--accent) 5%, transparent),
      transparent 60%),
    var(--bg-sub);
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--accent);
}

.cta__label {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-in);
  border-radius: var(--r-pill);
  padding: 4px 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  margin-bottom: 14px;
}
.cta__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.5;
  margin: 0 0 4px;
}
.cta__lede {
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--text-2);
  margin: 0 0 16px;
}

.cta__points { list-style: none; padding: 0; margin: 0 0 22px; }
.cta__points li {
  position: relative;
  padding-left: 26px;
  font-size: 14.5px;
  line-height: 1.85;
}
.cta__points li + li { margin-top: 8px; }
.cta__points li::before {
  content: "";
  position: absolute;
  left: 3px; top: .62em;
  width: 12px; height: 6px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.cta__points b { color: var(--text); font-weight: 700; }

.cta__btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: var(--accent);
  color: var(--accent-in);
  border-radius: var(--r-pill);
  padding: 16px 24px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  overflow: hidden;
  transition: transform .16s ease, box-shadow .25s ease;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 28%, transparent);
}
.cta__btn:hover { box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 38%, transparent); }
.cta__btn:active { transform: translateY(1px); }
.cta__btn::after {
  content: "→";
  font-family: var(--font-mono);
  transition: transform .25s ease;
}
.cta__btn:hover::after { transform: translateX(4px); }

/* ボタンを横切る光。押せることを伝えるための最小限の動き */
@media (prefers-reduced-motion: no-preference) {
  .cta__btn::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    width: 40%;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent-in) 22%, transparent), transparent);
    animation: cta-sheen 3.6s ease-in-out infinite;
  }
  @keyframes cta-sheen {
    0%   { left: -45%; }
    55%  { left: 115%; }
    100% { left: 115%; }
  }
}

.cta__note {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.8;
  color: var(--text-3);
  text-align: center;
}

/* =========================================================
   9.7 検証カルテ
   記事末尾の定型ボックス。毎回同じ枠で、最後の1行だけ毎回変わる。
   この「今回の余談」がお約束の枠。
   ========================================================= */

.karte {
  margin: 3.6em 0 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.karte__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg-sub);
  border-bottom: 1px solid var(--line);
}
.karte__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: .04em;
}
.karte__stamp {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: var(--r-pill);
  padding: 3px 10px;
  white-space: nowrap;
}
.karte dl { margin: 0; }
.karte dl > div {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 0 18px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line-soft);
}
.karte dl > div:last-child { border-bottom: 0; }
@media (max-width: 560px) {
  .karte dl > div { grid-template-columns: 1fr; gap: 4px; }
}
.karte dt {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--text-3);
  padding-top: .3em;
}
.karte dd {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.85;
}
/* =========================================================
   9.7b 今回の余談
   カルテとは別の独立した枠。毎回ここだけ中身が変わるお約束の欄。
   実測データの硬い枠のあとに、手書きメモのような柔らかい面を置く。
   ========================================================= */

.yodan {
  position: relative;
  margin: 2.2em 0 0;
  padding: 26px 28px 26px 30px;
  border-radius: var(--r);
  background:
    repeating-linear-gradient(
      -45deg,
      transparent, transparent 9px,
      color-mix(in srgb, var(--accent) 5%, transparent) 9px,
      color-mix(in srgb, var(--accent) 5%, transparent) 10px
    ),
    color-mix(in srgb, var(--accent) 8%, var(--bg));
  border: 1px dashed color-mix(in srgb, var(--accent) 42%, transparent);
}

.yodan__label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent);
  border-radius: var(--r-pill);
  padding: 5px 15px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .06em;
  position: absolute;
  top: -14px;
  left: 24px;
}

.yodan p {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 2;
}
.yodan p:first-of-type { margin-top: 4px; }

/* 締めの一言。少しだけ字を大きく、傾ける */
.yodan__punch {
  display: block;
  margin-top: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--accent);
}

.yodan__by {
  display: block;
  margin-top: 16px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-3);
}

/* 隅の折り返し。メモらしさを出す最小限の装飾 */
.yodan::after {
  content: "";
  position: absolute;
  right: 0; bottom: 0;
  width: 26px; height: 26px;
  background: linear-gradient(135deg, transparent 50%, color-mix(in srgb, var(--accent) 22%, var(--bg)) 50%);
  border-bottom-right-radius: var(--r);
}

/* =========================================================
   9.8 本文中のセクション見出し画像（CSSで作る視覚ブロック）
   ========================================================= */

.shot {
  position: relative;
  margin: 2.4em 0 2.8em;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px),
    var(--bg-sub);
  background-size: 26px 26px, 26px 26px, auto;
  padding: 30px 28px 32px;
  overflow: hidden;
}
.shot__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--text-3);
}
.shot__lead {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(19px, 3.2vw, 25px);
  line-height: 1.5;
  margin: 10px 0 0;
  max-width: 20em;
  position: relative;
  z-index: 1;
}
.shot__sub {
  margin: 12px 0 0;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--text-2);
  position: relative;
  z-index: 1;
}
.shot__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  position: relative;
  z-index: 1;
}
.shot__ghost {
  position: absolute;
  right: -14px; bottom: -34px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 132px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.4px var(--line);
  pointer-events: none;
  user-select: none;
}

/* イラストを添える版。左にテキスト、右に線画。
   線画は currentColor と --accent で描いてあるのでダークモードにも追従する。 */
.shot--art {
  display: grid;
  grid-template-columns: 1fr 232px;
  gap: 26px;
  align-items: center;
}
.shot--art .shot__body { min-width: 0; }
.shot__art {
  color: var(--text-2);
  align-self: center;
}
.shot__art img,
.shot__art svg {
  width: 100%;
  height: auto;
  display: block;
}
@media (max-width: 620px) {
  .shot--art { grid-template-columns: 1fr; gap: 18px; }
  .shot__art { max-width: 240px; margin-inline: auto; }
  .shot--art .shot__ghost { display: none; }
}

/* 線画をゆっくり描き足すような動き。1回だけ、控えめに */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .shot__art {
      animation: art-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
    @keyframes art-in {
      from { opacity: 0; transform: translateY(10px) scale(.98); }
      to   { opacity: 1; transform: none; }
    }
  }
}

/* 記事下の運営者ボックス。E-E-A-Tの根拠として置く。 */
.author-box {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px 24px;
  margin-top: 56px;
}
.author-box__mark {
  flex: none;
  width: 46px; height: 46px;
  border-radius: var(--r-pill);
  border: 1.4px solid var(--line);
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-2);
}
.author-box h3 { font-size: 15px; margin-bottom: 6px; }
.author-box p { margin: 0; font-size: 13.5px; line-height: 1.85; color: var(--text-2); }
.author-box a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* =========================================================
   10. ページネーション
   ========================================================= */

.pager {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center;
  padding-block: 48px 8px;
}
.pager .page-numbers {
  min-width: 42px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: center;
  color: var(--text-2);
  transition: border-color .2s ease, color .2s ease;
}
.pager .page-numbers:hover { border-color: var(--text); color: var(--text); }
.pager .page-numbers.current { background: var(--text); border-color: var(--text); color: var(--bg); }

/* =========================================================
   11. フッター
   ========================================================= */

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: clamp(56px, 9vw, 104px);
  padding-block: clamp(44px, 6vw, 68px) 34px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(28px, 5vw, 60px);
  margin-bottom: 44px;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 34px; } }

.footer-grid h2 { font-size: 12px; font-family: var(--font-mono); font-weight: 500; letter-spacing: .1em; color: var(--text-3); margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li + li { margin-top: 9px; }
.footer-grid a { font-size: 14px; color: var(--text-2); }
.footer-grid a:hover { color: var(--accent); }
.footer-lede { font-size: 14px; color: var(--text-2); margin: 12px 0 0; max-width: 26em; }

.footer-base {
  display: flex; flex-wrap: wrap; gap: 10px 22px;
  align-items: center; justify-content: space-between;
  border-top: 1px solid var(--line-soft);
  padding-top: 22px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-3);
}

/* =========================================================
   12. 検索・404・アーカイブ見出し
   ========================================================= */

.page-head { padding-block: clamp(34px, 5vw, 56px) 4px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(24px, 3.6vw, 34px); margin-bottom: 12px; }
.page-head p { margin: 0 0 26px; color: var(--text-2); font-size: 14.5px; max-width: 46em; }

.notice-empty {
  padding: clamp(48px, 8vw, 96px) 0;
  text-align: center;
  color: var(--text-2);
}
.notice-empty h2 { font-size: 20px; margin-bottom: 12px; }
.notice-empty p { margin: 0 0 22px; font-size: 14.5px; }

.searchform { display: flex; gap: 8px; max-width: 420px; }
.notice-empty .searchform { margin-inline: auto; }
.searchform input[type="search"] {
  flex: 1;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 11px 18px;
}
.searchform input[type="search"]::placeholder { color: var(--text-3); }
.searchform input[type="search"]:focus { border-color: var(--accent); outline: none; }

/* =========================================================
   13. スクロール表示（対応ブラウザのみ。動きを抑える設定を尊重）
   意図：一覧で上から順に読ませるための序列付け。装飾目的では使わない。
   ========================================================= */

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .cell {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 42%;
    }
    @keyframes rise {
      from { opacity: 0; transform: translateY(14px); }
      to   { opacity: 1; transform: none; }
    }
  }
}

/* WordPress 標準クラス */
.alignwide { max-width: min(100%, 1000px); margin-inline: auto; }
.alignfull { max-width: none; }
.aligncenter { margin-inline: auto; }
.wp-caption { max-width: 100%; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
