/* トソイチ STORK19 全体デザイン
 * CSSを停止するだけで元テーマの配色へ戻る。既存テーマ設定そのものは変更しない。
 * STORK19本体の主要要素のみを対象に、トソイチ製専用プラグインのクラスは原則対象外。
 */
body.twsd-active.twsd-site,
body.twsd-active.twsd-site #container {background-color:var(--twsd-site-bg)!important;}
body.twsd-active.twsd-header #header,
body.twsd-active.twsd-header header#header,
body.twsd-active.twsd-header .site-header {background-color:var(--twsd-header-bg)!important;}
body.twsd-active.twsd-header #header .site-title,
body.twsd-active.twsd-header #header .site-title a,
body.twsd-active.twsd-header #header .header__title,
body.twsd-active.twsd-header #header .header__description,
body.twsd-active.twsd-header #header .site-description,
body.twsd-active.twsd-header #header a:not(.btn),
body.twsd-active.twsd-header #gnav a,
body.twsd-active.twsd-header #gnav .nav li a,
body.twsd-active.twsd-header #header .menu a {color:var(--twsd-header-text)!important;}
/* 透過ヘッダーは元テーマ側の専用デザインが優先される場合があります。 */
body.twsd-active.twsd-footer #footer,
body.twsd-active.twsd-footer footer#footer,
body.twsd-active.twsd-footer .site-footer {background-color:var(--twsd-footer-bg)!important;color:var(--twsd-footer-text)!important;}
body.twsd-active.twsd-footer #footer a,
body.twsd-active.twsd-footer #footer h2,
body.twsd-active.twsd-footer #footer h3,
body.twsd-active.twsd-footer #footer p,
body.twsd-active.twsd-footer #footer li,
body.twsd-active.twsd-footer #footer .copyright,
body.twsd-active.twsd-footer footer.site-footer a,
body.twsd-active.twsd-footer footer.site-footer p {color:var(--twsd-footer-text)!important;}
body.twsd-active.twsd-footer #footer a:hover {text-decoration:underline;}

body.twsd-active.twsd-content #main,
body.twsd-active.twsd-content #main .article,
body.twsd-active.twsd-content #main .entry-content,
body.twsd-active.twsd-content #main .article-content,
body.twsd-active.twsd-content .main-content {background-color:var(--twsd-content-bg)!important;}
body.twsd-active.twsd-content #main .entry-content > p,
body.twsd-active.twsd-content #main .entry-content > ul,
body.twsd-active.twsd-content #main .entry-content > ol,
body.twsd-active.twsd-content #main .article-content > p,
body.twsd-active.twsd-content #main .entry-content > blockquote,
body.twsd-active.twsd-content .entry-content > p {color:var(--twsd-body-text)!important;}
body.twsd-active.twsd-content #main .entry-content > hr,
body.twsd-active.twsd-content #main .entry-content > table,
body.twsd-active.twsd-content #main .entry-content > table th,
body.twsd-active.twsd-content #main .entry-content > table td {border-color:var(--twsd-border)!important;}

/* Ver1.3: 固定ページ/投稿ページのページタイトル (H1) はSTORK19本来の色を維持。
   Ver1.2までのタイトル色上書きは削除。本文内H2/H3/H4は引き続き対象。 */
body.twsd-active.twsd-titles #main .entry-content > h2:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]),
body.twsd-active.twsd-titles #main .entry-content > h3:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]),
body.twsd-active.twsd-titles #main .article-content > h2:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]),
body.twsd-active.twsd-titles #main .article-content > h3:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]) {color:var(--twsd-heading)!important;border-color:var(--twsd-heading)!important;}

body.twsd-active.twsd-category .cat-name,
body.twsd-active.twsd-category .cat-label,
body.twsd-active.twsd-category .category-label,
body.twsd-active.twsd-category .catname,
body.twsd-active.twsd-category .post-categories a,
body.twsd-active.twsd-category .entry-meta .cat-name {background-color:var(--twsd-category-bg)!important;border-color:var(--twsd-category-bg)!important;color:var(--twsd-category-text)!important;}
body.twsd-active.twsd-category .cat-name a,
body.twsd-active.twsd-category .cat-label a,
body.twsd-active.twsd-category .category-label a {color:var(--twsd-category-text)!important;}

