/* GMJブログ（CTOブログ以外）の本文の装飾（2026-11-16）。.post-body.gb の中だけに効く。
   仕様は GMJ-HP の docs（blog-deco-spec）。サイトの「旅の線と駅」・墨の 2px 線・赤・丸ゴシックから起こした GMJ オリジナル。
   色の変数は旧い CSS と名前が重なるので --gb- を付ける。目印（class・id・目次・CTA）は src/utils/blog-deco.ts が表示のときに付ける。 */
.archive-body .bd .post-body.gb{
 --gb-disp:"Zen Maru Gothic","Hiragino Maru Gothic ProN","Hiragino Sans",sans-serif;
 --gb-person:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='4.2'/%3E%3Cpath d='M3.5 21a8.5 8.5 0 0 1 17 0z'/%3E%3C/svg%3E");
 --gb-line-ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 18'%3E%3Cpath fill-rule='evenodd' d='M4 1h12a3 3 0 0 1 3 3v7a3 3 0 0 1-3 3h-6l-4.5 3.5V14H4a3 3 0 0 1-3-3V4a3 3 0 0 1 3-3zM6.5 6.3a1.2 1.2 0 1 0 0 2.4a1.2 1.2 0 0 0 0-2.4zM10 6.3a1.2 1.2 0 1 0 0 2.4a1.2 1.2 0 0 0 0-2.4zM13.5 6.3a1.2 1.2 0 1 0 0 2.4a1.2 1.2 0 0 0 0-2.4z'/%3E%3C/svg%3E");
 counter-reset:gb-h;font-size:17px;line-height:2;color:#14161a;overflow-wrap:anywhere;

 p{margin:0 0 1.6em}
 a{color:#14161a;text-decoration:underline;text-decoration-color:#D91433;text-decoration-thickness:2px;text-underline-offset:4px}
 a:hover{color:#AE1029}
 strong,b{font-weight:700;color:#14161a}

 /* 大見出し: 赤い駅に番号 */
 h2{position:relative;min-height:46px;margin:80px 0 28px;padding:0 0 16px 62px;border:0;border-bottom:2px solid #14161a;background:none;text-align:left;font:900 27px/1.5 var(--gb-disp);letter-spacing:-.01em;text-wrap:balance;word-break:auto-phrase;scroll-margin-top:96px}
 h2:not([id]){padding-left:0}
 h2[id]{counter-increment:gb-h}
 h2[id]::before{content:counter(gb-h,decimal-leading-zero);position:absolute;left:0;top:-3px;display:flex;align-items:center;justify-content:center;width:46px;height:46px;border-radius:50%;background:#D91433;color:#fff;font:900 18px/1 var(--gb-disp);letter-spacing:0;box-shadow:0 0 0 6px rgba(217,20,51,.16)}
 h2 br,h3 br{display:none}
 /* 小見出し: 赤い点線の線路 */
 h3{position:relative;margin:56px 0 18px;padding:2px 0 2px 20px;border:0;background:none;font:900 21px/1.55 var(--gb-disp);text-align:left;text-wrap:balance;word-break:auto-phrase;scroll-margin-top:96px}
 h3::before{content:"";position:absolute;left:0;top:.2em;bottom:.2em;width:4px;border-radius:2px;background:linear-gradient(#D91433 60%,transparent 0) 0 0/4px 10px repeat-y}
 h4,h5{margin:36px 0 12px;padding:0;border:0;background:none;font:700 18px/1.6 "BIZ UDPGothic","Hiragino Sans",sans-serif;text-align:left}
 h4::before,h5::before{content:"";display:inline-block;width:14px;height:3px;margin:0 10px .3em 0;vertical-align:middle;border-radius:2px;background:#D91433}

 /* マーカー */
 mark{background:linear-gradient(transparent 62%,rgba(217,20,51,.28) 0);color:inherit;font-weight:700;padding:0 2px;-webkit-box-decoration-break:clone;box-decoration-break:clone}
 mark.gb-y{background:linear-gradient(transparent 58%,#FFE27A 0)}

 /* 箇条書き */
 ul,ol{margin:0 0 28px;padding:0;list-style:none;line-height:1.9}
 li{position:relative;margin:0 0 8px}
 ul>li{padding-left:26px}
 ul>li::before{content:"";position:absolute;left:4px;top:calc(.95em - 5px);width:10px;height:10px;border-radius:50%;background:#D91433}
 ul ul{margin:8px 0 0}
 ul ul>li::before{box-sizing:border-box;background:#fff;border:2px solid #D91433}
 ol{counter-reset:gb-ol}
 ol>li{counter-increment:gb-ol;padding-left:38px}
 ol>li::before{content:counter(gb-ol);position:absolute;left:0;top:calc(.95em - 13px);box-sizing:border-box;width:26px;height:26px;display:flex;align-items:center;justify-content:center;border:2px solid #14161a;border-radius:50%;font:900 13px/1 var(--gb-disp)}

 /* 枠 4 種 */
 .gb-box{position:relative;margin:40px 0;padding:24px 28px;border-radius:20px;font-size:16px;line-height:1.9}
 .gb-box>:last-child{margin-bottom:0}
 .gb-box-k{margin:0 0 8px;font:900 15px/1.4 var(--gb-disp)}
 .gb-point{border:2px solid #D91433;background:#fff}
 .gb-point .gb-box-k{color:#D91433}
 .gb-point .gb-box-k::before,.gb-toc-h::before{content:"";display:inline-block;width:10px;height:10px;margin-right:8px;border-radius:50%;background:#D91433}
 .gb-caution{border:2px dashed #AE1029;background:#fff7f8}
 .gb-caution .gb-box-k{display:inline-flex;margin-bottom:10px;padding:2px 12px;border-radius:999px;background:#AE1029;color:#fff}
 .gb-memo{background:#EFF1F4}
 .gb-memo .gb-box-k{color:#5E6066}
 .gb-matome{margin-top:56px;padding-top:30px;border:2px solid #14161a;background:#fff;box-shadow:8px 8px 0 #14161a}
 .gb-matome .gb-box-k{position:absolute;top:-15px;left:24px;margin:0;padding:3px 16px;border-radius:999px;background:#14161a;color:#fff}

 /* 結論の箱 */
 .gb-ketsuron{position:relative;margin:40px 0 48px;padding:34px 30px 26px;border:2px solid #14161a;border-radius:24px;background:#fff;box-shadow:8px 8px 0 #D91433}
 .gb-ketsuron-k{position:absolute;top:-16px;left:24px;margin:0;padding:3px 18px;border-radius:999px;background:#D91433;color:#fff;font:900 16px/1.5 var(--gb-disp)}
 .gb-ketsuron p:not(.gb-ketsuron-k){margin:0;font-size:18px;font-weight:700;line-height:1.85}

 /* 吹き出し（読者の悩みの声） */
 .gb-voices{display:grid;gap:16px;margin:32px 0 40px}
 .gb-voice{position:relative;box-sizing:border-box;width:fit-content;max-width:min(88%,560px);margin:0 0 0 64px;padding:14px 20px;border-radius:22px 22px 22px 4px;background:#EFF1F4;font-size:16px;line-height:1.75}
 .gb-voice::before{content:"";position:absolute;left:-64px;bottom:0;box-sizing:border-box;width:48px;height:48px;border-radius:50%;background:#fff;border:2px solid #14161a}
 .gb-voice::after{content:"";position:absolute;left:-52px;bottom:12px;width:24px;height:24px;background:#5E6066;-webkit-mask:var(--gb-person) center/contain no-repeat;mask:var(--gb-person) center/contain no-repeat}
 .gb-voice-r{margin-left:auto;margin-right:64px;border-radius:22px 22px 4px 22px;background:#fff;border:2px solid #14161a}
 .gb-voice-r::before{left:auto;right:-64px}
 .gb-voice-r::after{left:auto;right:-52px}

 /* 引用 */
 blockquote{position:relative;margin:40px 0;padding:28px 28px 22px 72px;border:0;border-radius:20px;background:#EFF1F4;font-size:16px;font-style:normal;line-height:1.9}
 blockquote::before{content:"「";position:absolute;left:18px;top:10px;font:900 56px/1 var(--gb-disp);color:#D91433}
 blockquote::after{content:none}
 blockquote p{margin:0 0 .8em}
 blockquote>:last-child{margin-bottom:0}
 blockquote cite{display:block;margin-top:10px;text-align:right;font-style:normal;font-size:13px;color:#5E6066}
 blockquote cite::before{content:"出典："}

 /* リンクカード */
 .gb-card{position:relative;display:grid;gap:4px;margin:32px 0;padding:18px 72px 18px 22px;border:2px solid #14161a;border-radius:20px;background:#fff;color:#14161a;text-decoration:none;transition:transform .3s,box-shadow .3s,background .25s}
 .gb-card+.gb-card{margin-top:-16px}
 .gb-card-k{justify-self:start;padding:0 10px;border:2px solid #14161a;border-radius:999px;font-size:12px;font-weight:700;line-height:1.6}
 .gb-card-t{font-size:16px;font-weight:700;line-height:1.6;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 .gb-card-u{font-size:13px;color:#5E6066;overflow-wrap:anywhere}
 .gb-card::after{content:"→";position:absolute;right:18px;top:50%;box-sizing:border-box;width:38px;height:38px;margin-top:-19px;display:flex;align-items:center;justify-content:center;border:2px solid #14161a;border-radius:50%;font-weight:900;line-height:1;transition:background .25s,color .25s}
 .gb-card:hover{color:#14161a}
 .gb-card:hover::after{background:#14161a;color:#fff}

 /* 目次: 路線図 */
 .gb-toc{margin:40px 0 56px;padding:26px 30px;border-radius:24px;background:#EFF1F4}
 .gb-toc-h{margin:0 0 14px;font:900 20px/1.4 var(--gb-disp)}
 .gb-toc ol{position:relative;margin:0;padding:0;list-style:none;counter-reset:gb-t;line-height:1.6}
 .gb-toc ol::before{content:"";position:absolute;left:14px;top:16px;bottom:16px;width:4px;margin-left:-2px;background:linear-gradient(#c9ccd2 55%,transparent 0) 0 0/4px 14px}
 .gb-toc li{position:relative;counter-increment:gb-t;padding:6px 0 6px 46px;margin:0;line-height:1.6}
 .gb-toc li::before{content:counter(gb-t,decimal-leading-zero);position:absolute;left:0;top:5px;box-sizing:border-box;width:28px;height:28px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:#fff;border:2px solid #14161a;font:900 12px/1 var(--gb-disp);transition:background .25s,color .25s,border-color .25s}
 .gb-toc a{color:#14161a;font-weight:700;text-decoration:none}
 .gb-toc li:hover::before{background:#D91433;border-color:#D91433;color:#fff}
 .gb-toc li:hover a{color:#AE1029}

 /* 記事末の CTA: 旅の終点 */
 .gb-cta{position:relative;margin:72px 0 24px;padding:64px 44px 36px;border-radius:28px;background:#14161a;color:#fff;overflow:hidden}
 .gb-cta::before{content:"";position:absolute;left:44px;top:0;width:4px;height:30px;background:linear-gradient(#ff6b83 55%,transparent 0) 0 0/4px 10px}
 .gb-cta::after{content:"";position:absolute;left:35px;top:28px;width:22px;height:22px;border-radius:50%;background:#D91433;box-shadow:0 0 0 6px rgba(217,20,51,.3);animation:gb-pinp 1.8s ease-out infinite}
 .gb-cta p{margin:0}
 .gb-cta .gb-cta-k{margin:0 0 6px;font-size:14px;font-weight:700;letter-spacing:.14em;color:#ff6b83}
 .gb-cta .gb-cta-h{margin:0 0 14px;font:900 26px/1.45 var(--gb-disp);text-wrap:balance}
 .gb-cta .nbk{display:inline-block}
 .gb-cta .gb-cta-t{margin:0 0 24px;font-size:15px;line-height:1.9;color:#d6d8dc}
 .gb-cta-a{display:flex;align-items:center;gap:24px;flex-wrap:wrap}
 .gb-cta-btn{display:inline-flex;align-items:center;gap:10px;min-height:58px;box-sizing:border-box;padding:10px 30px;border-radius:999px;background:#D91433;color:#fff;font:700 17px/1.4 "BIZ UDPGothic","Hiragino Sans",sans-serif;text-decoration:none;box-shadow:0 10px 26px -10px rgba(217,20,51,.6);transition:background .25s}
 .gb-cta-btn:hover{background:#AE1029;color:#fff}
 .gb-cta-btn::before{content:"";flex:none;width:20px;height:18px;background:#fff;-webkit-mask:var(--gb-line-ic) center/contain no-repeat;mask:var(--gb-line-ic) center/contain no-repeat}
 img.gb-cta-qr{box-sizing:border-box;width:120px;height:120px;margin:0;padding:6px;border:0;border-radius:14px;background:#fff}
 .gb-cta .gb-cta-n{margin:16px 0 0;font-size:13px;color:#9aa0a8}

 /* 区切り線・画像・表 */
 hr{border:0;height:4px;margin:56px 0;background:linear-gradient(90deg,#c9ccd2 55%,transparent 0) 0 0/14px 4px repeat-x}
 hr:has(+ h2),hr:has(+ .gb-toc){display:none}
 img{display:block;box-sizing:border-box;max-width:100%;height:auto;margin:0;border:2px solid #14161a;border-radius:18px}
 p:has(>img:only-child),p.gb-fig{margin:32px 0}
 figcaption{margin-top:10px;font-size:13px;color:#5E6066;text-align:center}
 iframe{max-width:100%;border-radius:18px}
 .s_table{margin:40px 0;overflow-x:auto;border:2px solid #14161a;border-radius:16px;-webkit-overflow-scrolling:touch}
 .s_table table{width:100%;min-width:520px;margin:0 !important;border-collapse:collapse;border:0;font-size:15px;line-height:1.7}
 .s_table th,.s_table td{padding:14px 18px !important;border:0;border-top:1px solid #D5D8DD;text-align:left;vertical-align:top;line-height:1.7 !important}
 .s_table th{background:#EFF1F4;font-weight:700}
 .s_table tr:first-child>*{border-top:0}
}
/* h2 が無く h3 から始まる過去記事: h3 を大見出し、h4 を小見出しの見た目に */
.archive-body .bd .post-body.gb.gb-flat{
 h3{min-height:46px;margin:80px 0 28px;padding:0 0 16px 62px;border-bottom:2px solid #14161a;font:900 27px/1.5 var(--gb-disp);letter-spacing:-.01em}
 h3:not([id]){padding-left:0}
 h3[id]{counter-increment:gb-h}
 h3::before{content:none}
 h3[id]::before{content:counter(gb-h,decimal-leading-zero);position:absolute;left:0;top:-3px;bottom:auto;display:flex;align-items:center;justify-content:center;width:46px;height:46px;border-radius:50%;background:#D91433;color:#fff;font:900 18px/1 var(--gb-disp);letter-spacing:0;box-shadow:0 0 0 6px rgba(217,20,51,.16)}
 h4{position:relative;margin:56px 0 18px;padding:2px 0 2px 20px;font:900 21px/1.55 var(--gb-disp)}
 h4::before{content:"";position:absolute;left:0;top:.2em;bottom:.2em;display:block;width:4px;height:auto;margin:0;border-radius:2px;background:linear-gradient(#D91433 60%,transparent 0) 0 0/4px 10px repeat-y}
 hr:has(+ h3){display:none}
}
.archive-body .bd .post-body.gb>:first-child,.archive-body .bd .post-body.gb .gmj-trusted-html:first-child>:first-child{margin-top:0}
@keyframes gb-pinp{0%{box-shadow:0 0 0 0 rgba(217,20,51,.5)}100%{box-shadow:0 0 0 16px rgba(217,20,51,0)}}
@media(prefers-reduced-motion:reduce){.archive-body .bd .post-body.gb .gb-cta::after{animation:none}}
@media(hover:hover) and (min-width:821px){
 .archive-body .bd .post-body.gb .gb-card:hover{transform:translate(-3px,-3px);box-shadow:6px 6px 0 #14161a;background:#fff7f8}
}
@media(max-width:1199px){
 .archive-body .bd .post-body.gb{font-size:16px;line-height:1.95;
  h2{font-size:24px}
 }
 .archive-body .bd .post-body.gb.gb-flat h3{font-size:24px}
}
@media(max-width:820px){
 .archive-body .bd .post-body.gb{
  h2{font-size:22px;margin:56px 0 22px;padding-left:50px;min-height:38px}
  h2:not([id]){padding-left:0}
  h2[id]::before{width:38px;height:38px;top:-2px;font-size:15px;box-shadow:0 0 0 5px rgba(217,20,51,.16)}
  h3{font-size:18px;margin:44px 0 14px;padding-left:16px}
  h4,h5{font-size:17px;margin-top:28px}
  ol>li{padding-left:34px}
  .gb-box{padding:20px 18px;border-radius:16px;margin:32px 0}
  .gb-matome{margin-top:48px;padding-top:28px;margin-right:5px;box-shadow:5px 5px 0 #14161a}
  .gb-ketsuron{padding:30px 18px 20px;border-radius:18px;box-shadow:5px 5px 0 #D91433;margin-right:5px}
  .gb-ketsuron p:not(.gb-ketsuron-k){font-size:16px}
  .gb-voice{max-width:calc(100% - 52px);margin-left:52px;font-size:15px}
  .gb-voice::before{left:-52px;width:40px;height:40px}
  .gb-voice::after{left:-42px;bottom:10px;width:20px;height:20px}
  .gb-voice-r{margin-left:auto;margin-right:52px}
  .gb-voice-r::before{left:auto;right:-52px}
  .gb-voice-r::after{left:auto;right:-42px}
  blockquote{padding:24px 18px 18px 52px}
  blockquote::before{left:12px;font-size:44px}
  .gb-card{padding:16px 60px 16px 16px}
  .gb-card::after{right:14px;width:32px;height:32px;margin-top:-16px}
  .gb-toc{padding:22px 18px;font-size:15px}
  .gb-cta{padding:56px 20px 28px;border-radius:22px}
  .gb-cta::before{left:20px}
  .gb-cta::after{left:11px}
  .gb-cta .gb-cta-h{font-size:21px}
  .gb-cta-btn{width:100%;justify-content:center}
  img.gb-cta-qr{display:none}
  hr{margin:40px 0}
  img{border-radius:14px}
 }
 .archive-body .bd .post-body.gb.gb-flat{
  h3{font-size:22px;margin:56px 0 22px;padding-left:50px;min-height:38px}
  h3:not([id]){padding-left:0}
  h3[id]::before{width:38px;height:38px;top:-2px;font-size:15px;box-shadow:0 0 0 5px rgba(217,20,51,.16)}
  h4{font-size:18px;margin:44px 0 14px;padding-left:16px}
 }
}

/* 見出しに番号が既にある記事（CTOブログ 脱PHP）: 装飾側の番号は出さない（2026-11-16）。本体と同じ入れ物の中に書く（特異性をそろえる） */
.archive-body .bd .post-body.gb.gb-nonum h2{padding-left:18px;border-left:6px solid #D91433}
.archive-body .bd .post-body.gb.gb-nonum h2[id]::before{display:none}
.archive-body .bd .post-body.gb.gb-nonum .gb-toc li::before{content:"";width:12px;height:12px;left:8px;top:11px;background:#D91433;border-color:#D91433;box-shadow:0 0 0 4px rgba(217,20,51,.16)}
