/* =========================================================
   TCT Header Drawer
   圓谷 年雄公式サイト
   Version 0.6.3
   Theme #00067f
   ========================================================= */

/* 1. PC ハンバーガー */
.tct-drawer-toggle { display: none; }
.tct-drawer-toggle.tct-ready {
    display: inline-flex;
    position: relative;
    width: 42px;
    height: 42px;
    margin: 0 0 0 10px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent !important;
    background-image: none !important;
    color: #00067f;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    box-shadow: none !important;
    z-index: 100002;
}
.tct-drawer-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}
#tct-drawer-toggle::before,
#tct-drawer-toggle::after {
    content: none !important;
    display: none !important;
}

/* 2. PC 背景 */
.tct-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    z-index: 99998;
}

/* 3. PC ドロワー */
.tct-header-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(420px, 92vw);
    height: 100dvh;
    background: rgba(255, 255, 255, 0.98);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform 0.48s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.48s ease;
    box-shadow: -12px 0 35px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    font-family: "Hina Mincho", serif !important;
    z-index: 99999;
}
body.tct-drawer-open { overflow: hidden; }
body.tct-drawer-open .tct-drawer-backdrop { opacity: 1; visibility: visible; }
body.tct-drawer-open .tct-header-drawer { transform: translateX(0); visibility: visible; }

/* 4. PC 閉じる */
.tct-drawer-close {
    position: absolute;
    top: 20px;
    right: 22px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    background-image: none !important;
    color: #00067f;
    font-family: "Hina Mincho", serif !important;
    font-size: 36px;
    font-weight: 300;
    box-shadow: none !important;
    cursor: pointer;
    z-index: 100005 !important;
}
#tct-drawer-close::before,
#tct-drawer-close::after {
    content: none !important;
    display: none !important;
}

/* 5. PC 内容 */
.tct-drawer-inner {
    min-height: 100%;
    padding: 84px 38px 50px;
    opacity: 0;
    transform: translateX(24px);
    transition: opacity 0.38s ease 0.12s, transform 0.48s cubic-bezier(0.22, 1, 0.36, 1) 0.12s;
    font-family: "Hina Mincho", serif !important;
}
body.tct-drawer-open .tct-drawer-inner { opacity: 1; transform: translateX(0); }
.tct-drawer-section { margin-bottom: 34px; }
.tct-drawer-section-title {
    margin-bottom: 18px;
    color: #00067f;
    font-family: "Hina Mincho", serif !important;
    font-size: 15px;
    line-height: 1.8;
}

/* 6. PC SNS */
.tct-drawer-social {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 34px;
}
.tct-drawer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    color: #00067f !important;
    border: 0 !important;
    border-radius: 0;
    text-decoration: none !important;
    background: transparent !important;
    opacity: 0;
    transform: translateY(18px) scale(0.82);
    transition: opacity 0.35s ease, transform 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}
.tct-drawer-social a .inline-icon { font-size: 21px; }
body.tct-drawer-open .tct-drawer-social a { opacity: 1; transform: translateY(0) scale(1); }
body.tct-drawer-open .tct-drawer-social a:nth-child(1) { transition-delay: 0.16s; }
body.tct-drawer-open .tct-drawer-social a:nth-child(2) { transition-delay: 0.21s; }
body.tct-drawer-open .tct-drawer-social a:nth-child(3) { transition-delay: 0.26s; }
body.tct-drawer-open .tct-drawer-social a:nth-child(4) { transition-delay: 0.31s; }
body.tct-drawer-open .tct-drawer-social a:nth-child(5) { transition-delay: 0.36s; }
.tct-drawer-links a {
    display: block;
    padding: 0;
    color: #ea7704 !important;
    -webkit-text-fill-color: #ea7704 !important;
    font-family: "Hina Mincho", serif !important;
    font-size: 16px;
    text-decoration: none !important;
    border-bottom: 0 !important;
}

.tct-drawer-links a:hover,
.tct-drawer-links a:focus {
    color: #ea7704 !important;
    -webkit-text-fill-color: #ea7704 !important;
}

