/* 暑中見舞いドットコム 共通CSS（2027 リデザイン）。設計書 4.1
   色は藍1色。日本語Webフォントは読み込まない（LCP・CLS 対策） */
:root {
  --ai: #1f3a5f;          /* 藍：見出し・ボタン・リンク */
  --ai-soft: #e8eef5;
  --ink: #222;
  --muted: #666;
  --line: #dde3ea;
  --bg: #fff;
  --radius: 4px;
  --mincho: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Hiragino Mincho Pro", serif;
  --gothic: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  --wrap: 1160px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }   /* ヘッダーがついてくるので、ページ内リンクの飛び先が隠れないようにする */
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.9 var(--gothic); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ai); }
a:hover { text-decoration: none; }
h1, h2, h3 { font-family: var(--mincho); font-weight: 600; line-height: 1.5; color: var(--ink); }
h1 { font-size: 1.75rem; margin: .8em 0 .3em; }
h2 { font-size: 1.4rem; margin: 2em 0 .6em; padding-bottom: .3em; border-bottom: 2px solid var(--ai); }
h3 { font-size: 1.15rem; margin: 1.6em 0 .5em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); font-size: .9rem; }

/* ヘッダー・フッター */
/* 2026-12-05 ヘッダーを夏空の写真に合わせた（トップのヒーローと同じ写真 img/hero/sky.webp）。白い文字・スマホはハンバーガー */
.site-header { background: #3d8bd6 url(/img/hero/sky.webp) center 18% / cover no-repeat; color: #fff; position: sticky; top: 0; z-index: 100; transition: box-shadow .2s; }
.site-header.is-scrolled { box-shadow: 0 2px 12px rgba(20,60,110,.3); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.site-logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mincho); font-weight: 700; font-size: 1.25rem; color: #fff; text-decoration: none; letter-spacing: .04em; text-shadow: 0 1px 6px rgba(20,60,110,.45); }
.site-logo img { width: 40px; height: 40px; border-radius: 9px; box-shadow: 0 1px 6px rgba(20,60,110,.35); }   /* ロゴマーク（Codex で作成。藍の角丸に白い筆文字の「暑」と太陽。2026-12-05 ユーザー選定） */
.site-nav { display: flex; gap: 4px 6px; flex-wrap: wrap; font-size: .95rem; }
.site-nav a { text-decoration: none; color: #fff; padding: 4px 10px; border-radius: 999px; text-shadow: 0 1px 4px rgba(20,60,110,.5); }
.site-nav a:hover { background: rgba(255,255,255,.18); }
.site-nav a[aria-current="page"] { background: rgba(255,255,255,.92); color: var(--ai); text-shadow: none; font-weight: 700; }
.nav-toggle { display: none; }
@media (max-width: 800px) {
  .site-header .wrap { min-height: 56px; flex-wrap: nowrap; }
  .site-logo { font-size: 1.05rem; gap: 8px; }
  .site-logo img { width: 34px; height: 34px; }
  .js-nav .nav-toggle { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 8px 10px; border: 1px solid rgba(255,255,255,.7); border-radius: 6px; background: rgba(255,255,255,.12); color: #fff; font: inherit; font-size: .8rem; cursor: pointer; }
  .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after { display: block; width: 18px; height: 2px; background: #fff; border-radius: 1px; position: relative; transition: transform .2s, background .2s; }
  .nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bar::before { top: -6px; }
  .nav-toggle-bar::after { top: 6px; }
  .nav-open .nav-toggle-bar { background: transparent; }
  .nav-open .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
  .nav-open .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }
  .js-nav .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 50; flex-direction: column; gap: 0; padding: 8px 16px 14px; background: rgba(255,255,255,.98); box-shadow: 0 8px 20px rgba(20,60,110,.2); }
  .js-nav.nav-open .site-nav { display: flex; }
  .js-nav .site-nav a { color: var(--ink); text-shadow: none; padding: 12px 4px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .js-nav .site-nav a[aria-current="page"] { background: none; color: var(--ai); }
}

/* トップのヒーロー（2026-12-05 ユーザー指定：写真1＝左右に入道雲の夏空）。ヘッダーから一覧の1段目まで写真を敷き、下は白に溶かす
   CSS の背景だけ（画像の読み込みで場所がずれない）。高さは固定の px なので、見出しの長さに左右されない */
.sky { background: linear-gradient(180deg, rgba(255,255,255,0) 0, rgba(255,255,255,0) 480px, rgba(255,255,255,.8) 640px, #fff 760px) no-repeat, #fff url(/img/hero/sky.webp) center top / max(100%, 1780px) auto no-repeat; }
.sky .site-header { background: transparent; }
.sky .site-header.is-scrolled, .sky .site-header.nav-open { background: #3d8bd6 url(/img/hero/sky.webp) center 18% / cover no-repeat; }   /* トップは写真の上では透明、スクロールしたら写真の帯にする */
.sky main h1, .sky main .lead, .sky main .lead strong { color: #fff; text-shadow: 0 1px 6px rgba(20,60,110,.45); }
/* 並び順は写真の上・白に溶けた所のどちらに来ても読めるよう、白い枠に濃い文字（2026-12-05 実機のスマホで白地に白文字になった） */
.sky .sort-links { display: inline-block; padding: 4px 14px; border-radius: 999px; background: rgba(255,255,255,.94); box-shadow: 0 1px 4px rgba(31,58,95,.12); }
.sky .chips .chip { background: rgba(255,255,255,.94); }
.sky #gallery .card { background: #fff; border-radius: 6px; padding: 8px 8px 6px; box-shadow: 0 2px 10px rgba(31,58,95,.12); }
.sky #gallery .ad-slot { background: rgba(255,255,255,.85); border-radius: 6px; }
@media (max-width: 800px) {
  .sky { background: linear-gradient(180deg, rgba(255,255,255,0) 0, rgba(255,255,255,0) 700px, rgba(255,255,255,.8) 860px, #fff 980px) no-repeat, #fff url(/img/hero/sky.webp) 46% top / auto 1000px no-repeat; }   /* スマホは写真の真ん中（雲の無い空）を使い、文字を読みやすくする */
}

.site-footer { margin-top: 64px; padding: 32px 0; background: var(--ai-soft); font-size: .9rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 6px 20px; }

/* パンくず */
.breadcrumb { font-size: .85rem; color: var(--muted); margin: 12px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; }
.breadcrumb li + li::before { content: "＞"; margin: 0 .5em; }
.breadcrumb a { color: var(--muted); }

/* 絞り込みチップ */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; padding: 0; list-style: none; }
.chip { display: inline-block; padding: 3px 12px; border: 1px solid var(--ai); border-radius: var(--radius); color: var(--ai); text-decoration: none; font-size: .9rem; line-height: 1.7; background: #fff; }
.chip[aria-current="true"] { background: var(--ai); color: #fff; }

/* ギャラリー：PC 6列・タブレット 3列・スマホ 2列（設計書 4.2） */
.gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px 12px; margin: 16px 0; padding: 0; list-style: none; }
@media (max-width: 1000px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { .gallery { grid-template-columns: repeat(2, 1fr); gap: 12px 8px; } }
.card a { display: block; text-decoration: none; color: var(--ink); }
.card img { width: 100%; aspect-ratio: 100 / 148; object-fit: contain; background: #fafafa; border: 1px solid var(--line); }
.card .card-title { display: block; font-size: .85rem; line-height: 1.5; margin-top: 6px; }
.card .card-meta { display: block; font-size: .75rem; color: var(--muted); }
.gallery .ad-slot { grid-column: span 2; }
@media (max-width: 600px) { .gallery .ad-slot { grid-column: 1 / -1; } .gallery { grid-auto-flow: row dense; } }   /* 広告の前で1枚だけ余った段の穴を次の1枚で埋める（トップの7枚目の後） */

/* ボタン */
.btn { display: block; width: 100%; padding: 12px 16px; margin: 0 0 8px; border: 1px solid var(--ai); border-radius: var(--radius); background: var(--ai); color: #fff; text-align: left; text-decoration: none; font-size: 1rem; line-height: 1.5; }
.btn small { display: block; font-size: .8rem; opacity: .85; }
.btn-outline { background: #fff; color: var(--ai); }
.btn:hover { opacity: .9; }

/* もっと見る・ページ送り */
.more { text-align: center; margin: 16px 0 32px; }
.more .btn { display: inline-block; width: auto; text-align: center; }
.pager { display: flex; justify-content: center; gap: 6px; list-style: none; padding: 0; margin: 24px 0; }
.pager a, .pager span { display: inline-block; min-width: 2.4em; padding: 4px 8px; text-align: center; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.pager [aria-current="page"] { background: var(--ai); color: #fff; border-color: var(--ai); }

/* 広告枠：高さを先に確保して CLS を防ぐ（設計書 4.1）。ボタンのすぐ近くには置かない */
.ad-slot { min-height: 280px; margin: 32px 0; text-align: center; }
.ad-slot .ad-label { display: block; font-size: .7rem; color: #999; margin-bottom: 4px; }
.gallery .ad-slot { margin: 0; min-height: 250px; }

/* FAQ（既存ページと同じ HTML 構造） */
.faq-list { margin: 16px 0; }
.faq-item { border-bottom: 1px solid var(--line); padding: 8px 0; }
.faq-q { cursor: pointer; font-weight: 600; }
.faq-a { padding: 8px 0 4px; }

/* ===== 計画2：ページ ===== */
[hidden] { display: none !important; }
.lead { margin: 0 0 8px; }
.sort-links { font-size: .9rem; margin: 0 0 8px; color: var(--muted); }
.sort-links a[aria-current="true"] { color: var(--ink); font-weight: 700; text-decoration: none; }
.btn-inline { display: inline-block; width: auto; }
.section { margin: 40px 0; }
.link-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; margin: 12px 0; padding: 0; list-style: none; }
.link-list a { display: block; height: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.link-list small { display: block; color: var(--muted); font-size: .8rem; }
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 600px) { .steps { grid-template-columns: 1fr; } }
.steps li { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.steps li::before { counter-increment: step; content: counter(step); display: inline-block; width: 1.8em; height: 1.8em; line-height: 1.8em; margin-right: 8px; text-align: center; border-radius: 50%; background: var(--ai); color: #fff; }
table.simple { border-collapse: collapse; width: 100%; margin: 12px 0; }
table.simple th, table.simple td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
table.simple th { width: 32%; background: var(--ai-soft); font-weight: 600; }

/* 詳細：左に大きなプレビュー、右にタイトル・ボタン（設計書 4.4） */
.detail { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); gap: 32px; margin: 16px 0; }
@media (max-width: 800px) { .detail { grid-template-columns: 1fr; gap: 16px; } }
.detail-preview img { width: 100%; max-width: 480px; height: auto; aspect-ratio: 760 / 1125; margin: 0 auto; object-fit: contain; border: 1px solid var(--line); background: #fafafa; }
.detail-preview .muted { text-align: center; margin: 4px 0 0; }
.detail-info h1 { margin-top: 0; font-size: 1.5rem; }
.dl-buttons { margin: 16px 0; }
.dl-help { font-size: .9rem; background: var(--ai-soft); padding: 12px 16px; border-radius: var(--radius); }
.dl-help p { margin: 4px 0 0; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: .9rem; margin: 16px 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

/* 文例 */
.bunrei summary { cursor: pointer; font-weight: 600; color: var(--ai); }
.bunrei-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 12px 0; }
@media (max-width: 800px) { .bunrei-list { grid-template-columns: 1fr; } }
.bunrei-item { margin: 0; padding: 12px 16px; border: 1px solid var(--line); font-family: var(--mincho); }
.bunrei-item figcaption { font-family: var(--gothic); font-size: .8rem; color: var(--muted); }

/* 完了ページ（設計書 4.5） */
.dl-status { background: var(--ai-soft); border-radius: var(--radius); padding: 16px 20px; margin: 16px 0; }
.dl-status p { margin: 0 0 4px; }
.next-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 800px) { .next-steps { grid-template-columns: 1fr; } }
.next-steps section { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.next-steps h3 { margin-top: 0; }
.next-img { display: block; width: 100%; max-width: 240px; height: auto; margin: 0 auto 6px; }   /* 次にすることの挿絵（Codex で作った水彩。2026-12-05） */

/* ===== 計画4：記事・ツール・目的別入口 =====
   旧ページの本文の HTML（Bootstrap の class と旧CSSの class）を書き換えずに受けるための最小限の定義。.article の中だけで効く
   Bootstrap は読み込まない。新しいページでは使わないこと */

/* フッターの段組（全ページ） */
.footer-cols { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px 24px; margin-bottom: 16px; }
@media (max-width: 800px) { .footer-cols { grid-template-columns: repeat(2, 1fr); } }
.footer-cols ul { display: block; margin: 0; }
.footer-cols li { margin: 0 0 4px; }
.footer-title { font-weight: 700; margin: 0 0 6px; color: var(--ai); }

/* 枠 */
.article-wide { max-width: none; padding: 0; }
.article .container, .article .container-fluid, .article .MainContainer { max-width: none; padding-left: 0; padding-right: 0; margin-left: auto; margin-right: auto; }
.article .entry, .article .article-body { margin: 0; }
.article h4, .article h5, .article h6, .article .h4, .article .h5, .article .h6 { font-family: var(--mincho); font-weight: 600; line-height: 1.5; margin: 1.2em 0 .4em; }
.article h4, .article .h4 { font-size: 1.1rem; }
.article h5, .article .h5, .article h6, .article .h6 { font-size: 1rem; }
.article h2.h4, .article h2.h5 { border-bottom: 0; padding-bottom: 0; }
.article .policy-h2 { font-size: 1.2rem; }

/* 段組（Bootstrap の row・col の代わり） */
.article .row { display: flex; flex-wrap: wrap; margin: 0 -8px; }
.article .row > * { width: 100%; padding: 0 8px; }
.article .row.g-0 { margin: 0; }
.article .row.g-0 > * { padding: 0; }
.article .row.g-1 { row-gap: 4px; }
.article .row.g-2 { row-gap: 8px; }
.article .row.g-3 { row-gap: 16px; }
.article .col-6 { width: 50%; }
.article .col-12 { width: 100%; }
@media (min-width: 576px) {
  .article .col-sm-4 { width: 33.333%; }
  .article .col-sm-6 { width: 50%; }
  .article .col-sm-8 { width: 66.667%; }
  .article .d-sm-none { display: none; }
  .article .d-sm-block { display: block; }
}
@media (min-width: 768px) {
  .article .col-md-3 { width: 25%; }
  .article .col-md-4 { width: 33.333%; }
  .article .col-md-6 { width: 50%; }
  .article .col-md-9 { width: 75%; }
  .article .col-md-12 { width: 100%; }
  .article .d-md-inline { display: inline; }
}
@media (min-width: 992px) { .article .col-lg-12 { width: 100%; } }

/* 配置・余白・文字 */
.article .d-flex { display: flex; }
.article .d-none { display: none; }
.article .flex-wrap { flex-wrap: wrap; }
.article .gap-2 { gap: 8px; }
.article .gap-3 { gap: 16px; }
.article .align-items-start { align-items: flex-start; }
.article .align-items-center { align-items: center; }
.article .align-items-end { align-items: flex-end; }
.article .justify-content-center { justify-content: center; }
.article .text-center, .article .center { text-align: center; }
.article .text-start { text-align: left; }
.article .mb-0 { margin-bottom: 0; }
.article .mb-1 { margin-bottom: 4px; }
.article .mb-2 { margin-bottom: 8px; }
.article .mb-3 { margin-bottom: 16px; }
.article .mb-4 { margin-bottom: 24px; }
.article .mb-5 { margin-bottom: 48px; }
.article .mt-1 { margin-top: 4px; }
.article .mt-2 { margin-top: 8px; }
.article .mt-3 { margin-top: 16px; }
.article .mt-4 { margin-top: 24px; }
.article .mt-5 { margin-top: 48px; }
.article .my-3 { margin-top: 16px; margin-bottom: 16px; }
.article .p-2 { padding: 8px; }
.article .p-3 { padding: 16px; }
.article .p-4 { padding: 24px; }
.article .px-3 { padding-left: 16px; padding-right: 16px; }
.article .px-4 { padding-left: 24px; padding-right: 24px; }
.article .py-2 { padding-top: 8px; padding-bottom: 8px; }
.article .small, .article small { font-size: .875em; }
.article .fw-bold, .article .textboldl, .article .kigo { font-weight: 700; }
.article .fw-normal { font-weight: 400; }
.article .fs-5 { font-size: 1.15rem; }
.article .fs-6 { font-size: 1rem; }
.article .lead { font-size: 1.05rem; }
.article .text-muted { color: var(--muted); }
.article .text-danger { color: #b02a37; }
.article .text-accent { color: var(--ai); }
.article .text-decoration-none { text-decoration: none; }
.article .w-100 { width: 100%; }
.article .h-100 { height: 100%; }
.article .img-fluid, .article .imgdl { max-width: 100%; height: auto; }

/* 背景・線 */
.article .bg-light, .article .bg-cream { background: #f6f8fb; }
.article .bg-white { background: #fff; }
.article .bg-warning.bg-opacity-25, .article .bg-warning { background: var(--ai-soft); }
.article .bg-success, .article .bg-primary, .article .bg-secondary { background: var(--ai); color: #fff; }
.article .border { border: 1px solid var(--line); }
.article .border-0 { border: 0; }
.article .border-start.border-4 { border-left: 4px solid var(--ai); }
.article .rounded { border-radius: var(--radius); }
.article .rounded-end { border-radius: 0 var(--radius) var(--radius) 0; }
.article .rounded-pill { border-radius: 999px; }

/* 表・お知らせ・札・カード・一覧 */
.article .table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.article .table th, .article .table td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.article .table-bordered th, .article .table-bordered td { border: 1px solid var(--line); }
.article .table-sm th, .article .table-sm td { padding: 4px 8px; }
.article .table-light, .article .table-warning, .article .info-th { background: var(--ai-soft); }
.article .table-responsive { overflow-x: auto; }
.article .align-middle, .article .align-middle th, .article .align-middle td { vertical-align: middle; }
.article .alert { padding: 12px 16px; margin: 0 0 16px; border: 1px solid #c9d6e6; border-radius: var(--radius); background: var(--ai-soft); }
.article .alert-secondary, .article .alert-light { background: #f6f8fb; border-color: var(--line); }
.article .alert-danger { background: #fbeaea; border-color: #f1c0c0; color: #842029; }
.article .alert-link { font-weight: 700; }
.article .badge { display: inline-block; padding: 2px 8px; font-size: .75em; line-height: 1.5; border-radius: var(--radius); background: var(--ai); color: #fff; }
.article div.card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.article div.card img { aspect-ratio: auto; object-fit: initial; border: 0; background: none; }
.article .card-body { padding: 16px; }
.article .card-header { padding: 8px 16px; background: var(--ai-soft); border-bottom: 1px solid var(--line); }
.article .card-title { font-weight: 700; margin-top: 0; }
.article .card-text { margin: 0 0 8px; }
.article .list-group { padding-left: 0; margin: 12px 0; border: 1px solid var(--line); border-radius: var(--radius); }
.article .list-group-item { padding: 8px 16px; border-bottom: 1px solid var(--line); }
.article .list-group-item:last-child { border-bottom: 0; }
.article .list-group-numbered { list-style: decimal inside; }
.article .ratio { position: relative; }
.article .ratio-4x3 { aspect-ratio: 4 / 3; }
.article .ratio > * { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ボタン・入力（site.css の .btn は全幅・左寄せなので、本文の中では行の中に並べる） */
.article .btn { display: inline-block; width: auto; margin: 0; padding: 8px 16px; text-align: center; }
.article .btn.w-100 { width: 100%; }
.article .btn-sm { padding: 4px 10px; font-size: .875rem; }
.article .btn-lg { padding: 12px 24px; font-size: 1.1rem; }
.article .btn-outline-secondary, .article .btn-outline-primary, .article .btn-outline-success, .article .btn-outline-warning, .article .btn-outline-danger { background: #fff; color: var(--ai); }
.article .btn-primary, .article .btn-success, .article .btn-warning { background: var(--ai); color: #fff; }
.article .btn-secondary { background: #6b7785; border-color: #6b7785; color: #fff; }
.article .form-label { display: block; margin-bottom: 4px; font-weight: 600; }
.article .form-control, .article .form-select { display: block; width: 100%; padding: 6px 10px; font: inherit; border: 1px solid #c8d0da; border-radius: var(--radius); background: #fff; color: var(--ink); }
.article .form-control-sm, .article .form-select-sm { padding: 3px 8px; font-size: .875rem; }
.article .form-control-color { width: 48px; height: 32px; padding: 2px; }
.article .form-text { font-size: .875em; color: var(--muted); }

/* 旧CSS（style2.css・layout.css）の本文の部品 */
.article .h2-accent { border-bottom-color: var(--ai); }
.article .guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 16px 0; }
.article .guide-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; background: #fff; }
.article .guide-card-title { margin-top: 0; font-size: 1.05rem; }
.article .guide-card-icon { margin-right: 6px; }
.article .guide-steps, .article .guide-list, .article .tukaikata { padding-left: 1.4em; margin: 0 0 8px; }
.article .pr-block { margin: 24px 0; }
.article .pr-block .ad-slot { margin: 8px 0; }
.article .pr-link { font-size: .85rem; margin: 4px 0; text-align: center; }
.article .pr-label { display: inline-block; padding: 0 6px; margin-right: 4px; font-size: .7rem; line-height: 1.6; border: 1px solid var(--muted); border-radius: 2px; color: var(--muted); }
.article .GopageBox { margin: 32px 0; text-align: center; }
.article .GopageButton .button { display: inline-block; padding: 12px 32px; background: var(--ai); color: #fff; border-radius: var(--radius); text-decoration: none; line-height: 1.6; }
.article .GopageButton .button:hover { opacity: .9; }
.article .share-buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 12px 0; }
.article .share-buttons img { display: inline; height: 30px; width: auto; }
.article .step-badge { display: inline-block; margin-right: 8px; padding: 0 8px; background: var(--ai); color: #fff; font-family: var(--gothic); font-size: .8rem; border-radius: var(--radius); vertical-align: middle; }
.article .step-num { flex: none; display: inline-block; width: 1.8em; height: 1.8em; line-height: 1.8em; margin-right: 8px; text-align: center; border-radius: 50%; background: var(--ai); color: #fff; }
.article .top-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0; }
.article .top-chips a { display: inline-block; padding: 3px 12px; border: 1px solid var(--ai); border-radius: var(--radius); text-decoration: none; font-size: .9rem; }
.article .top-chips-label { font-size: .85rem; color: var(--muted); margin-right: 4px; }

/* Bootstrap の JS 部品の置き換え（<details>・<dialog>） */
.article details.accordion-item { border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 8px; }
.article details.accordion-item > summary { cursor: pointer; padding: 10px 16px; list-style-position: inside; }
.article details.accordion-item > summary h3 { display: inline; margin: 0; font-size: 1.05rem; }
.article details.accordion-item .accordion-body { padding: 0 16px 12px; }
.article details.os-tab-content { border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 8px; padding: 0 16px; }
.article details.os-tab-content > summary { cursor: pointer; padding: 10px 0; font-weight: 700; color: var(--ai); }
.article dialog.vt-dialog { width: min(360px, 92vw); padding: 0; border: 1px solid var(--line); border-radius: var(--radius); }
.article dialog.vt-dialog::backdrop { background: rgba(0, 0, 0, .4); }
.article .vt-dialog-head, .article .vt-dialog-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 16px; background: var(--ai-soft); }
.article .vt-dialog-head h5 { margin: 0; font-size: 1rem; }
.article .vt-dialog-foot { justify-content: flex-end; }
.article .vt-dialog-body { padding: 12px 16px; }
.article .vt-close { border: 0; background: none; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.article .border-warning { border-color: var(--ai) !important; }
.article .alert-info, .article .alert-warning { background: var(--ai-soft); border-color: #c9d6e6; }

/* 文例ページ（bunrei/lineage.html・henji.html・zansho/bunrei.html）：各文例の下に JS が付ける行動ボタン2つ
   旧 layout.css は橙（#E56200・白文字）。新デザインは藍1色（設計書 4.1）で、橙は白文字とのコントラストも 3.6:1 しか無いので、
   本文のリンク・見出しと同じ藍の塗り（主ボタン）＋藍の枠（副ボタン）にした。丸みのあるボタンで並べるので、文例の本文とは見分けがつく */
.bunrei-cta { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 22px; }
.bunrei-cta a { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 16px; border: 1.5px solid var(--ai); border-radius: 999px; font-size: .9rem; font-weight: 700; line-height: 1.4; text-decoration: none; }
.bunrei-cta-edit { background: var(--ai); color: #fff; }
.bunrei-cta-edit::before { content: "✏ "; white-space: pre; }
.bunrei-cta-tmpl { background: #fff; color: var(--ai); }
.bunrei-cta a:hover { opacity: .85; }

/* ===== 絵の見える入口カード・画像の列（2026-12-05 UI見直し。parts/showcase.php・parts/strip.php） ===== */
.scards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 16px 0; padding: 0; list-style: none; }
.scards-3 { grid-template-columns: repeat(3, 1fr); }
.scards-4 { grid-template-columns: repeat(4, 1fr); }
.scards-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1000px) { .scards-4, .scards-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { .scards, .scards-4, .scards-5 { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.scard a { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; transition: box-shadow .15s, transform .15s; }
.scard a:hover { box-shadow: 0 6px 18px rgba(31, 58, 95, .16); transform: translateY(-2px); }
.scard-pic { position: relative; display: block; aspect-ratio: 3 / 2; background: var(--ai-soft); overflow: hidden; }
.scard-pic .fan { position: absolute; bottom: 7%; height: 80%; width: auto; object-fit: contain; background: #fff; border: 1px solid var(--line); box-shadow: 0 3px 10px rgba(31, 58, 95, .18); transition: transform .2s; }
.scard-pic .fan-0 { left: 50%; height: 88%; transform: translateX(-50%); z-index: 3; }
.scard-pic .fan-1 { left: 9%; transform: rotate(-7deg); z-index: 2; }
.scard-pic .fan-2 { right: 9%; transform: rotate(7deg); z-index: 1; }
.scard a:hover .fan-1 { transform: rotate(-10deg) translateX(-4px); }
.scard a:hover .fan-2 { transform: rotate(10deg) translateX(4px); }
.scard-pic-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.scard-name { display: block; padding: 10px 12px 0; font-family: var(--mincho); font-weight: 700; color: var(--ai); line-height: 1.5; }
.scard-count { font-family: var(--gothic); font-weight: 400; font-size: .78rem; color: var(--muted); white-space: nowrap; }
.scard-desc { display: block; padding: 2px 12px 12px; font-size: .8rem; line-height: 1.6; color: var(--muted); }
@media (max-width: 600px) { .scard-name { font-size: .95rem; padding: 8px 10px 0; } .scard-desc { padding: 2px 10px 10px; font-size: .75rem; } }

/* 記事の末尾の「人気のテンプレート」「テンプレート・ツールを探す」 */
.article-showcase { margin-top: 2.5em; }

/* 文章の節に添える画像の列。PC・タブレットは6列／3列、スマホは横にスクロール */
@media (max-width: 600px) {
  .gallery-strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
  .gallery-strip .card { flex: 0 0 38%; scroll-snap-align: start; }
}
@media (min-width: 601px) and (max-width: 1000px) { .gallery-strip { grid-template-columns: repeat(6, 1fr); } }
.strip-more { margin: 4px 0 0; text-align: right; font-size: .9rem; }

/* 絞り込みチップ（画像つきのタイル）。PC は1〜2段、スマホは横にスクロールする1列 */
.chips-tiles { gap: 8px; align-items: stretch; }
.chips-tiles li { display: flex; }
.chips-tiles .chip-pic { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; width: 88px; height: 100%; box-sizing: border-box; padding: 6px 4px 4px; border-color: var(--line); font-size: .8rem; line-height: 1.4; text-align: center; }
.chips-tiles .chip-pic img { width: 52px; height: 77px; object-fit: contain; background: #fff; border: 1px solid var(--line); box-shadow: 0 1px 4px rgba(31, 58, 95, .12); }
.chips-tiles .chip-pic:hover { border-color: var(--ai); }
.chips-tiles .chip-pic[aria-current="true"] { background: var(--ai); border-color: var(--ai); color: #fff; font-weight: 700; }
@media (max-width: 600px) {
  .chips-tiles { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 0 16px 6px; scroll-padding-left: 16px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
  .chips-tiles li { flex: 0 0 auto; scroll-snap-align: start; }
  .chips-tiles .chip-pic { width: 76px; }
  .chips-tiles .chip-pic img { width: 46px; height: 68px; }
}

/* ビジネス・和風の14枚ずつの組（parts/gallery_blocks.php）。隠した組・押し切った「もっと見る」を確実に消す */
.gallery-blocks [hidden] { display: none !important; }
.gallery-block { display: block; }
.more-block { width: auto; display: inline-block; text-align: center; cursor: pointer; font: inherit; }

/* 「TOPへ戻る」ボタン（parts/header.php の JS が作る）。右下（2026-12-05 ユーザー指定で左下から変更）・400px スクロールしたら出す。2026-12-05 ユーザー指定 */
.to-top { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 90; display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border: 0; border-radius: 999px; background: var(--ai); color: #fff; font: inherit; font-size: .85rem; font-weight: 700; box-shadow: 0 3px 12px rgba(20,60,110,.35); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s, transform .2s, visibility .2s; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: #2b5283; }
.to-top span { font-size: .7rem; }

/* 詳細ページの画像の拡大表示（pages/detail.php の <dialog>）。2026-12-05 ユーザー指定 */
.lightbox { padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 96vh; overflow: visible; }
.lightbox::backdrop { background: rgba(10,20,35,.82); }
.lightbox img { display: block; width: auto; height: auto; max-width: 92vw; max-height: 90vh; background: #fff; box-shadow: 0 10px 40px rgba(0,0,0,.45); cursor: zoom-out; }
.lightbox-close { position: absolute; top: -14px; right: -14px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #fff; color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.detail-preview a { cursor: zoom-in; }
