/*
Theme Name: AI導入活用おたすけ隊
Theme URI:
Author: 株式会社エボル
Author URI:
Description: AI導入相談サイト「AI導入活用おたすけ隊」用のオリジナルWordPressテーマ。お問い合わせはContact Form 7、実践記事はWordPress標準の投稿機能を前提としています。
Version: 1.0.4
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ai-otasuketai
*/

:root {
  --paper: #FAF6EE;
  --paper-alt: #F1EADC;
  --surface: #FFFFFF;
  --ink: #2C2620;
  --ink-soft: #6B6255;
  --ink-faint: #948A7A;
  --accent: #B5622E;
  --accent-hover: #9C5227;
  --accent-tint: #F2E2D5;
  --forest: #33473B;
  --forest-soft: #4C6354;
  --line: #E4DACB;
  --radius: 10px;
  --container-w: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic Medium", sans-serif;
  font-size: 16px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic Medium", sans-serif;
  margin: 0;
  color: var(--ink);
}

p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ---------- layout ---------- */
.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding-inline: clamp(20px, 5vw, 40px);
}
.section { padding-block: clamp(56px, 8vw, 96px); }
.section-alt { background: var(--paper-alt); }
.section-dark { background: var(--forest); color: var(--paper); }
.section-dark h2 { color: var(--paper); }
.section-dark .body-text { color: #D9D2C2; }
.center { text-align: center; }

/* ---------- type ---------- */
.eyebrow {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--accent);
  letter-spacing: 0.1em; margin-bottom: 16px;
}
.center .eyebrow { justify-content: center; }
.heading-lg { font-size: clamp(30px, 4vw, 44px); font-weight: 900; line-height: 1.5; margin: 0 0 20px 0; }
.heading-md { font-size: clamp(22px, 3vw, 30px); font-weight: 700; line-height: 1.5; margin: 0 0 14px 0; }
.body-text { font-size: 16px; color: var(--ink-soft); line-height: 1.9; }
.lead { font-size: 17px; }

/* ---------- buttons ---------- */
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 16px 36px; border-radius: 6px; font-weight: 700; font-size: 16px;
  min-height: 44px; white-space: nowrap; border: none; cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--paper); }
.btn-primary:hover { background: var(--accent-hover); color: var(--paper); }
.btn-secondary { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-row { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; gap: 12px;
}
a.card { text-decoration: none; color: inherit; }
a.card:hover { color: inherit; }

/* 記事カードのサムネイル: 常に同じ比率でトリミングし、ホバーで少し拡大 */
.card-thumb {
  aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  background: var(--accent-tint); flex-shrink: 0;
}
.card-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .4s ease;
}
a.card:hover .card-thumb img { transform: scale(1.06); }
.card-thumb.placeholder {
  display: flex; align-items: center; justify-content: center; color: var(--ink-faint);
}
.card-thumb.placeholder svg { width: 32px; height: 32px; opacity: .55; }
.icon-circle {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent-tint); color: var(--accent);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.icon-circle svg { width: 26px; height: 26px; }
.num-badge {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--accent); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 18px; flex-shrink: 0; font-family: "Zen Maru Gothic", sans-serif;
}
.note-strip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--ink-soft); border: 1px solid var(--line);
  border-radius: 20px; padding: 8px 18px; background: var(--surface);
}

/* ---------- grids ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- image placeholder ---------- */
.img-placeholder {
  background: var(--accent-tint); border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--ink-faint); font-size: 12px; min-height: 180px; flex-shrink: 0;
}
.img-placeholder svg { width: 32px; height: 32px; opacity: .55; }