body.twsd-active.twsd-new .newmark,
body.twsd-active.twsd-new .newpost,
body.twsd-active.twsd-new .new-icon,
body.twsd-active.twsd-new .new-mark,
body.twsd-active.twsd-new .new-label,
body.twsd-active.twsd-new span.newicon {background:var(--twsd-new-bg)!important;border-color:var(--twsd-new-bg)!important;color:var(--twsd-new-text)!important;}

/* 通常の文章リンクのみに適用：CTA、LINE、デザインシステム連携プラグインを尊重 */
body.twsd-active.twsd-links #main .entry-content p > a:not(.btn):not(.button):not(.wp-block-button__link),
body.twsd-active.twsd-links #main .entry-content li > a:not(.btn):not(.button),
body.twsd-active.twsd-links #main .article-content p > a:not(.btn):not(.button),
body.twsd-active.twsd-links #main .article-content li > a:not(.btn):not(.button) {color:var(--twsd-link)!important;}
body.twsd-active.twsd-links #main .entry-content p > a:not(.btn):not(.button):hover,
body.twsd-active.twsd-links #main .entry-content li > a:not(.btn):not(.button):hover,
body.twsd-active.twsd-links #main .article-content p > a:not(.btn):not(.button):hover,
body.twsd-active.twsd-links #main .article-content li > a:not(.btn):not(.button):hover {color:var(--twsd-link-hover)!important;}

body.twsd-active.twsd-buttons #main .entry-content > .wp-block-buttons .wp-block-button:not(.is-style-outline) > .wp-block-button__link,
body.twsd-active.twsd-buttons #main .entry-content > .wp-block-button:not(.is-style-outline) > .wp-block-button__link,
body.twsd-active.twsd-buttons #main .entry-content > a.btn,
body.twsd-active.twsd-buttons #main .entry-content > a.button,
body.twsd-active.twsd-buttons .pagination .current,
body.twsd-active.twsd-buttons .pagination .page-numbers.current {background-color:var(--twsd-button-bg)!important;border-color:var(--twsd-button-bg)!important;color:var(--twsd-button-text)!important;}

/* アクセシビリティ：キーボード操作を認識しやすく */
body.twsd-active #main a:focus-visible {outline:2px solid var(--twsd-link, #496b60);outline-offset:3px;}

/* =============================================================
 * Ver1.1 — 本文の見出し H2/H3/H4 を一貫した階層デザインにする。
 * 対象：通常の記事本文／固定ページ本文と、直下のWPグループ見出し。
 * 専用の施工事例・コラム等ショートコード内部には適用しない。
 * STORK19の見出しスタイルで選択した装飾と重ならないよう、
 * 背景画像・テーマの疑似要素・ボーダーをいったんリセット。
 * 既存テーマの「外観→カスタマイズ」保存値は変更しない。
 * ============================================================= */
