/* waiwanko-security v2.8.0 — UX改修 CSS（仕様: dog-portal/docs/ux-spec.md）
   S3: 共通(C-1/C-2/C-4/C-5)・トップ(T-1〜T-8)・検索結果(R-1〜R-4)。S4 で記事用を追記 */
:root{--wx-accent:#158a7e;--wx-accent-ink:#0d5f57;--wx-soft:#e2f2ef;--wx-ink:#1f2c2a;--wx-ink2:#4f6260;--wx-muted:#7d8f8c;--wx-line:#d9e4e1;--wx-bg:#f6f9f8;--wx-free:#e1f4e7;--wx-free-ink:#1d6b41;--wx-anchor-h:0px}

/* ===== C-1 モバイル基準値（トップ・検索結果） ===== */
.wx-home,.wx-sr{font-size:16px;line-height:1.7;color:var(--wx-ink)}
.wx-home p:not([class]),.wx-sr p:not([class]){font-size:16px}

/* ===== C-2 タップ領域 ===== */
#global_menu ul li a{min-height:44px;display:flex;align-items:center}
.dm__menu li a{min-height:48px;display:flex;align-items:center;font-size:16px}
.freeSearch__submit{min-height:48px}
.freeSearch__modalListItem{min-height:48px;box-sizing:border-box}

/* ===== T-1 公開0件の県・地方を検索モーダルから隠す ===== */
.freeSearch__modalListItem--notfound{display:none!important}
#modal_pref .freeSearch__modalSection:not(:has(.freeSearch__modalListItem:not(.freeSearch__modalListItem--notfound))){display:none!important}
.freeSearch__modalNote{font-size:13px;color:var(--wx-muted);margin:0;padding:8px 1em 0;line-height:1.5}

/* ===== T-2 ヒーロー ===== */
#header_slider{display:none!important}
.wx-hero{position:relative;height:220px;overflow:hidden;background:linear-gradient(135deg,#2f8f86,#5aa9a8)}
.wx-hero__img{width:100%;height:100%;object-fit:cover;display:block}
.wx-hero__body{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:flex-end;padding:16px 20px 18px;background:linear-gradient(180deg,rgba(0,0,0,0) 25%,rgba(0,0,0,.6))}
.wx-hero .wx-hero__title{margin:0;color:#fff;font-size:26px;font-weight:700;line-height:1.3;letter-spacing:.02em;text-shadow:0 1px 8px rgba(0,0,0,.45)}
.wx-hero .wx-hero__lead{margin:6px 0 0;color:#fff;font-size:14px;line-height:1.5;opacity:.96;text-shadow:0 1px 6px rgba(0,0,0,.5)}
@media(min-width:768px){.wx-hero{height:320px}.wx-hero .wx-hero__title{font-size:36px}.wx-hero .wx-hero__lead{font-size:16px}.wx-hero__body{padding:28px 40px 30px}}

/* ===== トップ共通 ===== */
.wx-main .inner{max-width:1100px;margin:0 auto;padding:0 16px}
.wx-search{padding:12px 0 4px}
.wx-search .freeSearch__heading{font-size:18px;margin:0 0 8px}
.wx-sec{padding:18px 0 6px}
.wx-sec__h{font-size:20px;font-weight:700;line-height:1.3;margin:0 0 12px;padding-left:12px;border-left:4px solid var(--wx-accent);color:var(--wx-ink)}
@media(min-width:768px){.wx-sec{padding:26px 0 8px}.wx-sec__h{font-size:22px}}

/* ===== T-3 エリア・目的 ===== */
.wx-areas{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
@media(min-width:768px){.wx-areas{grid-template-columns:repeat(4,1fr)}}
.wx-area{display:flex;flex-direction:column;justify-content:center;min-height:64px;padding:10px 14px;border:1px solid var(--wx-line);border-radius:12px;background:#fff;text-decoration:none!important;color:var(--wx-ink)!important;box-shadow:0 1px 2px rgba(0,0,0,.04)}
.wx-area__name{font-size:17px;font-weight:700;line-height:1.3}
.wx-area__count{font-size:13px;color:var(--wx-ink2);line-height:1.4;margin-top:2px}
.wx-area--hub{border-color:var(--wx-accent);background:var(--wx-soft)}
.wx-area--hub .wx-area__name::after{content:"›";margin-left:6px;color:var(--wx-accent)}
.wx-chips{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 10px}
.wx-chip{display:inline-flex;align-items:center;min-height:40px;padding:0 14px;border-radius:999px;border:1px solid var(--wx-line);background:#fff;color:var(--wx-accent-ink)!important;font-size:14px;font-weight:600;text-decoration:none!important;line-height:1.2}
.wx-chip small{font-weight:400;font-size:12px;color:var(--wx-muted);margin-left:5px}
.wx-chip--type{background:var(--wx-soft);border-color:transparent}
.wx-chip--hub{background:var(--wx-accent);color:#fff!important;border-color:var(--wx-accent)}

/* ===== T-4/T-7 施設カード ===== */
.wx-cards{display:grid;grid-template-columns:1fr;gap:10px}
@media(min-width:640px){.wx-cards{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1000px){.wx-cards{grid-template-columns:repeat(3,1fr)}}
.wx-card{display:grid;grid-template-columns:96px 1fr;gap:12px;padding:10px;border:1px solid var(--wx-line);border-radius:12px;background:#fff;text-decoration:none!important;color:var(--wx-ink)!important;min-height:116px;box-shadow:0 1px 2px rgba(0,0,0,.04)}
.wx-card:active{background:var(--wx-bg)}
.wx-card__img{display:block;width:96px;height:96px;border-radius:8px;overflow:hidden;background:#edf2f1}
.wx-card__img img{width:100%!important;height:100%!important;object-fit:cover;display:block}
.wx-card__noimg{display:flex;width:100%;height:100%;align-items:center;justify-content:center;font-size:28px;opacity:.5}
.wx-card__body{display:block;min-width:0}
.wx-card__meta{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:4px}
.wx-tag{display:inline-block;font-size:11.5px;line-height:1.7;padding:0 7px;border-radius:999px;background:var(--wx-soft);color:var(--wx-accent-ink);font-weight:600;white-space:nowrap}
.wx-tag--type{background:#eef0f4;color:#414a5c}
.wx-tag--free{background:var(--wx-free);color:var(--wx-free-ink)}
.wx-card__name{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:16px;font-weight:700;line-height:1.4}
.wx-card__catch{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:13px;color:var(--wx-ink2);line-height:1.5;margin-top:4px}
.wx-btn{display:flex;align-items:center;justify-content:center;min-height:44px;padding:0 18px;border-radius:10px;background:var(--wx-accent);color:#fff!important;font-weight:700;font-size:15px;text-decoration:none!important;margin:14px 0 0}
.wx-btn--ghost{background:#fff;color:var(--wx-accent-ink)!important;border:1px solid var(--wx-accent)}

/* ===== 広告フック（AD-1〜3・高さ予約） ===== */
.waiwan-ad{margin:20px auto;text-align:center;min-height:280px;overflow:hidden}
@media(min-width:768px){.waiwan-ad{min-height:250px}}
.waiwan-ad__label{display:block;font-size:11px;color:#9aa5a3;margin-bottom:4px;letter-spacing:.06em}

/* ===== R-1〜R-4 検索結果 ===== */
.wx-sr #left_col{max-width:100%}
.wx-srbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:12px 0 10px;border-bottom:1px solid var(--wx-line)}
.wx-srbar__q{font-size:18px;font-weight:700;line-height:1.35;margin:0;flex:1 1 100%}
.wx-srbar__n{font-size:15px;color:var(--wx-ink2);font-weight:600}
.wx-sort{display:flex;gap:6px;margin-left:auto}
.wx-sort a{display:inline-flex;align-items:center;min-height:36px;padding:0 12px;border-radius:8px;border:1px solid var(--wx-line);font-size:13px;color:var(--wx-ink2)!important;text-decoration:none!important;background:#fff}
.wx-sort a.active{background:var(--wx-accent);color:#fff!important;border-color:var(--wx-accent)}
.wx-srdetails{margin:10px 0 4px}
.wx-srdetails summary{list-style:none;cursor:pointer;display:inline-flex;align-items:center;min-height:40px;padding:0 16px;border:1px solid var(--wx-accent);border-radius:999px;color:var(--wx-accent-ink);font-weight:700;font-size:14px;background:#fff;user-select:none}
.wx-srdetails summary::-webkit-details-marker{display:none}
.wx-srdetails summary::before{content:"＋";margin-right:6px;font-weight:400}
.wx-srdetails[open] summary::before{content:"－"}
.wx-srdetails__body{margin-top:12px}
.wx-srdetails__body .freeSearch__heading{display:none}
.wx-srlist{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:10px}
.wx-srlist>li{position:relative;margin:0}
.wx-srlist .simplefavorite-button,.wx-srlist .favorite-button{position:absolute;right:12px;bottom:10px;z-index:1}
.wx-srlist__ad{grid-column:1/-1}
.wx-srpager{margin:18px 0 24px}
.wx-srpager .page-numbers,.wx-srpager a,.wx-srpager span{min-height:44px;min-width:44px;display:inline-flex;align-items:center;justify-content:center}
.wx-empty{padding:20px 0}

/* ===== C-4 フッター上段 ===== */
.wx-footnav{max-width:1100px;margin:0 auto;padding:18px 16px 4px;border-top:1px solid #e0dcd8}
.wx-footnav__h{font-size:13px;color:#8b7e74;margin:0 0 8px;text-align:center;letter-spacing:.06em}
.wx-footnav__list{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;list-style:none;margin:0 0 10px;padding:0}
.wx-footnav__list li{margin:0;padding:0}
.wx-footnav__list a{display:inline-flex;align-items:center;min-height:40px;padding:0 14px;border:1px solid #e0dcd8;border-radius:999px;font-size:13px;color:#5a504a!important;text-decoration:none!important;background:#fff}
.wx-footnav__list a small{margin-left:4px;color:#9a8f86;font-size:11px}
.wx-footnav__list--sub a{border-style:dashed}

/* ===== C-5 ページトップボタン（44px・アンカー広告の上に退避） ===== */
#return_top{bottom:calc(var(--wx-anchor-h) + 12px)!important}
#return_top a{width:44px!important;height:44px!important;line-height:44px!important;font-size:0!important;border-radius:10px}
#return_top a::before{font-size:18px!important;line-height:44px!important}

/* =========================================================
   S4 記事UX（A-1〜A-10・A-12・H-2/H-3・C-1/C-2/C-6/C-7）
   ========================================================= */

/* ===== C-1 本文タイポグラフィ（16px / 行間1.7） ===== */
#article .post_content,
#article .post_content p,
#article .post_content li,
#article .post_content dd,
#article .post_content dt{font-size:16px!important;line-height:1.8}
#article .post_content{color:var(--wx-ink)}
#article .post_content h2{font-size:22px;line-height:1.4;scroll-margin-top:64px}
#article .post_content h3{font-size:18px;line-height:1.5;scroll-margin-top:64px}
#article .post_content h4{font-size:17px;line-height:1.5}
/* A-10 FAQ: Q(H3) 18px / A 16px はうえの規定で満たす。Q の視認性だけ上げる */
#article .post_content small,
#article .post_content .waiwan-last-verified{font-size:14px!important}
@media(prefers-reduced-motion:no-preference){html{scroll-behavior:smooth}}

/* ===== C-6 パンくず（3階層） ===== */
.wx-bread ul{display:flex;flex-wrap:wrap;align-items:center;gap:2px 6px;list-style:none;margin:0 auto;padding:8px 16px}
.wx-bread li{display:flex;align-items:center;font-size:12.5px;color:var(--wx-muted);margin:0}
.wx-bread li+li::before{content:"›";margin-right:6px;color:#b9c6c3}
.wx-bread a{display:inline-flex;align-items:center;min-height:32px;color:var(--wx-ink2)!important;text-decoration:none!important}
.wx-bread li.last span{color:var(--wx-muted)}

/* ===== C-7 H1・タイトル周り ===== */
#article h1#post_title{font-size:24px;line-height:1.4;margin:6px 0 8px}
@media(min-width:768px){#article h1#post_title{font-size:30px}}
.wx-chips--post{margin:0 0 6px}
.wx-chips--post .wx-chip{min-height:32px;font-size:13px;padding:0 12px}
#article .wx-postdate{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin:0 0 14px;border:0}
.waiwan-last-verified{color:#6d7f7c;font-size:14px;margin:0}
.waiwan-last-verified__note{display:block;font-size:12px;color:var(--wx-muted);margin-top:2px}

/* ===== A-1 スライダー／アイキャッチ（高さ予約） ===== */
.wx-media{display:flex;gap:8px;overflow-x:auto;-webkit-overflow-scrolling:touch;scroll-snap-type:x mandatory;margin:16px 0 20px;padding-bottom:4px}
.wx-media__item{flex:0 0 88%;margin:0;scroll-snap-align:center}
.wx-media--single .wx-media__item,.wx-media--single img{flex:1 1 100%}
.wx-media img{width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:10px;display:block;background:#eef2f1}
.wx-media figcaption{font-size:13px;color:var(--wx-ink2);margin-top:4px;line-height:1.5}
@media(min-width:768px){.wx-media__item{flex:0 0 60%}}

/* ===== A-2/H-2 目次 ===== */
.wx-toc{border:1px solid var(--wx-line);border-radius:12px;background:#fff;margin:0 0 18px;overflow:hidden}
.wx-toc__sum{display:flex;align-items:center;gap:8px;min-height:48px;padding:0 16px;font-size:16px;font-weight:700;color:var(--wx-ink);cursor:pointer;list-style:none;background:var(--wx-bg)}
.wx-toc__sum::-webkit-details-marker{display:none}
.wx-toc__sum::before{content:"≡";color:var(--wx-accent);font-size:18px}
.wx-toc__sum::after{content:"＋";margin-left:auto;color:var(--wx-muted);font-weight:400}
.wx-toc[open] .wx-toc__sum::after{content:"－"}
.wx-toc__n{font-size:12px;font-weight:400;color:var(--wx-muted)}
.wx-toc__list{margin:0;padding:6px 16px 12px;list-style:none;counter-reset:wxtoc}
.wx-toc__list li{margin:0;padding:0;counter-increment:wxtoc}
.wx-toc__list li a{display:flex;align-items:center;gap:8px;min-height:44px;font-size:15px!important;line-height:1.5;color:var(--wx-accent-ink)!important;text-decoration:none!important;border-bottom:1px dashed #e7eeec}
.wx-toc__list li:last-child a{border-bottom:0}
.wx-toc__list li a::before{content:counter(wxtoc);flex:0 0 22px;height:22px;border-radius:50%;background:var(--wx-soft);color:var(--wx-accent-ink);font-size:12px;display:flex;align-items:center;justify-content:center}
.wx-toc--chips{border:0;background:none;margin:0 0 16px}
.wx-toc__h{font-size:13px;color:var(--wx-muted);margin:0 0 6px;letter-spacing:.04em}
.wx-toc--chips .wx-chip{min-height:40px}

/* ===== A-3/H-3 テーブル ===== */
.waiwan-tbl{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:0 0 20px;border:1px solid var(--wx-line);border-radius:10px;background:#fff}
.waiwan-tbl table{margin:0!important;border:0!important;width:100%;border-collapse:collapse;font-size:15px}
/* 3列以上は各列に下限幅を与えて「1文字ずつ縦に折返す」のを防ぎ、容器内で横スクロールさせる */
.waiwan-tbl--sticky table{width:auto!important;min-width:100%}
.waiwan-tbl--sticky th,.waiwan-tbl--sticky td{min-width:7.5em}
.waiwan-tbl--sticky tr>*:first-child{min-width:8.5em;max-width:11em}
.waiwan-tbl--sticky{box-shadow:inset -14px 0 14px -14px rgba(0,0,0,.22)}
.waiwan-tbl th,.waiwan-tbl td{font-size:15px!important;line-height:1.6;padding:10px 12px!important;border:1px solid #e7eeec!important;vertical-align:top}
.waiwan-tbl--pair tr>*:first-child{width:7em;min-width:7em;background:var(--wx-bg);font-weight:700;color:var(--wx-ink2)}
.waiwan-tbl--sticky th:first-child,.waiwan-tbl--sticky td:first-child{position:sticky;left:0;z-index:1;background:#fff;box-shadow:1px 0 0 #e7eeec;min-width:8em}
.waiwan-tbl--sticky thead th:first-child{background:var(--wx-bg)}
.waiwan-tbl table a{word-break:break-all}
.wx-badge-free{display:inline-block;padding:1px 8px;border-radius:999px;background:var(--wx-free);color:var(--wx-free-ink);font-weight:700;font-size:13px}
figure.wp-block-table{overflow:visible!important;margin-left:0;margin-right:0}

/* ===== A-5 回遊レール ===== */
.wx-rail{margin:0 0 20px}
.wx-rail__h{font-size:15px;font-weight:700;color:var(--wx-ink);margin:0 0 8px;padding-left:10px;border-left:3px solid var(--wx-accent)}
.wx-rail__track{display:flex;gap:10px;overflow-x:auto;-webkit-overflow-scrolling:touch;padding-bottom:4px;scroll-snap-type:x proximity}
.wx-rail__track .wx-card{flex:0 0 78%;scroll-snap-align:start;min-height:104px}
@media(min-width:768px){.wx-rail__track .wx-card{flex:0 0 300px}}
.wx-rail--areas .wx-chips{margin:0}

/* ===== 記事末（A-5 ハブボタン → AD-3） ===== */
.wx-articlefoot{margin:28px 0 8px}
.wx-btn--hub{margin:0 0 18px}
.waiwan-related-facilities{font-size:15px}
.waiwan-related-facilities a{min-height:44px;display:flex!important;align-items:center}

/* 本文16px(!important) が部品の指定を上書きしないように #article 付きで再指定 */
#article .post_content .wx-toc__list li a{font-size:15px!important}
#article .post_content .wx-toc__sum{font-size:16px!important}
#article .post_content .wx-rail__h,#article .post_content .wx-toc__h{font-size:15px!important;line-height:1.4}
#article .post_content .waiwan-tbl th,#article .post_content .waiwan-tbl td{font-size:15px!important}
#article .post_content .wx-card__name{font-size:16px}
#article .post_content .wx-card__catch,#article .post_content .wx-tag{font-size:13px}
#article .post_content .waiwan-ad__label{font-size:11px!important}
#article .post_content .wx-media figcaption{font-size:13px!important}

/* 本文内の埋め込み（Googleマップ iframe width=400 等）がページを横スクロールさせるのを止める */
#article .post_content iframe,#article .post_content embed,#article .post_content object{max-width:100%!important;border:0}
#article .post_content{overflow-wrap:break-word}