/* 6-2. PC ドロワー下部のメッセージ */
.tct-drawer-footer {
    margin-top: 22px;
    padding-top: 0;
    border-top: 0;
    text-align: center;
    font-family: "Hina Mincho", serif !important;
}
.tct-drawer-motto {
    color: #00067f;
    font-size: 15px;
    line-height: 1.8;
    letter-spacing: 0.05em;
}
.tct-drawer-brand {
    margin-top: 16px;
    text-align: center;
}
.tct-drawer-brand-logo {
    display: inline-block;
    width: auto;
    max-width: min(220px, 78%);
    max-height: 68px;
    height: auto;
    object-fit: contain;
    box-shadow: none !important;
}
.tct-drawer-brand-logo[src=""] { display: none; }

/* 関連サイトは見出しとURLを近づけ、区切り線を置かない */
.tct-drawer-related {
    margin-bottom: 0;
}
.tct-drawer-related .tct-drawer-section-title {
    margin-bottom: 5px;
}

/* 7. スマホではPCドロワーを使わない */
@media screen and (max-width: 1025px) {
    .tct-drawer-toggle,
    .tct-header-drawer,
    .tct-drawer-backdrop { display: none !important; }

    #header .drawer_open,
    .header-fix .drawer_open { display: none !important; }
}

/* 8. スマホ 左メニュー背景 */
.tct-mobile-menu-backdrop,
.tct-mobile-menu-drawer { display: none; }

@media screen and (max-width: 1025px) {
    .tct-mobile-menu-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.48);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.32s ease, visibility 0.32s ease;
        z-index: 100130;
    }
    body.tct-mobile-menu-open .tct-mobile-menu-backdrop { opacity: 1; visibility: visible; }
}

/* 9. スマホ 左ドロワー */
@media screen and (max-width: 1025px) {
    .tct-mobile-menu-drawer {
        display: block;
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        width: min(86vw, 370px);
        height: 100dvh;
        background: #ffffff;
        transform: translateX(-104%);
        visibility: hidden;
        box-shadow: 12px 0 32px rgba(0, 0, 0, 0.18);
        transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.42s ease;
        font-family: "Hina Mincho", serif !important;
        z-index: 100140;
    }
    body.tct-mobile-menu-open { overflow: hidden !important; }
    body.tct-mobile-menu-open .tct-mobile-menu-drawer { transform: translateX(0); visibility: visible; }
}