body.twsd-active.twsd-titles #main :is(.entry-content,.article-content) > :is(h2:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]),h3:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]),h4),
body.twsd-active.twsd-titles #main :is(.entry-content,.article-content) > .wp-block-group > :is(h2:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]),h3:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]),h4),
body.twsd-active.twsd-titles #main :is(.entry-content,.article-content) > .wp-block-group > .wp-block-group__inner-container > :is(h2:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]),h3:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]),h4) {
    box-shadow:none!important;
    text-shadow:none!important;
    background-image:none!important;
    border:0!important;
    border-radius:0!important;
    font-style:normal;
    line-height:1.55;
    position:relative;
    text-align:left;
    box-sizing:border-box;
}
/* STORK19のステッチ・吹き出し・マーカー等の飾りを重ねない */
body.twsd-active.twsd-titles #main :is(.entry-content,.article-content) > :is(h2:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]),h3:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]),h4)::before,
body.twsd-active.twsd-titles #main :is(.entry-content,.article-content) > :is(h2:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]),h3:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]),h4)::after,
body.twsd-active.twsd-titles #main :is(.entry-content,.article-content) > .wp-block-group > :is(h2:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]),h3:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]),h4)::before,
body.twsd-active.twsd-titles #main :is(.entry-content,.article-content) > .wp-block-group > :is(h2:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]),h3:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]),h4)::after,
body.twsd-active.twsd-titles #main :is(.entry-content,.article-content) > .wp-block-group > .wp-block-group__inner-container > :is(h2:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]),h3:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]),h4)::before,
body.twsd-active.twsd-titles #main :is(.entry-content,.article-content) > .wp-block-group > .wp-block-group__inner-container > :is(h2:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]),h3:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]),h4)::after {
    content:none!important;
    display:none!important;
}
/* H2＝淡い面＋左線。大きな章の切り替わりを認識しやすく */
body.twsd-active.twsd-titles #main :is(.entry-content,.article-content) > h2:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]),
body.twsd-active.twsd-titles #main :is(.entry-content,.article-content) > .wp-block-group > h2:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]),
body.twsd-active.twsd-titles #main :is(.entry-content,.article-content) > .wp-block-group > .wp-block-group__inner-container > h2:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]) {
    background-color:var(--twsd-h2-bg)!important;
    color:var(--twsd-h2-text)!important;
    border-left:5px solid var(--twsd-h2-line)!important;
    padding:.76em .94em!important;
    margin-top:2em;
    margin-bottom:1.15em;
}
/* H3＝控えめな背景＋左線。H2と同じ塗り面にしない */
body.twsd-active.twsd-titles #main :is(.entry-content,.article-content) > h3:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]),
body.twsd-active.twsd-titles #main :is(.entry-content,.article-content) > .wp-block-group > h3:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]),
body.twsd-active.twsd-titles #main :is(.entry-content,.article-content) > .wp-block-group > .wp-block-group__inner-container > h3:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]) {
    background-color:var(--twsd-h3-bg)!important;
    color:var(--twsd-h3-text)!important;
    border-left:3px solid var(--twsd-h3-line)!important;
    border-bottom:1px solid var(--twsd-border)!important;
    padding:.44em .77em!important;
    margin-top:1.65em;
    margin-bottom:.9em;
}
/* H4＝シンプルな細い下線。背景・文字・線色は個別調整可 */
body.twsd-active.twsd-titles #main :is(.entry-content,.article-content) > h4:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]),
body.twsd-active.twsd-titles #main :is(.entry-content,.article-content) > .wp-block-group > h4:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]),
body.twsd-active.twsd-titles #main :is(.entry-content,.article-content) > .wp-block-group > .wp-block-group__inner-container > h4:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]) {
    background-color:var(--twsd-h4-bg)!important;
    color:var(--twsd-h4-text)!important;
    border-bottom:1px solid var(--twsd-h4-line)!important;
    padding:.28em .3em .43em!important;
    margin-top:1.45em;
    margin-bottom:.75em;
}
@media (max-width:767px) {
    body.twsd-active.twsd-titles #main :is(.entry-content,.article-content) > h2:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]),
    body.twsd-active.twsd-titles #main :is(.entry-content,.article-content) > .wp-block-group > h2:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]),
    body.twsd-active.twsd-titles #main :is(.entry-content,.article-content) > .wp-block-group > .wp-block-group__inner-container > h2:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]) {
        padding:.65em .7em!important;
        border-left-width:4px!important;
    }
    body.twsd-active.twsd-titles #main :is(.entry-content,.article-content) > h3:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]),
    body.twsd-active.twsd-titles #main :is(.entry-content,.article-content) > .wp-block-group > h3:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]),
    body.twsd-active.twsd-titles #main :is(.entry-content,.article-content) > .wp-block-group > .wp-block-group__inner-container > h3:not(.twsd-keep-color):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]) {
        padding:.37em .6em!important;
    }
}


/* =============================================================
 * Ver1.2 — ブロックエディタ・STORK19サイトカラー連動ブロック
 * - 公開表示だけをCSSで補正。データベース・カスタマイザー値は変更しない。
 * - ショートコード等、トソイチ専用プラグインで描画した要素は避ける。
 * - twsd-keep-colorを付けた見出しは対象外。
 * - Gutenbergカラム/グループ内の見出しも対象。
 * ============================================================= */