/* ---------- header / nav ---------- */
.site-header {
  padding-block: 18px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(250, 246, 238, .92);
  backdrop-filter: saturate(140%) blur(6px); z-index: 40;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.logo-lockup { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.logo-lockup:hover { color: var(--ink); }
.logo-mark { flex-shrink: 0; }
.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-sub { font-size: 11px; color: var(--ink-soft); letter-spacing: .04em; }
.logo-main { font-family: "Zen Maru Gothic", sans-serif; font-weight: 900; font-size: 18px; color: var(--ink); }

@media (min-width: 721px) {
  .site-header .logo-mark { width: 42px; height: 42px; }
  .site-header .logo-lockup { gap: 13px; }
  .site-header .logo-sub { font-size: 13px; }
  .site-header .logo-main { font-size: 23px; }
}
.header-right { display: flex; align-items: center; gap: 32px; }
.main-nav { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.main-nav li { list-style: none; }
.main-nav a { font-size: 14px; font-weight: 500; color: var(--ink); }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--accent); }
.main-nav .current-menu-item > a, .main-nav .current_page_item > a { color: var(--accent); }
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: 6px;
  color: var(--ink);
}
.nav-toggle svg { width: 26px; height: 26px; }

/* ---------- footer ---------- */
.footer-articles { background: var(--paper-alt); border-top: 1px solid var(--line); padding-block: 18px; }
.footer-articles-inner { display: flex; align-items: baseline; gap: 8px 20px; flex-wrap: wrap; }
.footer-articles-label { font-size: 13px; font-weight: 700; color: var(--forest); flex-shrink: 0; }
.footer-articles-list { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; padding: 0; list-style: none; flex: 1 1 auto; min-width: 0; }
.footer-articles-list li { font-size: 13px; }
.footer-articles-list a { color: var(--ink-soft); }
.footer-articles-list a:hover { color: var(--accent); }
.footer-articles-more { font-size: 13px; color: var(--accent); flex-shrink: 0; white-space: nowrap; margin-left: auto; }

