/*
    Theme Name: SWELL Child
    Theme URI: https://swell-theme.com/
    Description: SWELLの子テーマ
    Version: 1.0.1
    Template: swell
    Author: Your Name
    Author URI: https://example.com/
    Text Domain: swell-child
    License: GNU General Public License
    License URI: http://www.gnu.org/licenses/gpl.html
*/

*,
::before,
::after,
body,
h1, h2, h3, h4, h5, h6,
input, button, select, textarea {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif !important;
}

#body_wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif !important;
}

/* モバイルメニュー展開時の背面スクロール固定 */
body.is-menu-open,
body.is-menu-open #body_wrap {
    overflow: hidden !important;
    height: 100vh !important;
}

/* ==========================================================================
   ymlcom Common Elements Styles (共通パーツ基本デザイン)
   ========================================================================== */

/* 左上共通ヘッダーメニューの基本スタイル */
.top-header-menu {
    max-width: 300px;
}
.top-header-menu ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.top-header-menu li {
    margin-bottom: 8px !important;
    list-style: none !important;
}
/* 子メニュー（サブメニュー）のインデントと余白調整 */
.top-header-menu ul ul,
.top-header-menu .sub-menu {
    padding-left: 14px !important;
    margin-top: 6px !important;
    margin-bottom: 12px !important;
}
.top-header-menu ul ul li,
.top-header-menu .sub-menu li {
    margin-bottom: 0 !important;
}
.top-header-menu ul ul a,
.top-header-menu .sub-menu a {
    font-size: 11px !important;
    opacity: 0.85;
}
.top-header-menu ul ul a:hover,
.top-header-menu .sub-menu a:hover {
    opacity: 1;
}
.top-header-menu a,
.top-header-menu p,
.top-header-menu span {
    color: #666666 !important;
    text-decoration: none !important;
    font-size: 13px !important;
    transition: color 0.3s ease, opacity 0.3s ease;
    display: inline-block;
    font-weight: normal;
}
.top-header-menu a:hover {
    color: #000000 !important;
}

/* 右端縦書きコピーライトの基本スタイル */
.top-vertical-text {
    display: flex;
    align-items: flex-start;
}
.vertical-inner {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 11px;
    color: #999999;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 500;
    white-space: nowrap;
}

/* 左下共通ロゴエリアの基本スタイル */
.top-footer-logo {
    width: 150px; /* 表示最大幅 */
    height: 60px;  /* 表示最大高さ */
    display: flex;
    align-items: flex-end; /* 常に下揃え */
    justify-content: flex-start; /* 常に左揃え */
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), filter 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}
.top-logo-img {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain;
    width: auto !important;
    height: auto !important;
    display: block;
}

/* ハンバーガートリガー（PC時は非表示） */
.menu-trigger {
    display: none;
}

/* ==========================================================================
   ymlcom Custom Front Page Styles (フロントページ専用配置)
   ========================================================================== */

/* フロントページ全体の基本レイアウト */
#body_wrap.ymlcom-front-page {
    background-color: #ffffff;
    color: #333333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.6;
    letter-spacing: 0.05em;
    height: 100vh !important; /* FV自体を100vhにする */
    overflow: hidden !important; /* スクロールを禁止し画面内に固定 */
}