/* 同期トークンをブロック側にも公開 */
body.twsd-active.twsd-titles.twsd-block-sync #main :is(.entry-content,.article-content) {
    --twsd-block-title-bg: var(--twsd-h2-bg);
    --twsd-block-title-text: var(--twsd-h2-text);
    --twsd-block-title-accent: var(--twsd-h2-line);
    --twsd-block-light-bg: var(--twsd-h2-bg);
    --twsd-block-light-border: var(--twsd-h2-line);
}

/* グループ・カラム・メディアとテキスト・カバー等、入れ子の見出しを同期。
   Gutenbergが独自色を持つものは標準モードでは触れない。 */
body.twsd-active.twsd-titles.twsd-block-sync:not(.twsd-block-force) #main :is(.entry-content,.article-content)
:is(h2.wp-block-heading,h3.wp-block-heading,h4.wp-block-heading):not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]):not(.twsd-keep-color):not(.is-style-none):not(.is-style-plain),
body.twsd-active.twsd-titles.twsd-block-sync.twsd-block-force #main :is(.entry-content,.article-content)
:is(h2.wp-block-heading,h3.wp-block-heading,h4.wp-block-heading):not(.twsd-keep-color):not(.is-style-none):not(.is-style-plain) {
    background-image:none!important;
    box-shadow:none!important;
    text-shadow:none!important;
    border:0!important;
    border-radius:0!important;
    position:relative;
    box-sizing:border-box;
    line-height:1.55;
}

body.twsd-active.twsd-titles.twsd-block-sync:not(.twsd-block-force) #main :is(.entry-content,.article-content)
h2.wp-block-heading:not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]):not(.twsd-keep-color):not(.is-style-none):not(.is-style-plain),
body.twsd-active.twsd-titles.twsd-block-sync.twsd-block-force #main :is(.entry-content,.article-content)
h2.wp-block-heading:not(.twsd-keep-color):not(.is-style-none):not(.is-style-plain) {
    background-color:var(--twsd-h2-bg)!important;
    color:var(--twsd-h2-text)!important;
    border-left:5px solid var(--twsd-h2-line)!important;
    padding:.76em .94em!important;
}
body.twsd-active.twsd-titles.twsd-block-sync:not(.twsd-block-force) #main :is(.entry-content,.article-content)
h3.wp-block-heading:not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]):not(.twsd-keep-color):not(.is-style-none):not(.is-style-plain),
body.twsd-active.twsd-titles.twsd-block-sync.twsd-block-force #main :is(.entry-content,.article-content)
h3.wp-block-heading:not(.twsd-keep-color):not(.is-style-none):not(.is-style-plain) {
    background-color:var(--twsd-h3-bg)!important;
    color:var(--twsd-h3-text)!important;
    border-left:3px solid var(--twsd-h3-line)!important;
    border-bottom:1px solid var(--twsd-border)!important;
    padding:.44em .77em!important;
}
body.twsd-active.twsd-titles.twsd-block-sync:not(.twsd-block-force) #main :is(.entry-content,.article-content)
h4.wp-block-heading:not(.has-text-color):not(.has-background):not([style*="color:"]):not([style*="background"]):not(.twsd-keep-color):not(.is-style-none):not(.is-style-plain),
body.twsd-active.twsd-titles.twsd-block-sync.twsd-block-force #main :is(.entry-content,.article-content)
h4.wp-block-heading:not(.twsd-keep-color):not(.is-style-none):not(.is-style-plain) {
    background-color:var(--twsd-h4-bg)!important;
    color:var(--twsd-h4-text)!important;
    border-bottom:1px solid var(--twsd-h4-line)!important;
    padding:.28em .3em .43em!important;
}

/* STORK19の「サイトカラー」関連ブロック・段落スタイル。
   クラス名にサイトカラー／見出し背景色と明記される要素だけに限定。
   通常の背景指定・写真・ブランド専用ボタン等には適用しない。 */