.site-footer { padding-block: 56px; border-top: 1px solid var(--line); }
.site-footer .container { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.footer-brand p { font-size: 13px; color: var(--ink-faint); margin: 4px 0 0; }
.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-nav a { color: var(--ink-soft); font-size: 14px; }
.copyright { font-size: 12px; color: var(--ink-faint); margin-top: 32px; }

/* ---------- misc components ---------- */
.tag { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; color: var(--forest-soft); background: #E3E9E2; border-radius: 20px; padding: 5px 14px; }
.tag-row { display: flex; gap: 10px; flex-wrap: wrap; }
.breadcrumb { font-size: 13px; color: var(--ink-faint); margin-bottom: 20px; }
.breadcrumb a { color: var(--ink-faint); }
.breadcrumb a:hover { color: var(--accent); }
.check-item { display: flex; align-items: flex-start; gap: 12px; }
.check-item svg { color: var(--accent); flex-shrink: 0; margin-top: 3px; width: 20px; height: 20px; }
.step-row { display: flex; gap: 20px; align-items: flex-start; padding: 20px 0; border-bottom: 1px solid var(--line); }
.step-row:last-child { border-bottom: none; }
.info-row { display: flex; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.info-row:last-child { border-bottom: none; }
.info-label { width: 140px; flex-shrink: 0; font-weight: 700; font-size: 14px; }
.info-value { font-size: 15px; color: var(--ink-soft); }

.price-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.price-table th, .price-table td { text-align: left; padding: 16px 18px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.price-table thead th { font-size: 12px; font-weight: 700; color: var(--ink-faint); letter-spacing: .06em; background: var(--paper-alt); }
.price-table tbody tr:last-child td { border-bottom: none; }
.price-table td:first-child { font-weight: 700; }
.price-table td:last-child { color: var(--accent); font-weight: 700; }
.table-scroll { overflow-x: auto; }

.flow { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.flow-step { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; flex: 1 1 140px; }
.flow-arrow { display: flex; align-items: center; justify-content: center; color: var(--accent); flex-shrink: 0; margin-top: 12px; }
.flow-arrow svg { width: 22px; height: 22px; }

/* ---------- contact form (Contact Form 7) ---------- */
.form-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.form-field label { font-size: 14px; font-weight: 700; }
.form-field .req { color: var(--accent); font-size: 12px; font-weight: 700; margin-left: 4px; }
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field textarea {
  border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px;
  font-family: inherit; font-size: 15px; background: var(--surface); color: var(--ink);
  width: 100%;
}
.form-field textarea { resize: vertical; min-height: 140px; }
.radio-row, .checkbox-row { display: flex; gap: 20px; flex-wrap: wrap; }
.radio-item, .checkbox-item { display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.form-note { font-size: 13px; color: var(--ink-faint); }

/* 送信ボタン: CF7が自動で付与する .wpcf7-submit / type=submit に直接スタイルを当てる
   (フォーム側のタグに class:btn-primary が付いていなくても確実に反映される) */
.wpcf7-form input[type="submit"],
.wpcf7-form .wpcf7-submit {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px 36px !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  min-height: 44px;
  white-space: nowrap;
  border: none !important;
  cursor: pointer;
  background: var(--accent) !important;
  color: var(--paper) !important;
}
.wpcf7-form input[type="submit"]:hover,
.wpcf7-form .wpcf7-submit:hover {
  background: var(--accent-hover) !important;
  color: var(--paper) !important;
}
.wpcf7-spinner { margin-left: 10px; }
.wpcf7-not-valid-tip { color: #A6324A; font-size: 12.5px; margin-top: 4px; display: block; }
.wpcf7-response-output { border-radius: 8px; padding: 14px 18px; font-size: 14px; margin: 20px 0 0; }
.wpcf7-mail-sent-ok { background: #E5F3E8; color: #1F6B33; border: 1px solid #B9DEC0 !important; }
.wpcf7-validation-errors, .wpcf7-mail-sent-ng, .wpcf7-spam-blocked, .wpcf7-aborted { background: #FBEAEA; color: #A6324A; border: 1px solid #F0C9CE !important; }

/* ---------- article / entry content (blog + サービス詳細ページ共通) ---------- */
.article-head { max-width: 760px; margin: 0 auto; padding-inline: clamp(20px, 5vw, 40px); }
.article-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.article-date { font-size: 13px; color: var(--ink-faint); }
.article-title { font-size: clamp(26px, 4vw, 36px); font-weight: 900; line-height: 1.5; margin: 0 0 20px; }
.article-lead { font-size: 17px; color: var(--ink-soft); line-height: 1.9; }

.article-body { max-width: 760px; margin: 0 auto; padding-inline: clamp(20px, 5vw, 40px); font-size: 16px; line-height: 1.9; color: var(--ink-soft); }
.article-body h2 {
  font-family: "Zen Maru Gothic", sans-serif; font-size: 23px; font-weight: 700; color: var(--ink);
  margin: 56px 0 20px; padding-left: 14px; border-left: 4px solid var(--accent);
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 { font-size: 17.5px; font-weight: 700; color: var(--ink); margin: 32px 0 14px; }
.article-body p { margin: 0 0 20px; }
.article-body figure { margin: 32px 0; }
.article-body figcaption { font-size: 12.5px; color: var(--ink-faint); text-align: center; margin-top: 8px; }
.article-body img { border-radius: var(--radius); }
.article-body a { text-decoration: underline; text-underline-offset: 3px; }

/* WPブロックエディタ標準の見出し/画像/リスト/表 は article-body の中でも同じトーンに揃える */
.article-body ul, .article-body ol { padding-left: 1.2em; margin: 0 0 20px; }
.article-body ul li, .article-body ol li { margin-bottom: 8px; }
.article-body ul li::marker { color: var(--accent); }
.article-body table,
.article-body .wp-block-table table {
  width: 100%; border-collapse: collapse; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 32px 0;
}
.article-body table th, .article-body table td,
.article-body .wp-block-table table th, .article-body .wp-block-table table td {
  text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 14.5px;
}
.article-body table thead th, .article-body .wp-block-table table thead th {
  font-size: 12px; font-weight: 700; color: var(--ink-faint); letter-spacing: .06em; background: var(--paper-alt);
}
.article-body blockquote {
  border-left: 4px solid var(--accent); background: var(--accent-tint);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 20px 24px; margin: 32px 0; font-style: normal;
}
.article-body blockquote p:last-child { margin-bottom: 0; }

/* boxes (投稿本文でカスタムHTMLブロックとして使う想定) */
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; margin: 32px 0; }
.box-title { font-weight: 700; color: var(--ink); margin: 0 0 10px; font-size: 15px; }
.box p:last-child { margin-bottom: 0; }
.box--point { border: none; border-left: 4px solid var(--accent); background: var(--accent-tint); border-radius: 0 var(--radius) var(--radius) 0; }
.box--point .box-title { color: var(--accent); }
.box--summary { background: var(--forest); border: none; color: var(--paper); }
.box--summary .box-title { color: var(--paper); }
.box--summary p { color: #D9D2C2; }

/* before/after compare */
.compare-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 32px 0; }
.compare-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; border-top: 4px solid var(--ink-faint); }
.compare-item.after { border-top-color: var(--accent); }
.compare-item h4 { font-size: 15px; font-weight: 700; color: var(--ink); margin: 0 0 10px; }
.compare-item p { margin: 0; font-size: 14.5px; }

/* check list */
.check-list { list-style: none; padding: 0; margin: 24px 0; display: flex; flex-direction: column; gap: 10px; }
.check-list li { display: flex; align-items: flex-start; gap: 10px; }
.check-list svg { color: var(--accent); flex-shrink: 0; margin-top: 3px; width: 18px; height: 18px; }

/* ranking list (ランキング形式の記事で使う想定。数字が小さいほど強調が強くなる) */
.rank-list { margin: 32px 0; }
.rank-item { display: flex; gap: 18px; align-items: flex-start; padding: 22px 0; border-bottom: 1px solid var(--line); }
.rank-item:first-child { padding-top: 4px; }
.rank-item:last-child { border-bottom: none; }
.rank-num {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: "Zen Maru Gothic", sans-serif; font-weight: 900; font-size: 19px;
  border: 3px solid var(--accent); color: var(--accent); background: var(--surface);
}
.rank-item.rk-6 .rank-num, .rank-item.rk-5 .rank-num { border-color: var(--ink-faint); color: var(--ink-faint); }
.rank-item.rk-4 .rank-num, .rank-item.rk-3 .rank-num { border-color: var(--accent); color: var(--accent); }
.rank-item.rk-2 .rank-num { border-color: var(--accent); background: var(--accent); color: var(--paper); }
.rank-item.rk-1 { padding: 22px 20px; margin: 20px 0 0; background: var(--accent-tint); border-radius: var(--radius); border-bottom: none; }
.rank-item.rk-1 .rank-num { width: 54px; height: 54px; font-size: 22px; border-color: var(--forest); background: var(--forest); color: var(--paper); }
.rank-badge-wrap { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rank-tag { font-size: 10.5px; font-weight: 700; color: var(--forest-soft); background: #E3E9E2; border-radius: 20px; padding: 3px 9px; white-space: nowrap; }
.rank-body h3 { margin: 0 0 10px; font-size: 17.5px; font-weight: 700; color: var(--ink); }
.rank-body p { margin: 0; }
.rank-item.rk-1 .hl { background: var(--surface); }
@media (max-width: 600px) {
  .rank-item { gap: 12px; }
  .rank-item.rk-1 { padding: 18px 14px; }
}

/* text highlight (記事本文で強調したい語句に使う想定) */
.article-body .hl { background: var(--accent-tint); color: var(--accent-hover); font-weight: 700; padding: 0 4px; border-radius: 4px; }

/* moment list (「気づいた瞬間」を並べる記事で使う想定。丸バッジ+カードで見せる) */
.moment-list { display: flex; flex-direction: column; gap: 22px; margin: 32px 0; }
.moment-item {
  display: flex; gap: 20px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 26px;
}
.moment-badge {
  flex-shrink: 0; width: 64px; height: 64px; border-radius: 50%;
  background: var(--accent-tint);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15;
}
.moment-badge-label { font-size: 10px; font-weight: 700; color: var(--accent-hover); letter-spacing: .04em; }
.moment-badge-num { font-family: "Zen Maru Gothic", sans-serif; font-weight: 900; font-size: 22px; color: var(--accent); }
.moment-body { min-width: 0; }
.moment-body h3 { font-size: 17.5px; font-weight: 700; margin: 0 0 10px; color: var(--ink); }
.moment-body p { margin: 0 0 14px; }
.moment-body p:last-child { margin-bottom: 0; }
.moment-note { display: flex; align-items: flex-start; gap: 10px; background: var(--accent-tint); border-radius: 8px; padding: 12px 16px; font-size: 14.5px; font-weight: 700; color: var(--ink); }
.moment-note-tag { flex-shrink: 0; font-size: 11px; font-weight: 700; color: var(--accent-hover); background: var(--surface); border-radius: 20px; padding: 3px 10px; }
@media (max-width: 600px) {
  .moment-item { flex-direction: column; padding: 20px; gap: 12px; }
  .moment-badge { flex-direction: row; width: auto; height: auto; padding: 5px 14px; border-radius: 20px; gap: 8px; }
}

/* step list (手順を番号付きで見せる記事で使う想定) */
.step-list { list-style: none; padding: 0; margin: 32px 0; counter-reset: step; display: flex; flex-direction: column; gap: 14px; }
.step-list > li {
  counter-increment: step; position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px 20px 76px; min-height: 76px;
}
.step-list > li::before {
  content: counter(step); position: absolute; left: 20px; top: 20px;
  width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-family: "Zen Maru Gothic", sans-serif; font-weight: 900; font-size: 18px;
}
.step-list h3 { font-size: 17px; font-weight: 700; margin: 0 0 6px; color: var(--ink); }
.step-list p { margin: 0; }
@media (max-width: 600px) {
  .step-list > li { padding: 18px 16px 18px 64px; }
  .step-list > li::before { left: 14px; top: 18px; width: 36px; height: 36px; font-size: 16px; }
}

/* Q&A sample (記事内で「よくある質問」の見本を見せる) */
.qa-sample { margin: 32px 0; display: flex; flex-direction: column; gap: 12px; }
.qa-sample-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; }
.qa-sample-q, .qa-sample-a { display: flex; gap: 12px; align-items: flex-start; margin: 0; }
.qa-sample-q { font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.qa-sample-a { color: var(--ink-soft); font-size: 15px; }
.qa-sample-mark {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: "Zen Maru Gothic", sans-serif; font-weight: 900; font-size: 13px; color: var(--paper);
}
.qa-sample-q .qa-sample-mark { background: var(--accent); }
.qa-sample-a .qa-sample-mark { background: var(--forest); }

/* Excelの式など、そのまま入力する文字列 */
.article-body .formula {
  font-family: Consolas, "Courier New", monospace; font-size: .92em;
  background: var(--paper-alt); border: 1px solid var(--line); border-radius: 4px;
  padding: 1px 6px; word-break: break-all;
}
.formula-box {
  font-family: Consolas, "Courier New", monospace; font-size: 15px;
  background: var(--forest); color: var(--paper); border-radius: var(--radius);
  padding: 16px 20px; margin: 20px 0; overflow-x: auto; white-space: nowrap;
}

/* 評価マーク(表の中で ◎○△× を見せる) */
.rate { display: inline-block; min-width: 1.6em; text-align: center; font-weight: 700; border-radius: 4px; padding: 0 4px; }
.rate--good { color: var(--forest); background: #E3E9E2; }
.rate--ok { color: var(--accent-hover); background: var(--accent-tint); }
.rate--ng { color: var(--ink-faint); background: var(--paper-alt); }

/* 文章が長い表: スマホでも折り返して読めるようにする(.table-scroll と併用) */
.article-body .table-scroll.table-wrap table { display: table; min-width: 600px; }
.article-body .table-scroll.table-wrap table th,
.article-body .table-scroll.table-wrap table td { white-space: normal; }
.article-body .table-scroll.table-wrap table td:first-child { font-weight: 700; color: var(--ink); }

.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 32px 0; }
.data-table th, .data-table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.data-table thead th { font-size: 12px; font-weight: 700; color: var(--ink-faint); letter-spacing: .06em; background: var(--paper-alt); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* article footer nav (前後の記事) */
.article-nav { display: flex; justify-content: space-between; gap: 20px; margin: 56px auto 0; padding-top: 32px; padding-inline: clamp(20px, 5vw, 40px); border-top: 1px solid var(--line); max-width: 760px; box-sizing: border-box; }
.article-nav-item { flex: 1 1 0; display: flex; flex-direction: column; gap: 6px; }
.article-nav-item.next { text-align: right; align-items: flex-end; }
.article-nav-label { font-size: 12px; color: var(--ink-faint); }

/* 一覧ページの記事送りページネーション */
.pagination, .nav-links { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 48px; font-size: 14px; }
.pagination .page-numbers { color: var(--ink-soft); }
.pagination .current { color: var(--accent); font-weight: 700; }

/* ---------- FAQ ---------- */
.faq-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.faq-nav a { font-size: 14px; font-weight: 700; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 9px 18px; }
.faq-nav a:hover { color: var(--accent); border-color: var(--accent); }
.faq-group { max-width: 820px; margin: 0 auto 56px; scroll-margin-top: 96px; }
.faq-group:last-child { margin-bottom: 0; }
.faq-group-title { display: flex; align-items: center; gap: 14px; font-size: clamp(19px, 2.4vw, 22px); font-weight: 700; margin: 0 0 20px; }
.faq-group-title .icon-circle { width: 44px; height: 44px; flex-shrink: 0; }
.faq-group-title .icon-circle svg { width: 22px; height: 22px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; }
.faq-item summary { display: flex; align-items: flex-start; gap: 14px; padding: 20px 52px 20px 20px; cursor: pointer; list-style: none; position: relative; font-weight: 700; line-height: 1.7; color: var(--ink); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 24px; font-weight: 500; color: var(--accent); line-height: 1; }
.faq-item[open] summary::after { content: "−"; }
.faq-item summary:hover .faq-q { color: var(--accent); }
.faq-mark { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-family: "Zen Maru Gothic", sans-serif; font-weight: 900; font-size: 15px; color: var(--paper); }
.faq-mark--q { background: var(--accent); }
.faq-mark--a { background: var(--forest); }
.faq-q { padding-top: 1px; }
.faq-a { display: flex; align-items: flex-start; gap: 14px; padding: 0 20px 22px; }
.faq-a-body { min-width: 0; padding-top: 2px; font-size: 15.5px; line-height: 1.9; color: var(--ink-soft); }
.faq-a-body p { margin: 0 0 12px; }
.faq-a-body p:last-child { margin-bottom: 0; }
.faq-a-body ul { padding-left: 1.2em; margin: 0 0 12px; }
.faq-a-body ul li::marker { color: var(--accent); }
.faq-a-body a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 600px) {
  .faq-item summary { padding: 16px 44px 16px 14px; gap: 10px; }
  .faq-item summary::after { right: 14px; }
  .faq-a { padding: 0 14px 18px; gap: 10px; }
}

/* ---------- お問い合わせ:連絡方法 ---------- */
.contact-method { position: relative; align-items: center; text-align: center; }
.contact-method--main { border: 2px solid var(--accent); }
.contact-method-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--accent); color: var(--paper); font-size: 12px; font-weight: 700; border-radius: 20px; padding: 4px 14px; white-space: nowrap; }
.contact-method-title { font-size: 20px; font-weight: 700; margin: 0; }
.contact-method-btn { margin-top: auto; }
.contact-method-tel { font-size: 22px; font-weight: 700; }
.contact-method .line-qr { margin-inline: auto; }
img.line-qr { border: 1px solid var(--line); border-radius: 8px; }
.line-add-btn { display: none; margin-top: auto; }
.line-add-btn img { height: 36px; width: auto; }
.footer-line { margin-top: 12px !important; }
.footer-line img { height: 36px; width: auto; }
@media (max-width: 720px) {
  .contact-method .line-qr { display: none; }
  .line-add-btn { display: inline-block; }
  .contact-methods { gap: 32px; }
}

/* ---------- トップのキービジュアル: スマホ幅 ---------- */
/* 見出し → 画像 → 説明文 → ボタン の順に並べ替え、ボタンは中央・全幅にする */
@media (max-width: 720px) {
  .hero-section { padding-top: 20px; }
  .hero-top { align-items: stretch !important; gap: 16px !important; }
  .hero-top .hero-text { display: contents !important; }
  .hero-top .eyebrow { order: 1; margin-bottom: -10px; }
  .hero-top .heading-lg { order: 2; margin-bottom: 0; font-size: 27px; line-height: 1.45; }
  .hero-top .hero-visual { order: 3; flex: none !important; }
  .hero-top .lead { order: 4; }
  .hero-top .note-strip { order: 5; align-self: center; text-align: center; }
  .hero-top .hero-btns { order: 6; flex-direction: column; align-items: center; gap: 12px; margin-top: 4px !important; }
  .hero-top .hero-btns a { width: 100%; max-width: 360px; justify-content: center; text-align: center; }
  .hero-top .hero-visual img { aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 70%; }
}

/* ---------- トップへ戻るボタン ---------- */
/* 右下のreCAPTCHAバッジ(高さ約60px・下から14px)と重ならないよう、その上に置く */
.back-to-top {
  position: fixed; right: 16px; bottom: 88px; z-index: 30;
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--forest); color: var(--paper);
  box-shadow: 0 4px 14px rgba(44, 38, 32, .18);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s, background .2s ease;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--forest-soft); color: var(--paper); }
.back-to-top svg { width: 22px; height: 22px; }

/* ---------- scroll reveal ---------- */
[data-reveal] {
  opacity: 0; transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal-group] > * {
  opacity: 0; transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
[data-reveal-group].is-visible > * { opacity: 1; transform: none; }
[data-reveal-group].is-visible > *:nth-child(1) { transition-delay: .03s; }
[data-reveal-group].is-visible > *:nth-child(2) { transition-delay: .09s; }
[data-reveal-group].is-visible > *:nth-child(3) { transition-delay: .15s; }
[data-reveal-group].is-visible > *:nth-child(4) { transition-delay: .21s; }
[data-reveal-group].is-visible > *:nth-child(5) { transition-delay: .27s; }
[data-reveal-group].is-visible > *:nth-child(6) { transition-delay: .33s; }
[data-reveal-group].is-visible > *:nth-child(7) { transition-delay: .39s; }
[data-reveal-group].is-visible > *:nth-child(8) { transition-delay: .45s; }
[data-reveal-group].is-visible > *:nth-child(n+9) { transition-delay: .5s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal-group] > * { opacity: 1; transform: none; transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .header-right { gap: 16px; }
  .main-nav {
    position: fixed; inset: 68px 0 auto 0; background: var(--paper);
    flex-direction: column; padding: 20px clamp(20px, 5vw, 40px); gap: 4px;
    border-bottom: 1px solid var(--line); transform: translateY(-8px);
    opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
  }
  .main-nav.is-open { opacity: 1; pointer-events: auto; transform: none; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); display: block; }
  .nav-toggle { display: inline-flex; }
  .hero-flex, .split-flex { flex-direction: column; }
  .info-label { width: auto; }
  .compare-grid { grid-template-columns: 1fr; }
  .article-nav { flex-direction: column; }
  .article-nav-item.next { text-align: left; align-items: flex-start; }

  /* 最新の実践記事フッター: スマホ幅では縦並びにする */
  .footer-articles-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
  .footer-articles-list { flex-direction: column; gap: 6px; }
  .footer-articles-more { margin-left: 0; }

  /* ご利用の流れ: スマホ幅では縦並びにし、矢印も下向きにする */
  .flow { flex-direction: column; align-items: stretch; }
  .flow-step { flex: none; width: 100%; }
  .flow .flow-arrow { align-self: center; margin-top: 0; transform: rotate(90deg); }

  /* 表組み: スマホ幅では横スクロールで見せる(幅800px確保) */

  /* .table-scroll でラップ済みのテーブル(価格表など)は、中の表そのものに幅を持たせる */
  .price-table {
    min-width: 800px;
  }
  .price-table th, .price-table td {
    white-space: nowrap;
  }

  /* WP標準の「テーブル」ブロックは <figure class="wp-block-table"> が自動でラップしてくれるので、
     そちらをスクロール枠として使う */
  .article-body .wp-block-table {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
  .article-body .wp-block-table table {
    min-width: 800px;
  }
  .article-body .wp-block-table table th, .article-body .wp-block-table table td {
    white-space: nowrap;
  }

  /* ラップ枠のない表(カスタムHTMLブロックで直接 <table> を貼った場合)は、表自体をスクロール枠にする */
  .article-body table:not(.wp-block-table table) {
    display: block; overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
  .article-body table:not(.wp-block-table table) th,
  .article-body table:not(.wp-block-table table) td {
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .header-right .btn-primary { display: none; }
}