/* フロントページ全体のコンテナ */
.ymlcom-front-page .top-layout-container {
    box-sizing: border-box;
    height: 100%;
    padding: 60px 80px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* フロントページにおける各パーツの位置決め */
.ymlcom-front-page .top-header-menu {
    position: absolute;
    top: 60px;
    left: 80px;
    z-index: 10;
}

.ymlcom-front-page .top-vertical-text {
    position: absolute;
    top: 60px;
    right: 60px;
    z-index: 10;
    height: calc(100% - 120px);
}

.ymlcom-front-page .top-footer-logo {
    position: absolute;
    bottom: 60px;
    left: 80px;
    z-index: 10;
}

/* フロントページ メインコンテンツ（中央のビジュアル） */
.ymlcom-front-page .top-main-content {
    width: 100%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ymlcom-front-page .main-content-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ビジュアル画像・スライドショーエリア */
.ymlcom-front-page .top-main-visual-area {
    width: 60vw;   /* 横幅最大60% */
    height: 70vh;  /* 縦幅最大70% */
    margin: 40px auto;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ymlcom-front-page .top-works-slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.ymlcom-front-page .slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 1;
    transition: opacity 1.5s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ymlcom-front-page .slide-item.is-active {
    opacity: 1;
    z-index: 2;
}

.ymlcom-front-page .slide-img-wrapper {
    position: relative;
    max-width: 100%;
    height: 85%; /* 高さをスライダー全体の 85% に固定し、上下に確実な余白空間を作る */
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.ymlcom-front-page .slide-img {
    max-width: 100%;
    max-height: 100%; /* 親の高さ（全体の85%）の100%以内に制限 */
    width: auto;
    height: auto;
    display: block;
}

.ymlcom-front-page .dummy-main-visual {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ymlcom-front-page .dummy-visual-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* スライダー右下のタグ表示 */
.ymlcom-front-page .slide-tags {
    position: absolute;
    bottom: -30px;
    right: 0;
    z-index: 10;
    display: flex;
    justify-content: flex-end;
}

.ymlcom-front-page .slide-tag-item {
    font-size: 11px;
    color: #888888;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
    transition: color 0.3s ease;
}

/* ==========================================================================
   ymlcom Sub Page Styles (下層ページ専用配置・競合対策)
   ========================================================================== */

/* 下層ページ全体のレイアウトとスクロール設定 */
#body_wrap.ymlcom-sub-page {
    height: auto !important;
    overflow-y: auto !important; /* スクロールを許可 */
}

.ymlcom-sub-page .top-layout-container {
    height: auto;
    min-height: 100vh;
    padding: 60px 80px;
    box-sizing: border-box;
    display: block; /* 全体フローを通す */
}

/* スクロールしても四隅のパーツを画面に固定表示する */
.ymlcom-sub-page .top-header-menu {
    position: fixed;
    top: 60px;
    left: 80px;
    z-index: 10;
}

.ymlcom-sub-page .top-footer-logo {
    position: fixed;
    bottom: 60px;
    left: 80px;
    z-index: 10;
}
.ymlcom-sub-page .top-footer-logo.is-scrolled {
    opacity: 0 !important;
    filter: blur(8px) !important;
    pointer-events: none !important;
}

.ymlcom-sub-page .top-vertical-text {
    position: fixed;
    top: 60px;
    right: 60px;
    height: calc(100% - 120px);
    z-index: 10;
}

/* 下層ページのメインコンテンツエリアの配置 */
.ymlcom-sub-page .top-main-content {
    width: 100%;
    max-width: 100%;
    margin-top: 80px; /* メニュー被り防止 */
    margin-bottom: 80px;
    display: block; /* フレックスを解除 */
}

/* SWELL標準レイアウトCSSのバッティング干渉を強力に上書き解除 */
.ymlcom-sub-page #content.l-content {
    display: block !important; /* SWELLの横並びフレックスを無効化 */
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.ymlcom-sub-page .l-mainContent {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 記事本文コンテンツ（通常要素）、タイトル、記事ヘッダー、メタ情報、アイキャッチ、コメント等を最大幅900pxに制限して左右中央寄せ */
.ymlcom-sub-page .post_content,
.ymlcom-sub-page h1.c-pageTitle,
.ymlcom-sub-page .c-pageTitle,
.ymlcom-sub-page .p-articleHead,
.ymlcom-sub-page .p-articleMetas,
.ymlcom-sub-page .c-postThumb,
.ymlcom-sub-page .p-articleThumb,
.ymlcom-sub-page .p-shareBtns,
.ymlcom-sub-page .l-articleBottom,
.ymlcom-sub-page #comments {
    max-width: 900px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* 下層ページのタイトルデザインをWORKSアーカイブ見出しと統一 */
.ymlcom-sub-page h1.c-pageTitle {
    max-width: 860px !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    font-size: 24px !important;
    font-weight: normal !important;
    letter-spacing: 0.05em !important;
    margin: 40px auto 20px auto !important;
    color: #333333 !important;
    border-bottom: 1px solid #eeeeee !important;
    padding-bottom: 12px !important;
    text-align: left !important;
    float: none !important;
}

/* SWELLのデフォルトスタイル (data-style) の不要な装飾をリセット */
.ymlcom-sub-page h1.c-pageTitle[data-style] {
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 1px solid #eeeeee !important;
    float: none !important;
    display: block !important;
}

.ymlcom-sub-page h1.c-pageTitle[data-style] .c-pageTitle__inner {
    border: none !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: inline !important;
}

.ymlcom-sub-page h1.c-pageTitle .c-pageTitle__inner {
    display: inline !important;
    padding: 0 !important;
    border: none !important;
    float: none !important;
}

.ymlcom-sub-page h1.c-pageTitle .c-pageTitle__subTitle {
    font-size: 14px !important;
    font-weight: normal !important;
    font-style: normal !important;
    margin-left: 15px !important;
    color: #888888 !important;
}

/* SWELLのフルワイズ（全幅）ブロックのみ、900pxの幅制限を突き破って画面幅100%に広げる */
.ymlcom-sub-page .post_content > .-fullwidth,
.ymlcom-sub-page .post_content > .alignfull {
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* ==========================================================================
   ymlcom Works Category Archive Styles (一覧ページ用)
   ========================================================================== */

/* アーカイブヘッダー */
.works-archive-header {
    max-width: 900px !important;
    margin: 40px auto 20px auto !important;
    width: 100% !important;
    box-sizing: border-box;
    padding-left: 20px;
    padding-right: 20px;
}
.works-archive-header .c-pageTitle {
    font-size: 24px !important;
    font-weight: normal !important;
    letter-spacing: 0.05em !important;
    margin: 0 !important;
    color: #333333 !important;
    border-bottom: 1px solid #eeeeee;
    padding-bottom: 12px;
}

/* メイソンリー（空間写真）用コンテナ */
.works-masonry-container {
    max-width: 900px !important;
    margin: 0 auto !important;
    width: 100% !important;
    box-sizing: border-box;
}
.works-masonry-grid {
    margin: 0 auto !important;
    width: 100% !important;
    display: block !important;
}
.works-masonry-grid .grid-item {
    width: 33.333% !important; /* 3カラム */
    box-sizing: border-box !important;
    padding: 12px !important; /* カラム間余白 */
    float: left;
}

/* 無限スクロールのフェードインアニメーション用 */
.works-masonry-grid .grid-item.is-new {
    opacity: 0;
    transform: translateY(20px);
}
.works-masonry-grid .grid-item.is-loaded {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* デザイン用グリッドコンテナ */
.works-design-container {
    max-width: 900px !important;
    margin: 0 auto !important;
    width: 100% !important;
    box-sizing: border-box;
    padding-left: 20px;
    padding-right: 20px;
}
.works-design-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3カラム */
    gap: 24px;
    width: 100%;
    margin-bottom: 40px;
}

/* 造形デザイン（design）用グリッドカード固有スタイル */
.design-card-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; /* 正方形にする */
    border: 1px solid #e2e2e2 !important; /* 1pxの薄いグレーの枠線 */
    padding: 20px !important; /* 内側に20pxのpadding */
    box-sizing: border-box !important;
    background-color: #ffffff !important; /* 背景は白 */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    overflow: hidden;
}
.design-card-img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important; /* 枠線とpaddingの内側に収める */
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1) !important;
}
.work-card-link:hover .design-card-img {
    transform: scale(1.03) !important; /* ホバー時のズーム */
}
.design-card-info {
    padding: 12px 4px 8px 4px !important;
}
.design-card-info .work-card-title {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #333333 !important;
    margin: 0 0 4px 0 !important;
    line-height: 1.4 !important;
}
.design-card-info .work-card-tags {
    font-size: 10px !important;
    color: #999999 !important;
    margin: 0 !important;
}

/* 作品個別カードの基本スタイル */
.work-card-item {
    box-sizing: border-box;
}
.work-card-link {
    text-decoration: none !important;
    color: inherit !important;
    display: block;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
.work-card-link:hover {
    transform: translateY(-4px);
}
.work-card-img-wrapper {
    width: 100%;
    overflow: hidden;
    background-color: #fafafa;
    display: flex;
    justify-content: center;
    align-items: center;
}
.work-card-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}
.work-card-link:hover .work-card-img {
    transform: scale(1.02);
}
.work-card-info {
    padding: 12px 4px 8px 4px;
}
.work-card-title {
    font-size: 13px !important;
    font-weight: 500 !important;
    margin: 0 0 4px 0 !important;
    color: #333333 !important;
    line-height: 1.4 !important;
    letter-spacing: 0.05em !important;
}
.work-card-tags {
    font-size: 10px !important;
    color: #999999 !important;
    margin: 0 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
}

/* 無限スクロールローダー */
.infinite-scroll-trigger {
    text-align: center;
    padding: 40px 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.infinite-scroll-trigger.is-loading {
    opacity: 1;
    visibility: visible;
}
.loader-inner {
    display: flex;
    gap: 8px;
}
.loader-dot {
    width: 8px;
    height: 8px;
    background-color: #999999;
    border-radius: 50%;
    animation: loader-bounce 1.4s infinite ease-in-out both;
}
.loader-dot:nth-child(1) { animation-delay: -0.32s; }
.loader-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes loader-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}

/* デザイン用ページネーション */
.works-pagination-wrapper {
    margin: 40px 0;
    display: flex;
    justify-content: center;
}
.works-pagination-wrapper .navigation.pagination {
    display: block;
}
.works-pagination-wrapper .nav-links {
    display: flex;
    gap: 12px;
}
.works-pagination-wrapper a.page-numbers,
.works-pagination-wrapper span.page-numbers {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    font-size: 13px;
    color: #666666;
    text-decoration: none;
    border: 1px solid #eeeeee;
    transition: all 0.3s ease;
}
.works-pagination-wrapper span.page-numbers.current,
.works-pagination-wrapper a.page-numbers:hover {
    background-color: #333333;
    color: #ffffff;
    border-color: #333333;
}

/* ==========================================================================
   Responsive Styles (レスポンシブ対応 - 最大幅768px)
   ========================================================================== */
@media screen and (max-width: 768px) {
    /* モバイル時：スクロールを有効にする */
    #body_wrap.ymlcom-front-page {
        height: auto !important;
        overflow-y: auto !important;
    }

    .ymlcom-front-page .top-layout-container {
        padding: 40px 30px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        height: auto;
    }
    
    .ymlcom-front-page .top-header-menu {
        order: 1;
        width: 100%;
        margin-bottom: 20px;
        position: static;
    }
    
    .ymlcom-front-page .top-main-content {
        order: 2;
        margin-top: 0;
        align-items: center;
        width: 100%;
    }
    
    .ymlcom-front-page .main-content-inner {
        align-items: center;
    }

    /* スマホ表示時、SWELLのデフォルト#contentの横幅が0に潰れるバグを回避 */
    .ymlcom-front-page #content.l-content {
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .ymlcom-front-page .top-main-visual-area {
        width: 100% !important;
        height: 50vh !important;
        margin: 20px 0 !important;
        display: block !important; /* フレックスボックスによる幅潰れバグを防ぐため block に変更 */
    }
    .ymlcom-front-page .top-works-slider {
        width: 100% !important;
        height: 100% !important;
    }
    .ymlcom-front-page .slide-item {
        width: 100% !important;
        height: 100% !important;
    }
    
    /* スマホ表示時のスライダー画像潰れ対策（フレックスバグ回避） */
    .ymlcom-front-page .slide-img-wrapper {
        display: flex !important;
        width: 100% !important;
        height: 85% !important;
        justify-content: center !important;
        align-items: center !important;
    }
    .ymlcom-front-page .slide-img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }

    .ymlcom-front-page .slide-tags {
        bottom: -25px;
        right: 0;
    }
    
    .ymlcom-front-page .top-footer-logo {
        order: 3;
        position: static;
        margin-top: 50px;
        margin-bottom: 10px;
        width: 120px;
        height: 45px;
        display: flex;
        justify-content: center; /* モバイルでは中央寄せ */
        align-items: center;
    }
    
    .ymlcom-front-page .top-vertical-text {
        order: 4;
        position: static;
        margin-top: 10px;
        margin-bottom: 40px;
        width: 100%;
        text-align: center;
        height: auto;
    }
    
    .ymlcom-front-page .vertical-inner,
    .ymlcom-sub-page .vertical-inner {
        writing-mode: horizontal-tb; /* 縦書きを横書きにリセット */
        white-space: normal;
        display: inline-block;
    }

    /* ハンバーガーメニュー用のトグルボタン（左側） */
    .menu-trigger {
        display: block;
        position: fixed;
        top: 40px;
        left: 30px;
        width: 30px;
        height: 30px;
        background: none;
        border: none;
        padding: 0;
        cursor: pointer;
        z-index: 100;
    }

    .menu-trigger span {
        display: block;
        position: absolute;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: #333333;
        transition: all 0.3s ease-in-out;
    }

    .menu-trigger span:nth-child(1) { top: 6px; }
    .menu-trigger span:nth-child(2) { top: 14px; }
    .menu-trigger span:nth-child(3) { top: 22px; }

    /* メニューオープン時の三本線アニメーション（✕印） */
    .menu-trigger.is-active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-trigger.is-active span:nth-child(2) {
        opacity: 0;
    }
    .menu-trigger.is-active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* メニュー内容の全画面展開（左側からのオーバーレイ） */
    .menu-content-wrapper {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        z-index: 95;
        display: flex;
        justify-content: center;
        align-items: center;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .top-header-menu.is-active .menu-content-wrapper {
        opacity: 1;
        visibility: visible;
    }

    /* メニュー展開時のリスト調整 */
    .menu-content-wrapper ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 24px;
        padding: 0;
        margin: 0;
        list-style: none;
    }

    .menu-content-wrapper a {
        font-size: 18px !important;
        color: #333333 !important;
        font-weight: 500 !important;
        letter-spacing: 0.1em;
        text-decoration: none;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif !important;
    }

    .top-header-menu li {
        text-align: center !important;
    }

    /* スマホメニュー展開時の子メニュー（サブメニュー）のレイアウト・視認性調整 */
    .menu-content-wrapper .sub-menu,
    .menu-content-wrapper ul ul {
        padding-left: 0 !important; /* 中央寄せにするため左インデントを解除 */
        margin-top: 12px !important;
        margin-bottom: 0 !important;
        gap: 12px !important; /* 子メニュー同士の間隔は少し狭く */
    }
    .menu-content-wrapper .sub-menu a,
    .menu-content-wrapper ul ul a {
        font-size: 13px !important; /* 画面に収まる適度なサイズに */
        opacity: 0.75;
        font-weight: normal !important;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif !important;
    }

    /* モバイル下層ページ用 */
    .ymlcom-sub-page .top-layout-container {
        padding: 40px 30px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        height: auto;
    }
    
    .ymlcom-sub-page .top-header-menu {
        position: static;
        margin-bottom: 20px;
        width: 100%;
        order: 1;
    }
    
    .ymlcom-sub-page .top-main-content {
        margin-top: 0;
        margin-bottom: 0;
        width: 100%;
        order: 2;
    }
    
    .ymlcom-sub-page .top-footer-logo {
        position: static;
        margin-top: 50px;
        margin-bottom: 10px;
        width: 120px;
        height: 45px;
        display: flex;
        justify-content: center;
        align-items: center;
        order: 3;
    }
    .ymlcom-sub-page .top-footer-logo.is-scrolled {
        opacity: 1 !important;
        filter: none !important;
        pointer-events: auto !important;
    }
    
    .ymlcom-sub-page .top-vertical-text {
        position: static;
        margin-top: 10px;
        margin-bottom: 40px;
        width: 100%;
        text-align: center;
        height: auto;
        order: 4;
    }
    
    .ymlcom-sub-page #content.l-content {
        margin-top: 40px !important;
    }
    
    .ymlcom-sub-page .post_content,
    .ymlcom-sub-page .p-articleHead,
    .ymlcom-sub-page .p-articleMetas,
    .ymlcom-sub-page .c-postThumb,
    .ymlcom-sub-page .p-articleThumb,
    .ymlcom-sub-page .p-shareBtns,
    .ymlcom-sub-page .l-articleBottom,
    .ymlcom-sub-page #comments {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .ymlcom-sub-page h1.c-pageTitle {
        font-size: 20px !important;
        margin: 20px auto 10px auto !important;
    }

    /* 一覧ページ（スマホ用調整） */
    .works-archive-header {
        margin: 20px auto 10px auto !important;
        padding-left: 0;
        padding-right: 0;
    }
    .works-archive-header .c-pageTitle {
        font-size: 20px !important;
    }
    .works-masonry-container {
        padding-left: 0;
        padding-right: 0;
    }
    .works-masonry-grid .grid-item {
        width: 50% !important; /* スマホ時は2カラム */
        padding: 6px !important; /* 隙間を狭く */
    }
    .works-design-container {
        padding-left: 0;
        padding-right: 0;
    }
    .works-design-grid {
        grid-template-columns: repeat(2, 1fr); /* スマホ時は2カラム */
        gap: 16px;
    }
    .design-card-img-wrapper {
        padding: 12px !important; /* スマホ時はpaddingを少し狭くして画像表示領域を確保 */
    }
}