body.twsd-active.twsd-titles.twsd-block-sync #main :is(.entry-content,.article-content)
:is(p,blockquote,.wp-block-paragraph,.wp-block-quote)[class*="is-style-sitecolor"]:not(.twsd-keep-color),
body.twsd-active.twsd-titles.twsd-block-sync #main :is(.entry-content,.article-content)
:is(p,blockquote,.wp-block-paragraph,.wp-block-quote)[class*="is-style-site-color"]:not(.twsd-keep-color),
body.twsd-active.twsd-titles.twsd-block-sync #main :is(.entry-content,.article-content)
:is(p,blockquote,.wp-block-paragraph,.wp-block-quote)[class*="is-style-heading-bg"]:not(.twsd-keep-color),
body.twsd-active.twsd-titles.twsd-block-sync #main :is(.entry-content,.article-content)
:is(p,blockquote,.wp-block-paragraph,.wp-block-quote)[class*="is-style-heading-background"]:not(.twsd-keep-color),
body.twsd-active.twsd-titles.twsd-block-sync #main :is(.entry-content,.article-content)
:is(p,blockquote,.wp-block-paragraph,.wp-block-quote)[class*="has-site-color-background"]:not(.twsd-keep-color),
body.twsd-active.twsd-titles.twsd-block-sync #main :is(.entry-content,.article-content)
:is(p,blockquote,.wp-block-paragraph,.wp-block-quote)[class*="has-heading-background"]:not(.twsd-keep-color) {
    background-color:var(--twsd-h2-bg)!important;
    border-color:var(--twsd-h2-line)!important;
    color:var(--twsd-h2-text)!important;
}

/* STORK19独自の「サイトカラー」ボックス／アコーディオン。
   他の個別色（青・赤・黄・ピンク等）には作用させない。 */
body.twsd-active.twsd-titles.twsd-block-sync #main :is(.entry-content,.article-content)
:is([class*="sitecolor"],[class*="site-color"],[class*="site_color"]):is([class*="box"],[class*="accordion"],[class*="faq"]):not(.twsd-keep-color),
body.twsd-active.twsd-titles.twsd-block-sync #main :is(.entry-content,.article-content)
:is([class*="sitecolor"],[class*="site-color"],[class*="site_color"]):is([class*="box"],[class*="accordion"],[class*="faq"]):not(.twsd-keep-color) > :is(summary,[class*="title"],[class*="heading"]) {
    border-color:var(--twsd-h2-line)!important;
}
body.twsd-active.twsd-titles.twsd-block-sync #main :is(.entry-content,.article-content)
:is([class*="sitecolor"],[class*="site-color"],[class*="site_color"]):is([class*="box"],[class*="accordion"],[class*="faq"]):not(.twsd-keep-color) > :is(summary,[class*="title"],[class*="heading"]) {
    background-color:var(--twsd-h2-bg)!important;
    color:var(--twsd-h2-text)!important;
}

/* 全体のサイトカラーを使用するWP標準配色クラス（既存データの変更不要） */
body.twsd-active.twsd-titles.twsd-block-sync #main :is(.entry-content,.article-content)
:is(.has-site-color-background-color,.has-sitecolor-background-color,.has-heading-background-color):not(.twsd-keep-color) {
    background-color:var(--twsd-h2-bg)!important;
    color:var(--twsd-h2-text)!important;
}

@media(max-width:767px){
  body.twsd-active.twsd-titles.twsd-block-sync #main :is(.entry-content,.article-content)
  h2.wp-block-heading:not(.twsd-keep-color):not(.is-style-none):not(.is-style-plain){padding:.65em .7em!important;border-left-width:4px!important;}
  body.twsd-active.twsd-titles.twsd-block-sync #main :is(.entry-content,.article-content)
  h3.wp-block-heading:not(.twsd-keep-color):not(.is-style-none):not(.is-style-plain){padding:.37em .6em!important;}
}


/* =============================================================
 * Ver1.3 — STORK19本来のグローバルメニュー(.stk_g_nav)と
 * 子メニュー。メニュー文字と背景を必ずペアで指定して可読性を確保。
 * 旧 #header / #gnav に加え新 .stk_header / .stk_g_nav を対象。
 * ============================================================= */
