/* ==========================================================================
   AFFINGER 互換スタイル(過去記事の装飾を、新テーマで同じ意味・同じ名前で表示する)
   --------------------------------------------------------------------------
   過去記事の本文には <p class="is-style-st-paragraph-memo"> のようなクラスが保存されている。
   記事データは一切書き換えず、このCSSだけで表示する。
   - 色は白黒に寄せている(元はカラフル)。元の色に戻したい場合は
     外観 > カスタマイズ > 涅槃ぶろぐ > 「過去記事の装飾に元の色を使う」をオンにする。
   - 吹き出し(会話)は使わない方針のため、アイコンなしの「導入文」として表示する。
   使用状況の一覧は docs/AFFINGER装飾_集計.csv / AFFINGER装飾_記事別.csv を参照。
   ========================================================================== */

/* ---------- 色パレット(過去記事が参照するクラス) ---------- */
:root .has-white-color { color: #ffffff; }
:root .has-white-background-color { background-color: #ffffff; }
:root .has-black-color { color: #000000; }
:root .has-black-background-color { background-color: #000000; }
:root .has-pale-pink-color { color: #f78da7; }
:root .has-pale-pink-background-color { background-color: #f78da7; }
:root .has-vivid-red-color { color: #cf2e2e; }
:root .has-vivid-red-background-color { background-color: #cf2e2e; }
:root .has-luminous-vivid-orange-color { color: #ff6900; }
:root .has-luminous-vivid-orange-background-color { background-color: #ff6900; }
:root .has-luminous-vivid-amber-color { color: #fcb900; }
:root .has-luminous-vivid-amber-background-color { background-color: #fcb900; }
:root .has-light-green-cyan-color { color: #7bdcb5; }
:root .has-light-green-cyan-background-color { background-color: #7bdcb5; }
:root .has-vivid-green-cyan-color { color: #00d084; }
:root .has-vivid-green-cyan-background-color { background-color: #00d084; }
:root .has-pale-cyan-blue-color { color: #8ed1fc; }
:root .has-pale-cyan-blue-background-color { background-color: #8ed1fc; }
:root .has-vivid-cyan-blue-color { color: #0693e3; }
:root .has-vivid-cyan-blue-background-color { background-color: #0693e3; }
:root .has-vivid-purple-color { color: #9b51e0; }
:root .has-vivid-purple-background-color { background-color: #9b51e0; }
:root .has-cyan-bluish-gray-color { color: #abb8c3; }
:root .has-cyan-bluish-gray-background-color { background-color: #abb8c3; }
:root .has-very-dark-gray-color { color: #313131; }
:root .has-very-dark-gray-background-color { background-color: #313131; }
/* AFFINGER 側で定義されていた色(style.css から転記) */
:root .has-soft-red-color { color: #e6514c; }
:root .has-soft-red-background-color { background-color: #e6514c; }
:root .has-light-grayish-red-color { color: #fdebee; }
:root .has-light-grayish-red-background-color { background-color: #fdebee; }
:root .has-vivid-yellow-color { color: #ffc107; }
:root .has-vivid-yellow-background-color { background-color: #ffc107; }
:root .has-very-pale-yellow-color { color: #fffde7; }
:root .has-very-pale-yellow-background-color { background-color: #fffde7; }
:root .has-very-light-gray-color { color: #fafafa; }
:root .has-very-light-gray-background-color { background-color: #fafafa; }
/* AFFINGER「オリジナルカラー」(設定値が書き出せなかったため近似色。必要なら差し替え) */
:root .has-original-color-a-color { color: #00b900; }
:root .has-original-color-a-background-color { background-color: #00b900; }
:root .has-original-color-b-color { color: #f4fff4; }
:root .has-original-color-b-background-color { background-color: #f4fff4; }
:root .has-original-color-c-color { color: #f3e5f5; }
:root .has-original-color-c-background-color { background-color: #f3e5f5; }
:root .has-original-color-d-color { color: #9e9d24; }
:root .has-original-color-d-background-color { background-color: #9e9d24; }

/* 背景色つきの段落・見出しは、読みやすい余白を付ける */
.entry-content p.has-background,
.entry-content h2.has-background,
.entry-content h3.has-background { padding: 1em 1.2em; }
.entry-content h2.has-background { border-left: 0; }
.entry-content mark.has-inline-color { background: none; }

/* 文字サイズ(AFFINGER「標準」=1em) */
.has-st-regular-font-size { font-size: 1em; }
.has-small-font-size { font-size: .875em; }
.has-medium-font-size { font-size: 1.1em; }
.has-large-font-size { font-size: 1.4em; }
.has-x-large-font-size { font-size: 1.8em; }
.has-huge-font-size { font-size: 2em; }

/* ---------- アイコン(マスク画像。文字色に追従) ---------- */
[class*="is-style-st-paragraph-"] {
  --nb-icon: none;
  --nb-bg: #f6f6f6;
  --nb-bar: transparent;
}
.is-style-st-paragraph-pen          { --nb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20l1-4L16 5l3 3L8 19z'/%3E%3Cpath d='M14 7l3 3'/%3E%3C/svg%3E"); }
.is-style-st-paragraph-memo-txt     { --nb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h8l4 4v14H6z'/%3E%3Cpath d='M14 3v4h4M9 12h6M9 16h6'/%3E%3C/svg%3E"); }
.is-style-st-paragraph-link         { --nb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1'/%3E%3Cpath d='M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1'/%3E%3C/svg%3E"); }
.is-style-st-paragraph-check        { --nb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E"); --nb-bar: var(--ink); }
.is-style-st-paragraph-point        { --nb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 21h4'/%3E%3Cpath d='M12 3a6 6 0 0 0-3.5 10.9c.6.5 1 1.2 1 2.1h5c0-.9.4-1.6 1-2.1A6 6 0 0 0 12 3z'/%3E%3C/svg%3E"); --nb-bar: var(--ink); }
.is-style-st-paragraph-info-circle  { --nb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v6M12 7.5v.01'/%3E%3C/svg%3E"); --nb-bar: var(--ink); }
.is-style-st-paragraph-thumbs-o-up  { --nb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 11v9H4v-9zM7 11l4-7c1.5 0 2.500 1 2 2.500L12.500 10H19a2 2 0 0 1 2 2.300l-1.200 6A2 2 0 0 1 17.800 20H7'/%3E%3C/svg%3E"); --nb-bar: var(--ink); }
.is-style-st-paragraph-attention-gray { --nb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v6M12 16.500v.01'/%3E%3C/svg%3E"); }
.is-style-st-paragraph-attention    { --nb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v6M12 16.500v.01'/%3E%3C/svg%3E"); --nb-bg: #fff; }
.is-style-st-paragraph-times        { --nb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E"); --nb-bg: #fff; }
.is-style-st-paragraph-thumbs-o-down { --nb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 13V4H4v9zM7 13l4 7c1.500 0 2.500-1 2-2.500L12.500 14H19a2 2 0 0 0 2-2.300l-1.200-6A2 2 0 0 0 17.800 4H7'/%3E%3C/svg%3E"); --nb-bg: #fff; }

/* アイコン付きの枠(ペン・メモ文字・リンク・チェック・POINT・情報・注意・×・グッド・バッド) */
.entry-content .is-style-st-paragraph-pen,
.entry-content .is-style-st-paragraph-memo-txt,
.entry-content .is-style-st-paragraph-link,
.entry-content .is-style-st-paragraph-check,
.entry-content .is-style-st-paragraph-point,
.entry-content .is-style-st-paragraph-info-circle,
.entry-content .is-style-st-paragraph-attention,
.entry-content .is-style-st-paragraph-attention-gray,
.entry-content .is-style-st-paragraph-times,
.entry-content .is-style-st-paragraph-thumbs-o-up,
.entry-content .is-style-st-paragraph-thumbs-o-down {
  position: relative;
  margin: 0 0 1.6em;
  padding: 1em 1.1em 1em 3.5em;
  background: var(--nb-bg);
  border-left: 3px solid var(--nb-bar);
  font-size: .95em;
  line-height: 1.85;
}
.entry-content .is-style-st-paragraph-pen::before,
.entry-content .is-style-st-paragraph-memo-txt::before,
.entry-content .is-style-st-paragraph-link::before,
.entry-content .is-style-st-paragraph-check::before,
.entry-content .is-style-st-paragraph-point::before,
.entry-content .is-style-st-paragraph-info-circle::before,
.entry-content .is-style-st-paragraph-attention::before,
.entry-content .is-style-st-paragraph-attention-gray::before,
.entry-content .is-style-st-paragraph-times::before,
.entry-content .is-style-st-paragraph-thumbs-o-up::before,
.entry-content .is-style-st-paragraph-thumbs-o-down::before {
  content: "";
  position: absolute; left: 1.1em; top: 1.2em;
  width: 1.3em; height: 1.3em;
  background: currentColor; opacity: .6;
  -webkit-mask: var(--nb-icon) center / contain no-repeat;
  mask: var(--nb-icon) center / contain no-repeat;
}
/* 注意系は白地に細い黒枠(警告であることが分かるように) */
.entry-content .is-style-st-paragraph-attention,
.entry-content .is-style-st-paragraph-times,
.entry-content .is-style-st-paragraph-thumbs-o-down { border: 1px solid var(--ink); border-left-width: 1px; }
.entry-content .is-style-st-paragraph-attention::before,
.entry-content .is-style-st-paragraph-times::before,
.entry-content .is-style-st-paragraph-thumbs-o-down::before { opacity: 1; }
.entry-content [class*="is-style-st-paragraph-"] strong { font-weight: 700; }

/* メモ枠(右上が折れた付箋) */
.entry-content .is-style-st-paragraph-memo {
  position: relative;
  margin: 0 0 1.8em; padding: 1.3em 1.5em;
  background: #fafafa; border: 1px solid #dcdcdc;
  line-height: 1.9;
}
.entry-content .is-style-st-paragraph-memo::before {
  content: ""; position: absolute; top: -1px; right: -1px;
  width: 18px; height: 18px;
  background: linear-gradient(225deg, #fff 50%, #dcdcdc 50%);
  border-left: 1px solid #dcdcdc; border-bottom: 1px solid #dcdcdc;
}

/* 点線の枠 */
.entry-content .is-style-st-paragraph-dotline {
  margin: 0 0 1.8em; padding: 1.3em 1.4em;
  background: var(--paper-soft); border: 2px dashed #c9c9c9;
}

/* 吹き出し風(アイコンなしの小さな吹き出し) */
.entry-content .is-style-st-paragraph-bubble {
  position: relative; width: fit-content; max-width: 100%;
  margin: 0 0 1.8em; padding: .6em 1.1em;
  background: #f0f0f0; color: var(--ink); line-height: 1.6;
}
.entry-content .is-style-st-paragraph-bubble::after {
  content: ""; position: absolute; top: 100%; left: 1.6em;
  border: 9px solid transparent; border-top-color: #f0f0f0; margin-left: -9px;
}
.entry-content .is-style-st-paragraph-bubble.has-text-align-center { margin-left: auto; margin-right: auto; }
.entry-content .is-style-st-paragraph-bubble.has-text-align-center::after { left: 50%; }
.entry-content .is-style-st-paragraph-bubble.has-text-align-right { margin-left: auto; }

/* 会話(旧・吹き出し)。アイコンなしの導入文として表示する。 */
.entry-content .is-style-st-paragraph-kaiwa,
.entry-content .is-style-st-paragraph-kaiwa-b {
  margin: 0 0 1.6em; padding: .1em 0 .1em 1em;
  border-left: 2px solid var(--ink);
  font-family: var(--font-serif); font-size: 1.05em; line-height: 1.9;
}
.entry-content .is-style-st-paragraph-kaiwa-b { border-left-color: #a8a8a8; color: var(--ink-soft); }

/* 情報ボックス(段落・見出し) / 警告ボックス */
.entry-content .is-style-info {
  margin: 0 0 1.8em; padding: 1.1em 1.3em;
  background: var(--paper-soft); border-left: 3px solid var(--ink);
  font-size: .95em; line-height: 1.9;
}
.entry-content h2.is-style-info, .entry-content h3.is-style-info, .entry-content h4.is-style-info {
  margin-top: 2em; font-family: var(--font-serif); font-size: 1.1rem;
}
.entry-content .is-style-error {
  margin: 0 0 1.8em; padding: 1.1em 1.3em;
  background: #fff; border: 1px solid var(--ink);
  font-size: .95em; line-height: 1.9;
}

/* ---------- グループ ---------- */
.entry-content .is-style-st-group-line      { border-left: 1px solid #cfcfcf; padding-left: 1.2em; margin: 2em 0; }
.entry-content .is-style-st-group-line-bold { border-left: 4px solid #d4d4d4; padding-left: 1.2em; margin: 2em 0; }
.entry-content .is-style-st-group-bg-grid {
  margin: 2em 0; padding: 1.3em;
  background-image: linear-gradient(transparent 95%, rgba(0,0,0,.06) 50%, rgba(0,0,0,.06)), linear-gradient(90deg, transparent 95%, rgba(0,0,0,.06) 50%, rgba(0,0,0,.06));
  background-size: 16px 16px;
}
.entry-content .is-style-st-group-bg-dot {
  margin: 2em 0; padding: 1.3em;
  background-image: radial-gradient(#e4e4e4 1px, transparent 1px); background-size: 20px 20px;
}
.entry-content .is-style-st-group-bg-diagonal {
  margin: 2em 0; padding: 1.3em; background-color: #f5f5f5;
  background-image: repeating-linear-gradient(45deg, #fff 0, #fff 2px, transparent 2px, transparent 7px);
}
.entry-content [class*="is-style-st-group-"] > *:last-child { margin-bottom: 0; }

/* ---------- 見出し ---------- */
.entry-content h2.is-style-st-heading-custom-diagonal,
.entry-content h3.is-style-st-heading-custom-diagonal {
  padding: .7em 1.1em; border: 0;
  background-color: #f5f5f5;
  background-image: repeating-linear-gradient(45deg, #fff 0, #fff 2px, transparent 2px, transparent 7px);
}
.entry-content h2.is-style-st-heading-custom-bubble,
.entry-content h3.is-style-st-heading-custom-bubble {
  position: relative; padding: .7em 1.1em; border: 0; border-radius: 4px; background: #f0f0f0;
}
.entry-content h2.is-style-st-heading-custom-bubble::after,
.entry-content h3.is-style-st-heading-custom-bubble::after {
  content: ""; position: absolute; top: 100%; left: 2em; margin-left: -10px;
  border: 10px solid transparent; border-top-color: #f0f0f0;
}

/* ---------- リスト(チェック丸 / 番号丸) ---------- */
.entry-content ul.is-style-st-maruck, .entry-content ol.is-style-st-maruno { list-style: none; padding-left: 0; counter-reset: nb-no; }
.entry-content .is-style-st-maruck > li, .entry-content .is-style-st-maruno > li { position: relative; padding-left: 2.4em; margin: .6em 0; }
.entry-content .is-style-st-maruno > li { counter-increment: nb-no; }
.entry-content .is-style-st-maruck > li::before, .entry-content .is-style-st-maruno > li::before {
  position: absolute; left: .1em; top: .35em;
  width: 1.5em; height: 1.5em; line-height: 1.5em; text-align: center;
  border-radius: 50%; background: #f0f0f0; color: var(--ink); font-size: .8em;
}
.entry-content .is-style-st-maruck > li::before { content: "✓"; }
.entry-content .is-style-st-maruno > li::before { content: counter(nb-no); }

/* ---------- ボタン・表 ---------- */
.entry-content .wp-block-button.is-style-shadow .wp-block-button__link { box-shadow: 0 4px 10px rgba(0, 0, 0, .18); }
.entry-content .wp-block-table.is-style-scroll-box { overflow-x: auto; }

/* ---------- 元の色に戻す(カスタマイザーでオン) ---------- */
.nehan-legacy-colors .is-style-st-paragraph-check,
.nehan-legacy-colors .is-style-st-paragraph-point,
.nehan-legacy-colors .is-style-st-paragraph-memo { background: #fff8e1; }
.nehan-legacy-colors .is-style-st-paragraph-memo { background: #fffde7; border-color: #f0e9b0; }
.nehan-legacy-colors .is-style-st-paragraph-info-circle,
.nehan-legacy-colors .is-style-st-paragraph-thumbs-o-up { background: #e1f5fe; }
.nehan-legacy-colors .is-style-st-paragraph-attention,
.nehan-legacy-colors .is-style-st-paragraph-times,
.nehan-legacy-colors .is-style-st-paragraph-thumbs-o-down { background: #ffebee; border-color: #f9bdbc; }
.nehan-legacy-colors .is-style-st-paragraph-dotline { background: #fce4ec; border-color: #fff; box-shadow: 0 0 0 7px #fce4ec; margin-left: 7px; margin-right: 7px; }
.nehan-legacy-colors .is-style-st-paragraph-check::before { color: #ff8f00; opacity: 1; }
.nehan-legacy-colors .is-style-st-paragraph-point::before { color: #ffa726; opacity: 1; }
.nehan-legacy-colors .is-style-st-paragraph-info-circle::before,
.nehan-legacy-colors .is-style-st-paragraph-thumbs-o-up::before { color: #4fc3f7; opacity: 1; }
.nehan-legacy-colors .is-style-st-paragraph-attention::before,
.nehan-legacy-colors .is-style-st-paragraph-times::before,
.nehan-legacy-colors .is-style-st-paragraph-thumbs-o-down::before { color: #ef5350; opacity: 1; }
.nehan-legacy-colors .is-style-st-paragraph-check,
.nehan-legacy-colors .is-style-st-paragraph-point,
.nehan-legacy-colors .is-style-st-paragraph-info-circle,
.nehan-legacy-colors .is-style-st-paragraph-thumbs-o-up { border-left-color: transparent; }

/* ---------- スマホ微調整 ---------- */
@media (max-width: 719px) {
  .entry-content .is-style-st-paragraph-pen,
  .entry-content .is-style-st-paragraph-memo-txt,
  .entry-content .is-style-st-paragraph-link,
  .entry-content .is-style-st-paragraph-check,
  .entry-content .is-style-st-paragraph-point,
  .entry-content .is-style-st-paragraph-info-circle,
  .entry-content .is-style-st-paragraph-attention,
  .entry-content .is-style-st-paragraph-attention-gray,
  .entry-content .is-style-st-paragraph-times,
  .entry-content .is-style-st-paragraph-thumbs-o-up,
  .entry-content .is-style-st-paragraph-thumbs-o-down { padding: .9em .9em .9em 3em; }
  .entry-content .is-style-st-paragraph-pen::before,
  .entry-content .is-style-st-paragraph-memo-txt::before,
  .entry-content .is-style-st-paragraph-link::before,
  .entry-content .is-style-st-paragraph-check::before,
  .entry-content .is-style-st-paragraph-point::before,
  .entry-content .is-style-st-paragraph-info-circle::before,
  .entry-content .is-style-st-paragraph-attention::before,
  .entry-content .is-style-st-paragraph-attention-gray::before,
  .entry-content .is-style-st-paragraph-times::before,
  .entry-content .is-style-st-paragraph-thumbs-o-up::before,
  .entry-content .is-style-st-paragraph-thumbs-o-down::before { left: .9em; top: 1.1em; }
  .entry-content .is-style-st-paragraph-memo { padding: 1.1em 1.1em; }
  .entry-content .is-style-st-paragraph-dotline { padding: 1.1em; }
}