/* 10. スマホ 左メニューヘッダー */
@media screen and (max-width: 1025px) {
    .tct-mobile-menu-header {
        position: relative;
        display: flex;
        align-items: center;
        height: 60px;
        padding: 0 20px;
        box-sizing: border-box;
        border-bottom: 1px solid rgba(0, 6, 127, 0.13);
    }
    .tct-mobile-menu-title {
        color: #00067f;
        font-family: "Hina Mincho", serif !important;
        font-size: 17px;
        letter-spacing: 0.06em;
    }
    .tct-mobile-menu-close {
        position: absolute;
        top: 8px;
        right: 9px;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 0 !important;
        background: transparent !important;
        background-image: none !important;
        color: #00067f !important;
        font-family: "Hina Mincho", serif !important;
        font-size: 31px;
        font-weight: 300;
        line-height: 1;
        box-shadow: none !important;
    }
    .tct-mobile-menu-close::before,
    .tct-mobile-menu-close::after { content: none !important; display: none !important; }
    .tct-mobile-menu-scroll {
        height: calc(100dvh - 60px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: calc(34px + env(safe-area-inset-bottom));
        box-sizing: border-box;
    }
}

/* 11. スマホ ホーム */
@media screen and (max-width: 1025px) {
    .tct-mobile-menu-home {
        display: flex !important;
        align-items: center;
        gap: 13px;
        min-height: 53px;
        padding: 0 22px;
        color: #00067f !important;
        font-family: "Hina Mincho", serif !important;
        font-size: 15px;
        text-decoration: none !important;
        border-bottom: 1px solid rgba(0, 6, 127, 0.12);
    }
    .tct-mobile-menu-home .tct-mobile-icon {
        width: 18px;
        height: 18px;
        margin: 0;
        fill: none !important;
        stroke: #00067f !important;
        stroke-width: 1.6;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    .tct-mobile-menu-home .tct-mobile-icon * { fill: none !important; stroke: #00067f !important; }
}

/* 12. スマホ ナビゲーション */
@media screen and (max-width: 1025px) {
    .tct-mobile-navigation,
    .tct-mobile-navigation ul,
    .tct-mobile-navigation li {
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
    }
    .tct-mobile-nav-list { width: 100%; }
    .tct-mobile-nav-list > li,
    .tct-mobile-nav-list .sub-menu > li {
        position: relative;
        border-bottom: 1px solid rgba(0, 6, 127, 0.11);
    }
    .tct-mobile-nav-list li > a {
        display: flex !important;
        align-items: center;
        min-height: 53px;
        padding: 10px 52px 10px 22px;
        box-sizing: border-box;
        color: #222222 !important;
        background: transparent !important;
        font-family: "Hina Mincho", serif !important;
        font-size: 15px;
        font-weight: 400;
        line-height: 1.5;
        text-decoration: none !important;
    }
    .tct-mobile-nav-list li > a::before,
    .tct-mobile-nav-list li > a::after { content: none !important; display: none !important; }
    .tct-mobile-nav-list .sub-menu { display: none !important; background: rgba(0, 6, 127, 0.035); }
    .tct-mobile-nav-list .tct-submenu-open > .sub-menu { display: block !important; }
    .tct-mobile-nav-list .sub-menu a { padding-left: 38px; font-size: 14px; }
    .tct-mobile-nav-list .sub-menu .sub-menu a { padding-left: 54px; font-size: 13.5px; }
}

/* 13. スマホ 子メニュー矢印 */
@media screen and (max-width: 1025px) {
    .tct-mobile-submenu-toggle {
        position: absolute;
        top: 4px;
        right: 5px;
        width: 44px;
        height: 45px;
        padding: 0;
        border: 0 !important;
        background: transparent !important;
        background-image: none !important;
        box-shadow: none !important;
        z-index: 2;
    }
    .tct-mobile-submenu-toggle::before,
    .tct-mobile-submenu-toggle::after { content: none !important; display: none !important; }
    .tct-mobile-submenu-toggle span {
        display: block;
        width: 8px;
        height: 8px;
        margin: auto;
        border-right: 1.4px solid #00067f;
        border-bottom: 1.4px solid #00067f;
        transform: rotate(-45deg);
        transition: transform 0.22s ease;
    }
    .tct-submenu-open > .tct-mobile-submenu-toggle span { transform: rotate(45deg); }
}

/* 13-2. スマホ 関連サイト */
@media screen and (max-width: 1025px) {
    .tct-mobile-menu-related {
        margin: 24px 22px 0;
        padding: 0;
        border-bottom: 0;
        font-family: "Hina Mincho", serif !important;
    }

    .tct-mobile-menu-related-title {
        margin: 0 0 4px;
        color: #00067f;
        font-size: 13px;
        line-height: 1.6;
        letter-spacing: 0.05em;
    }

    .tct-mobile-menu-related-link {
        display: inline-block !important;
        color: #ea7704 !important;
        -webkit-text-fill-color: #ea7704 !important;
        font-family: "Hina Mincho", serif !important;
        font-size: 15px;
        line-height: 1.6;
        text-decoration: none !important;
    }

    .tct-mobile-menu-related-link:hover,
    .tct-mobile-menu-related-link:focus {
        color: #ea7704 !important;
        -webkit-text-fill-color: #ea7704 !important;
    }
}

/* 14. スマホ メニューSNS */
@media screen and (max-width: 1025px) {
    .tct-mobile-menu-sns-title {
        margin: 22px 22px 12px;
        color: #00067f;
        font-family: "Hina Mincho", serif !important;
        font-size: 13px;
        text-align: center;
        letter-spacing: 0.05em;
    }
    .tct-mobile-menu-sns {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 14px;
    }
    .tct-mobile-menu-sns a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        color: #00067f !important;
        border: 0 !important;
        border-radius: 0;
        background: transparent !important;
        text-decoration: none !important;
    }
    .tct-mobile-menu-sns .inline-icon { font-size: 19px; }
    .tct-mobile-menu-motto {
        margin: 26px 20px 0;
        color: #00067f;
        font-family: "Hina Mincho", serif !important;
        font-size: 13px;
        line-height: 1.75;
        letter-spacing: 0.05em;
        text-align: center;
    }

    .tct-mobile-menu-brand {
        margin: 14px 20px 0;
        text-align: center;
    }
    .tct-mobile-menu-brand-logo {
        display: inline-block;
        width: auto;
        max-width: min(190px, 74%);
        max-height: 58px;
        height: auto;
        object-fit: contain;
        box-shadow: none !important;
    }
    .tct-mobile-menu-brand-logo[src=""] { display: none; }
}

/* 15. スマホ下部常駐バー */
.tct-mobile-bar { display: none; }
@media screen and (max-width: 1025px) {
    .tct-mobile-bar {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        display: grid !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: rgba(0, 6, 127, 0.96) !important;
        border: 0 !important;
        border-top: 1px solid rgba(255, 255, 255, 0.14) !important;
        box-shadow: 0 -3px 14px rgba(0, 0, 0, 0.12) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        font-family: "Hina Mincho", serif !important;
        z-index: 99990 !important;
    }
    .tct-mobile-bar-single { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
    .tct-mobile-bar-page { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}

/* 16. スマホ下部バー 項目 */
@media screen and (max-width: 1025px) {
    .tct-mobile-bar-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        min-width: 0 !important;
        min-height: 58px !important;
        margin: 0 !important;
        padding: 6px 1px 5px !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        background-image: none !important;
        color: #ffffff !important;
        font-family: "Hina Mincho", serif !important;
        text-decoration: none !important;
        box-shadow: none !important;
    }
    .tct-mobile-bar-item::before,
    .tct-mobile-bar-item::after { content: none !important; display: none !important; }
    .tct-mobile-bar-item:active { background: rgba(255, 255, 255, 0.10) !important; }
}

/* 17. スマホ下部バー SVG */
@media screen and (max-width: 1025px) {
    .tct-mobile-bar-item .tct-mobile-icon {
        display: block !important;
        width: 20px !important;
        height: 20px !important;
        margin: 0 0 5px !important;
        fill: none !important;
        stroke: #ffffff !important;
        stroke-width: 1.55 !important;
        stroke-linecap: round !important;
        stroke-linejoin: round !important;
    }
    .tct-mobile-bar-item .tct-mobile-icon * {
        fill: none !important;
        stroke: #ffffff !important;
        stroke-width: 1.55 !important;
        stroke-linecap: round !important;
        stroke-linejoin: round !important;
        vector-effect: non-scaling-stroke;
    }
}

/* 18. スマホ下部バー 文字 */
@media screen and (max-width: 1025px) {
    .tct-mobile-bar-label {
        display: block !important;
        color: rgba(255, 255, 255, 0.96) !important;
        font-family: "Hina Mincho", serif !important;
        font-size: 10.5px !important;
        font-weight: 400 !important;
        line-height: 1.1 !important;
        white-space: nowrap !important;
    }
}

/* 19. 本文はバーの裏を通過 */
@media screen and (max-width: 1025px) {
    html,
    body,
    body.single-post,
    body.page,
    body.home,
    body.blog,
    body.category,
    body.tag,
    body.search,
    body.archive { padding-bottom: 0 !important; }
}

/* 20. 前後記事なし */
.tct-mobile-bar-disabled { opacity: 0.28 !important; pointer-events: none !important; }

/* 21. 共有 背景 */
@media screen and (max-width: 1025px) {
    body.tct-mobile-utility-open { overflow: hidden !important; }
    .tct-mobile-utility-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.42);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.28s ease, visibility 0.28s ease;
        z-index: 100100;
    }
    .tct-mobile-utility-backdrop.is-open { opacity: 1; visibility: visible; }
}

/* 22. 共有パネル */
@media screen and (max-width: 1025px) {
    .tct-mobile-utility-sheet {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        padding: 34px 24px calc(28px + env(safe-area-inset-bottom));
        box-sizing: border-box;
        background: #ffffff;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -12px 35px rgba(0, 0, 0, 0.16);
        transform: translateY(105%);
        visibility: hidden;
        transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.38s ease;
        font-family: "Hina Mincho", serif !important;
        z-index: 100101;
    }
    .tct-mobile-utility-sheet.is-open { transform: translateY(0); visibility: visible; }
    .tct-mobile-sheet-close {
        position: absolute;
        top: 9px;
        right: 14px;
        width: 40px;
        height: 40px;
        padding: 0;
        border: 0 !important;
        background: transparent !important;
        color: #00067f !important;
        font-size: 30px;
        box-shadow: none !important;
    }
    .tct-mobile-sheet-close::before,
    .tct-mobile-sheet-close::after { content: none !important; display: none !important; }
    .tct-mobile-sheet-title {
        margin-bottom: 22px;
        color: #00067f;
        font-family: "Hina Mincho", serif !important;
        font-size: 17px;
        text-align: center;
    }
}

/* 23. 共有6アイコン */
@media screen and (max-width: 1025px) {
    .tct-mobile-share-icons {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        align-items: center;
        justify-items: center;
        gap: 6px;
    }
    .tct-share-icon {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 44px !important;
        height: 44px !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 50% !important;
        color: #ffffff !important;
        text-decoration: none !important;
        box-shadow: none !important;
    }
    .tct-share-icon::before,
    .tct-share-icon::after { content: none !important; display: none !important; }
    .tct-share-icon .inline-icon { color: #ffffff !important; font-size: 20px !important; }
    .tct-share-x { background: #111111 !important; }
    .tct-share-facebook { background: #1877f2 !important; }
    .tct-share-hatena { background: #00a4de !important; }
    .tct-share-pinterest { background: #e60023 !important; }
    .tct-share-line { background: #06c755 !important; }
    .tct-share-copy { background: #6d6d6d !important; }
    .tct-hatena-mark {
        color: #ffffff !important;
        font-family: Arial, sans-serif !important;
        font-size: 17px !important;
        font-weight: 700 !important;
    }
    .tct-share-copy svg {
        width: 21px;
        height: 21px;
        fill: none !important;
        stroke: #ffffff !important;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    .tct-mobile-copy-status {
        min-height: 22px;
        margin-top: 12px;
        color: #00067f;
        font-family: "Hina Mincho", serif !important;
        font-size: 12px;
        text-align: center;
    }
}

/* 24. 新しい記事カードを下部メニューの上へ逃がす */
@media screen and (max-width: 1025px) {
    .tct-mobile-recommend-card {
        /* 下部バー58px + 12pxの間隔 */
        bottom: calc(58px + 12px) !important;
    }
}

/* 25. 動きを減らす設定 */
@media (prefers-reduced-motion: reduce) {
    .tct-header-drawer,
    .tct-drawer-backdrop,
    .tct-drawer-inner,
    .tct-drawer-social a,
    .tct-mobile-menu-drawer,
    .tct-mobile-menu-backdrop,
    .tct-mobile-utility-backdrop,
    .tct-mobile-utility-sheet {
        transition: none !important;
    }
}


/* =========================================================
   29. スマホ：XWRITE標準の重複UIだけを限定非表示
   TCT下部メニュー・上部検索は維持
   ========================================================= */

@media screen and (max-width: 1025px) {

    /*
     * XWRITE標準のモバイル開閉メニューボタンだけを非表示。
     * .drawer__open を全体指定せず、ヘッダー内に限定する。
     */
    #header .drawer__open,
    .gnav-fix .drawer__open {
        display: none !important;
    }

    /* XWRITE標準「トップに戻る」ボタンだけを非表示 */
    .pagetop {
        display: none !important;
    }

}


/* =========================================================
   30. スマホ：上部ヘッダーをTCT下部メニュー仕様へ整理
   ・キャッチ帯を全幅化
   ・XWRITE標準モバイルメニューを完全に非表示
   ・検索を右端へ寄せるためヘッダー幅を解放
   ========================================================= */

@media screen and (max-width: 767px) {

    /* 旧メニュー用に空けていた右60pxを廃止し、キャッチ帯を全幅にする */
    #header::before {
        width: 100% !important;
        max-width: none !important;
        flex: 0 0 100% !important;
    }

    /* XWRITE標準のスマホメニュー開閉ボタンはTCT下部メニューに統合 */
    .drawer_open,
    .drawer__open {
        display: none !important;
    }

    /* ロゴ＋検索の段を画面幅いっぱい使えるようにする */
    #header > .container,
    #header .headerInfo,
    .header-fix .headerInfo,
    .gnav-fix .headerInfo,
    [id*="header-fix"] .headerInfo {
        width: 100% !important;
        max-width: none !important;
        box-sizing: border-box !important;
    }
}


/* =========================================================
   31. スマホ上部ヘッダー 最終強制調整
   ※追加CSSより後にJSでも同内容を注入するため、
     「答えはきっと…」帯と検索位置を確実に反映する。
   ========================================================= */

@media screen and (max-width: 767px) {

    html body.tct-mobile-header-final #header::before {
        width: 100vw !important;
        max-width: 100vw !important;
        flex: 0 0 100vw !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    html body.tct-mobile-header-final #header .tct-xwrite-menu-hidden {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        flex: 0 0 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        visibility: hidden !important;
    }

    html body.tct-mobile-header-final #header > .container,
    html body.tct-mobile-header-final #header .headerInfo {
        width: 100% !important;
        max-width: none !important;
        box-sizing: border-box !important;
    }

    html body.tct-mobile-header-final #header .tct-xwrite-search-row {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        max-width: none !important;
        box-sizing: border-box !important;
    }

    html body.tct-mobile-header-final #header .tct-xwrite-search-right {
        margin-left: auto !important;
        margin-inline-start: auto !important;
        margin-right: 16px !important;
        margin-inline-end: 16px !important;
        flex: 0 0 auto !important;
    }
}


/* =========================================================
   32. スマホ下部バーと重なるフローティングカードを退避
   ・記事の「この記事も読んでみませんか？」
   ・トップページ等の通知カード
   ========================================================= */

@media screen and (max-width: 1025px) {

    .tct-mobile-recommend-card,
    .tct-mobile-floating-card {
        bottom: calc(58px + 12px) !important;
    }
}


/* =========================================================
   33. v0.5.6 スマホ上部検索：ロゴ左右余白を対称化
   ・既存のXWRITE検索機能はそのまま使用
   ・JSでロゴ左余白を測定し、検索右余白を同じ値にする
   ========================================================= */

@media screen and (max-width: 767px) {

    html body.tct-mobile-header-final #header,
    html body.tct-mobile-header-final #header > .container,
    html body.tct-mobile-header-final #header .headerInfo,
    html body.tct-mobile-header-final #header .tct-xwrite-search-row {
        overflow: visible !important;
    }

    html body.tct-mobile-header-final #header .tct-xwrite-search-right {
        position: relative !important;
        z-index: 20 !important;
        margin-left: 0 !important;
        margin-inline-start: 0 !important;
        margin-right: 0 !important;
        margin-inline-end: 0 !important;
    }
}


/* =========================================================
   34. PCヘッダー：全ページを同じ全幅基準に固定
   ・トップページを含む全ページ
   ・通常ヘッダー
   ・スクロール後の追従ヘッダー
   ========================================================= */

@media screen and (min-width: 1026px) {

    /* 通常ヘッダー：ページ種別を問わず全幅 */
    html body #header > .container,
    html body #header .headerInfo,
    html body #header .headerInfo > .container {
        width: 100% !important;
        max-width: none !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* スクロール後の追従ヘッダーも同じ基準 */
    html body #header.header-fix > .container,
    html body #header.header-fix .headerInfo,
    html body .header-fix > .container,
    html body .header-fix .headerInfo,
    html body .gnav-fix > .container,
    html body .gnav-fix .headerInfo,
    html body [id*="header-fix"] > .container,
    html body [id*="header-fix"] .headerInfo,
    html body [class*="header-fix"] > .container,
    html body [class*="header-fix"] .headerInfo {
        width: 100% !important;
        max-width: none !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}