body.twsd-active.twsd-header .stk_header {
  background-color:var(--twsd-header-bg)!important;
}
body.twsd-active.twsd-header .stk_header .site__description,
body.twsd-active.twsd-header .stk_header .site__title,
body.twsd-active.twsd-header .stk_header .site__title a,
body.twsd-active.twsd-header .stk_header .site__logo a,
body.twsd-active.twsd-header .stk_header .search_btn,
body.twsd-active.twsd-header .stk_header .nav_btn,
body.twsd-active.twsd-header .stk_g_nav > ul > li:not(.stk-button-color1):not(.stk-button-color2) > a,
body.twsd-active.twsd-header .stk_g_nav > ul > li:not(.stk-button-color1):not(.stk-button-color2) > a,
body.twsd-active.twsd-header .stk_g_nav .menu > li:not(.stk-button-color1):not(.stk-button-color2) > a,
body.twsd-active.twsd-header .stk_header .stk_g_nav .menu > li:not(.stk-button-color1):not(.stk-button-color2) > a {
  color:var(--twsd-header-text)!important;
}
/* dropdown surface and links (including keyboard focus/current state) */
body.twsd-active.twsd-header .stk_g_nav :is(.sub-menu,.children),
body.twsd-active.twsd-header #g_nav :is(.sub-menu,.children),
body.twsd-active.twsd-header #gnav :is(.sub-menu,.children),
body.twsd-active.twsd-header #header :is(.sub-menu,.children) {
  background:var(--twsd-menu-bg)!important;
  border-color:var(--twsd-menu-bg)!important;
}
body.twsd-active.twsd-header .stk_g_nav :is(.sub-menu,.children) a,
body.twsd-active.twsd-header #g_nav :is(.sub-menu,.children) a,
body.twsd-active.twsd-header #gnav :is(.sub-menu,.children) a,
body.twsd-active.twsd-header #header :is(.sub-menu,.children) a {
  color:var(--twsd-menu-text)!important;
  background-color:var(--twsd-menu-bg)!important;
}
body.twsd-active.twsd-header .stk_g_nav :is(.sub-menu,.children) a:is(:hover,:focus-visible),
body.twsd-active.twsd-header .stk_g_nav :is(.sub-menu,.children) .current-menu-item > a,
body.twsd-active.twsd-header .stk_g_nav :is(.sub-menu,.children) .current_page_item > a,
body.twsd-active.twsd-header #g_nav :is(.sub-menu,.children) a:is(:hover,:focus-visible),
body.twsd-active.twsd-header #header :is(.sub-menu,.children) a:is(:hover,:focus-visible) {
  color:var(--twsd-menu-hover-text)!important;
  background-color:var(--twsd-menu-hover-bg)!important;
}
body.twsd-active.twsd-header .stk_g_nav :is(.sub-menu,.children) a svg,
body.twsd-active.twsd-header .stk_g_nav :is(.sub-menu,.children) a i {
  color:inherit!important;
}


/* =============================================================
 * Ver1.3 — WordPress/STORK19のタブブロック。
 * ラベルだけに適用し、タブの本文・パネルに色を付けない。
 * ルートへ .twsd-keep-color 指定で独自デザインを保護。
 * ============================================================= */
body.twsd-active.twsd-tabs #main :is(.entry-content,.article-content) :is(.wp-block-tabs,.wp-block-stork19-tabs,.wp-block-stork19-tab,.wp-block-stk-tabs,.wp-block-stk-tab,.wp-block-oc-tabs,.wp-block-oc-tab,.stk-tabs,.stk-tab,.stk_tabs,.stk_tab,.oc-tabs,.oc-tab,.oc_tabs,.oc_tab,.tab-block,.tab_block,[class*="stork19-tab"],[class*="stk-tabs"],[class*="oc-tabs"]):not(.twsd-keep-color) :is([role="tab"],.tab-label,.tab__label,.stk-tab-label,.stk-tab__label,.oc-tab-label,.oc-tab__label,.tab-nav > li,.tab-nav > button,.tab-nav > a,.tab_nav > li,.tab_nav > button,.tab-nav-list > li,.tab-nav-list > button,.tab-labels > li,.tab-labels > button,.tabs-nav > li,.tabs-nav > button,.stk-tab-nav > li,.stk-tab__nav > li,.oc-tab-nav > li) {
  color:var(--twsd-tab-inactive-text)!important;
  background-color:var(--twsd-tab-inactive-bg)!important;
  border-color:var(--twsd-tab-border)!important;
}
body.twsd-active.twsd-tabs #main :is(.entry-content,.article-content) :is(.wp-block-tabs,.wp-block-stork19-tabs,.wp-block-stork19-tab,.wp-block-stk-tabs,.wp-block-stk-tab,.wp-block-oc-tabs,.wp-block-oc-tab,.stk-tabs,.stk-tab,.stk_tabs,.stk_tab,.oc-tabs,.oc-tab,.oc_tabs,.oc_tab,.tab-block,.tab_block,[class*="stork19-tab"],[class*="stk-tabs"],[class*="oc-tabs"]):not(.twsd-keep-color) :is([role="tab"],.tab-label,.tab__label,.stk-tab-label,.stk-tab__label,.oc-tab-label,.oc-tab__label,.tab-nav > li,.tab-nav > button,.tab-nav > a,.tab_nav > li,.tab_nav > button,.tab-nav-list > li,.tab-nav-list > button,.tab-labels > li,.tab-labels > button,.tabs-nav > li,.tabs-nav > button,.stk-tab-nav > li,.stk-tab__nav > li,.oc-tab-nav > li):is([aria-selected="true"],[data-state="active"],.active,.is-active,.is-selected,.selected,.current) {
  color:var(--twsd-tab-active-text)!important;
  background-color:var(--twsd-tab-active-bg)!important;
  border-color:var(--twsd-tab-active-bg)!important;
}
body.twsd-active.twsd-tabs #main :is(.entry-content,.article-content) :is(.wp-block-tabs,.wp-block-stork19-tabs,.wp-block-stork19-tab,.wp-block-stk-tabs,.wp-block-stk-tab,.wp-block-oc-tabs,.wp-block-oc-tab,.stk-tabs,.stk-tab,.stk_tabs,.stk_tab,.oc-tabs,.oc-tab,.oc_tabs,.oc_tab,.tab-block,.tab_block,[class*="stork19-tab"],[class*="stk-tabs"],[class*="oc-tabs"]):not(.twsd-keep-color) :is([role="tab"],.tab-label,.tab__label,.stk-tab-label,.stk-tab__label,.oc-tab-label,.oc-tab__label,.tab-nav > li,.tab-nav > button,.tab-nav > a,.tab_nav > li,.tab_nav > button,.tab-nav-list > li,.tab-nav-list > button,.tab-labels > li,.tab-labels > button,.tabs-nav > li,.tabs-nav > button,.stk-tab-nav > li,.stk-tab__nav > li,.oc-tab-nav > li):not(:is([aria-selected="true"],[data-state="active"],.active,.is-active,.is-selected,.selected,.current)):is(:hover,:focus-visible) {
  background-color:var(--twsd-tab-hover-bg)!important;
}
body.twsd-active.twsd-tabs #main :is(.entry-content,.article-content) :is(.wp-block-tabs,.wp-block-stork19-tabs,.wp-block-stork19-tab,.wp-block-stk-tabs,.wp-block-stk-tab,.wp-block-oc-tabs,.wp-block-oc-tab,.stk-tabs,.stk-tab,.stk_tabs,.stk_tab,.oc-tabs,.oc-tab,.oc_tabs,.oc_tab,.tab-block,.tab_block,[class*="stork19-tab"],[class*="stk-tabs"],[class*="oc-tabs"]):not(.twsd-keep-color) :is(.tab-nav,.tab_nav,.tabs-nav,.tab-labels,.tab-nav-list,.stk-tab-nav,.stk-tab__nav,.oc-tab-nav,.wp-block-tab-list) > li > :is(a,button,span) {
  color:inherit!important;
  background-color:transparent!important;
}
body.twsd-active.twsd-tabs #main :is(.entry-content,.article-content) :is(.wp-block-tab-list,.stk-tab-list,.oc-tab-list,.tab-nav-list):not(.twsd-keep-color) > [role="tab"] {
  background-color:var(--twsd-tab-inactive-bg)!important;
  color:var(--twsd-tab-inactive-text)!important;
  border-color:var(--twsd-tab-border)!important;
}
body.twsd-active.twsd-tabs #main :is(.entry-content,.article-content) :is(.wp-block-tab-list,.stk-tab-list,.oc-tab-list,.tab-nav-list):not(.twsd-keep-color) > [role="tab"][aria-selected="true"] {
  background-color:var(--twsd-tab-active-bg)!important;
  color:var(--twsd-tab-active-text)!important;
  border-color:var(--twsd-tab-active-bg)!important;
}
