/* ==========================================
   0. 外部フォントのインポート
   ========================================== */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@100..800&family=Roboto+Mono:wght@100..700&display=swap');

/* ==========================================
   1. 全体共通リセット＆ベーススタイル
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #FFFFFF;
    /* 欧文は Google Sans Flex、日本語は游ゴシック（YuGothic）に設定 */
    font-family: 'Google Sans Flex', "Yu Gothic Medium", "Yu Gothic", "YuGothic", "ヒラギノ角ゴ Pro W3", sans-serif;
    /* ベースのフォントウェイト（太さ）を 400 (Regular) に指定 */
    font-weight: 400;
    color: #333333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* 上下のパディングを4.5vw、左右の余白を8.333vwに指定 */
    padding: 4.5vw 8.333vw; 
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.3s ease;
}

img.is-loaded {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    img {
        opacity: 1;
        transition: transform 0.3s ease;
    }

    .project-list-item,
    .project-list-item::after,
    .project-list-title,
    .project-list-type,
    .project-list-role {
        transition: none;
    }
}

/* ==========================================
   2. ヘッダーセクション（両ページ共通）
   ========================================== */
.header {
    width: 100%;
}

.logo,
.header-role,
.header-contact,
.header-menu {
    font-family: "Roboto Mono", monospace;
    font-size: 13px;
    font-weight: 450;
    line-height: 1;
    letter-spacing: 0;
    color: #333333;
    font-variant-ligatures: none;
    min-height: 1em;
}

.header-role {
    white-space: nowrap;
}

/* ==========================================
   3. トップページ（index.html）用レイアウト
   基準幅 1440px のとき 1カラム 60px。
   ブラウザ幅に対して 24 カラムを等分するので、
   サムネイル幅もカラム余白もウィンドウに合わせて変わる。
   左右マージンは 1カラム。1440px のとき 60px。
   行は 2枚 → 3枚 を交互。サムネイル間は空の 1カラム。
   2枚行は右が大きい／左が大きいを交互。サムネイルはすべて横向き。
   ========================================== */
html {
    width: 100%;
    background-color: #FFFFFF;
}

body.home,
body.project {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    --pad-top: 80px;
    padding: 24px 0 calc(100% * 24 / 1440);
}

body.home .site {
    opacity: 0;
    transition: opacity 0.6s ease;
}

body.home.is-ready .site {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    body.home .site {
        transition: none;
    }
}

body.home .site,
body.project .site {
    position: relative;
    z-index: 1;
    width: 100%;
    margin: 0;
    container-type: inline-size;
    /* 左右マージン。1440px のとき 60px */
    --side: calc(100cqi * 60 / 1440);
    /* サムネイル間隔。1440px のとき 60px */
    --gutter: calc(100cqi * 60 / 1440);
    --gutter-3: var(--gutter);
    /* 3列サムネイルの1列幅。中央列の左端は Upsurge Studios と一致する */
    --masonry-col: calc((100cqi - 2 * var(--side) - 2 * var(--gutter)) / 3);
    --col-2-start: calc(var(--side) + var(--masonry-col) + var(--gutter));
}

body.home .header,
body.project .header {
    width: 100%;
    margin: 0 0 var(--pad-top);
    display: grid;
    grid-template-columns: repeat(24, minmax(0, 1fr));
    align-items: center;
    position: relative;
    z-index: 120;
}

body.home .logo,
body.project .logo {
    grid-column: 2 / 10;
    grid-row: 1;
    justify-self: start;
    min-width: 18ch;
    z-index: 1;
}

body.home .header-role,
body.project .header-role {
    grid-column: 1 / 22;
    grid-row: 1;
    padding-left: var(--col-2-start);
    box-sizing: border-box;
    pointer-events: none;
}

body.home .header-actions,
body.project .header-actions {
    grid-column: 22 / 24;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
    min-width: 0;
    white-space: nowrap;
    z-index: 1;
}

.header-contact {
    flex-shrink: 0;
}

.header-menu {
    display: none;
    --menu-hit: 14px;
    position: relative;
    top: -1px;
    flex-shrink: 0;
    box-sizing: content-box;
    width: 16px;
    height: 16px;
    padding: var(--menu-hit);
    margin: calc(var(--menu-hit) * -1);
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    appearance: none;
}

.header-menu-line {
    position: absolute;
    left: var(--menu-hit);
    width: 16px;
    height: 1px;
    background: currentColor;
    transition: transform 0.25s ease, top 0.25s ease;
}

.header-menu-line:first-child {
    top: calc(var(--menu-hit) + 5px);
}

.header-menu-line:last-child {
    top: calc(var(--menu-hit) + 11px);
}

html:has(body.menu-open) {
    overflow: hidden;
}

body.menu-open {
    overflow: hidden;
    padding-right: var(--scrollbar, 0px);
}

body.menu-open .header .logo,
body.menu-open .header .header-role,
body.menu-open .header .header-contact,
body.menu-open .header-menu {
    color: #FFFFFF;
}

body.menu-open .header-menu-line:first-child,
body.menu-open .header-menu-line:last-child {
    top: calc(var(--menu-hit) + 8px);
}

body.menu-open .header-menu-line:first-child {
    transform: rotate(45deg);
}

body.menu-open .header-menu-line:last-child {
    transform: rotate(-45deg);
}

.project-list-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background-color: #000000;
    color: #FFFFFF;
    max-width: 100%;
}

body.menu-open .project-list-overlay {
    display: block;
}

.project-list-panel {
    display: grid;
    grid-template-columns: repeat(24, minmax(0, 1fr));
    width: 100cqi;
    max-width: 100%;
    padding: calc(24px + 1em + var(--pad-top)) 0 120px;
}

.project-list-heading {
    grid-column: 2 / 24;
    margin: 0 0 40px;
    font-family: "JetBrains Mono", monospace;
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0;
    color: #FFFFFF;
}

.project-list {
    grid-column: 1 / -1;
    list-style: none;
    margin: 0;
    padding: 0;
}

.project-list-item {
    display: grid;
    grid-template-columns:
        var(--side)
        calc(var(--masonry-col) + var(--gutter))
        calc(100cqi * 3 / 24)
        minmax(0, 1fr)
        var(--side);
    align-items: baseline;
    position: relative;
    padding: 24px 0;
    color: #FFFFFF;
}

.project-list-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: var(--side);
    right: var(--side);
    z-index: 2;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.project-list-item::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-color: transparent;
    transition: background-color 0.35s ease;
}

.project-list-item.is-static {
    cursor: default;
    pointer-events: none;
}

.project-list-item:hover::after {
    background-color: #FFFFFF;
}

.project-list-item:hover::before {
    border-top-color: rgba(0, 0, 0, 0.2);
}

.project-list-item:hover .project-list-title,
.project-list-item:hover .project-list-type,
.project-list-item:hover .project-list-role {
    color: #000000;
    transform: translateX(16px);
}

.project-list-item.is-static:hover::after {
    background-color: transparent;
}

.project-list-item.is-static:hover::before {
    border-top-color: transparent;
}

.project-list-item.is-static:hover .project-list-title,
.project-list-item.is-static:hover .project-list-type,
.project-list-item.is-static:hover .project-list-role {
    color: inherit;
    transform: none;
}

.project-list-title,
.project-list-type,
.project-list-role {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-family: "JetBrains Mono", monospace;
    font-weight: 400;
    letter-spacing: 0;
    position: relative;
    z-index: 1;
    color: #FFFFFF;
    transform: translateX(0);
    transition: transform 0.35s ease, color 0.35s ease;
}

.project-list-title {
    grid-column: 2;
    font-size: 16px;
    line-height: 1.3;
}

.project-list-type {
    grid-column: 3;
    font-size: 13px;
    line-height: 1.3;
}

.project-list-role {
    grid-column: 4;
    font-size: 13px;
    line-height: 1.3;
}

.main-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    /* 行間 80px / 1440px */
    gap: calc(100cqi * 80 / 1440);
}

.works-row {
    display: grid;
    align-items: start;
    width: 100%;
}

/* 2枚: 間1カラム。大きい側を行ごとに入れ替える */
.row-2-wide-left,
.row-2-wide-right {
    grid-template-columns: repeat(24, minmax(0, 1fr));
}

.row-2-wide-right .work-item:nth-child(1) {
    grid-column: 2 / 10;
}

.row-2-wide-right .work-item:nth-child(2) {
    grid-column: 11 / 24;
}

.row-2-wide-left .work-item:nth-child(1) {
    grid-column: 2 / 14;
}

.row-2-wide-left .work-item:nth-child(2) {
    grid-column: 15 / 24;
}

/* 3枚: 3つとも同幅 */
.row-3-wide-right {
    grid-template-columns: var(--side) 1fr var(--gutter-3) 1fr var(--gutter-3) 1fr var(--side);
}

.row-3-wide-right .work-item:nth-child(1) { grid-column: 2; }
.row-3-wide-right .work-item:nth-child(2) { grid-column: 4; }
.row-3-wide-right .work-item:nth-child(3) { grid-column: 6; }

.row-3-wide-left {
    grid-template-columns: var(--side) 1fr var(--gutter-3) 1fr var(--gutter-3) 1fr var(--side);
}

.row-3-wide-left .work-item:nth-child(1) { grid-column: 2; }
.row-3-wide-left .work-item:nth-child(2) { grid-column: 4; }
.row-3-wide-left .work-item:nth-child(3) { grid-column: 6; }

/* 各実績アイテムの基本設定 */
.work-item {
    display: flex;
    flex-direction: column;
    min-width: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* マウスを乗せたときにカード全体を少しフワッと明るく（半透明に）する */
.work-item:hover {
    opacity: 0.85 !important;
}

.work-item.is-static {
    cursor: default;
}

.work-item.is-static:hover {
    opacity: 1 !important;
}

.work-item.is-static .image-wrapper:hover img {
    transform: none;
}

.work-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: #f0f0f0;
    /* 1440px のとき 12px = ブラウザ幅の 12/1440 */
    margin-bottom: calc(100% * 12 / 1440);
}


.work-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.image-wrapper:hover img {
    transform: scale(1.015);
}

/* テキスト情報 */
.work-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding-top: 5px;
    width: 100%;
}

.work-title {
    font-family: "Roboto Mono", monospace;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.25;
    margin-bottom: 0;
    min-width: 0;
}

.work-desc {
    font-family: "Roboto Mono", monospace;
    font-size: 12px;
    color: #888888;
    letter-spacing: 0;
    flex-shrink: 0;
    text-align: right;
}

/* ==========================================
   3b. 実績一覧（noizarchitects.com/projects 寄せ）
   戻すときは script.js の LISTING_LAYOUT を "rows" にする。
   ========================================== */
body.listing-noiz .main-content {
    position: relative;
    display: block;
    width: auto;
    margin-inline: var(--side);
    gap: 0;
    column-gap: var(--gutter);
}

body.listing-noiz .image-wrapper {
    aspect-ratio: auto;
    height: auto;
    margin-bottom: 0;
}

body.listing-noiz .image-wrapper img {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center top;
    filter: grayscale(1);
    transition: opacity 0.6s ease, filter 0.45s ease, transform 0.3s ease;
}

body.listing-noiz .work-item.is-visible:hover {
    opacity: 1 !important;
}

body.listing-noiz .work-item:hover .image-wrapper img {
    filter: none;
}

body.listing-noiz .work-item.is-static:hover .image-wrapper img {
    filter: grayscale(1);
}

body.listing-noiz .work-info {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    padding-top: 14px;
}

body.listing-noiz .work-title {
    font-size: 16px;
}

body.listing-noiz .work-desc {
    text-align: left;
    color: #333333;
    font-size: 11px;
}

body.project .project-works {
    margin-top: calc(100cqi * 120 / 1440);
    margin-inline: var(--side);
    padding-top: 120px;
    border-top: 1px solid #DFDFDF;
}

body.project.listing-noiz .main-content {
    margin-top: 0;
    margin-inline: 0;
    padding-top: 0;
    border-top: none;
}

/* ==========================================
   3c. サムネイル / テキスト一覧の表示切替・絞り込み
   ========================================== */
.listing-toolbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 0 var(--side) 28px;
}

body.home .listing-toolbar {
    display: flex;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    min-width: 0;
}

.filter-tag {
    font-family: "Roboto Mono", monospace;
    font-size: 12px;
    font-weight: 450;
    line-height: 1;
    letter-spacing: 0;
    color: #BBBBBB;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    appearance: none;
}

.filter-tag.is-active,
.filter-tag:hover {
    color: #333333;
}

.view-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
    margin: 0;
}

.view-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #BBBBBB;
    cursor: pointer;
    appearance: none;
}

.view-toggle-btn.is-active,
.view-toggle-btn:hover {
    color: #333333;
}

.view-toggle-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.list-hover-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
    background-color: #FFFFFF;
}

.list-hover-bg.is-visible {
    opacity: 1;
}

.list-hover-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 1 !important;
    filter: none;
    transform: scale(1.05);
    transform-origin: center center;
    transition: none;
}

.list-hover-bg.is-visible .list-hover-bg-image {
    animation: list-hover-zoom 3.6s ease-out forwards;
}

@keyframes list-hover-zoom {
    from {
        transform: scale(1.05);
    }
    to {
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .list-hover-bg {
        transition: none;
    }

    .list-hover-bg.is-visible .list-hover-bg-image {
        animation: none;
        transform: scale(1);
    }
}

.works-text-list {
    list-style: none;
    margin: 0 var(--side);
    padding: 0;
}

body.listing-text .main-content,
.main-content[hidden] {
    display: none !important;
}

body.listing-thumb .works-text-list,
.works-text-list[hidden] {
    display: none !important;
}

body.listing-text .works-text-list {
    display: block;
}

.work-item.is-filtered-out,
.works-text-list > li.is-filtered-out {
    display: none !important;
}

.works-text-list > li {
    margin: 0;
}

.works-text-item {
    display: block;
    box-sizing: border-box;
    width: calc(100% + 2 * var(--side));
    margin-inline: calc(-1 * var(--side));
    padding: 16px var(--side) 12px;
    color: inherit;
    transition: background-color 0.2s ease;
}

.works-text-item:not(.is-static):hover {
    background-color: #FFFFFF;
}

.works-text-item.is-static {
    cursor: default;
    opacity: 0.25;
}

.works-text-title {
    font-family: "Roboto Mono", monospace;
    font-size: 32px;
    font-weight: 290;
    line-height: 1;
    letter-spacing: 0;
    color: #292929;
    margin: 0 0 4px;
    padding-bottom: 0;
}

.works-text-description {
    /* 詳細ページ本文（.project-col p）と同じ */
    font-family: 'Google Sans Flex', "Yu Gothic Medium", "Yu Gothic", "YuGothic", "ヒラギノ角ゴ Pro W3", sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 2;
    letter-spacing: 0.07em;
    color: #333333;
    margin: 0;
    opacity: 0;
    transition: opacity 0.7s ease;
}

.works-text-description.is-in {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .works-text-description {
        opacity: 1;
        transition: none;
    }
}

/* ==========================================
   4. 詳細ページ（project.html）用レイアウト
   トップと同じ 24 カラム。1440px のとき 1カラム 60px。
   ========================================== */
.project-container {
    width: 100%;
}

/* イントロ部分（タイトル＆クレジット） */
.project-intro {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    min-width: 0;
    margin-bottom: 0;
    grid-column: 2;
}

.project-main-title {
    font-family: "JetBrains Mono", monospace;
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.25;
    margin-bottom: 0;
    min-width: 0;
}

.project-intro-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.project-meta-info,
.project-credits {
    font-family: "JetBrains Mono", monospace;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0;
    margin-bottom: 0;
    line-height: 1.25;
    min-width: 0;
    color: #333333;
}

#project-contents {
    display: flex;
    flex-direction: column;
    gap: calc(100cqi * 80 / 1440);
}

.project-block {
    display: flex;
    flex-direction: column;
    gap: calc(100cqi * 80 / 1440);
    width: 100%;
    padding-inline: var(--side);
}

.project-image-wrapper {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    background-color: #f0f0f0;
}

.project-image-wrapper img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.project-text-container {
    display: grid;
    /* 1: 左マージン / 2: イントロ / 3: left_text / 4: 1カラム空き / 5: right_text / 6: 右マージン1カラム */
    grid-template-columns:
        var(--side)
        calc(var(--col-2-start) - var(--side))
        var(--masonry-col)
        var(--gutter)
        var(--masonry-col)
        var(--side);
    align-items: start;
    width: 100cqi;
    margin-left: calc(-1 * var(--side));
    margin-right: calc(-1 * var(--side));
    padding-left: 0;
}

.project-col {
    min-width: 0;
    width: auto;
}

.project-col.summary {
    grid-column: 3;
}

.project-col.summary.is-merged {
    grid-column: 3 / 6;
}

.project-col.right-col {
    grid-column: 5;
}

.project-col p {
    font-size: 13px;
    line-height: 2;
    color: #333333;
    letter-spacing: 0.07em;
    text-align: left;
}

.site-footer {
    width: auto;
    margin-top: calc(100cqi * 120 / 1440);
    margin-left: var(--side);
    margin-right: var(--side);
    padding-top: calc(100cqi * 24 / 1440);
}

.footer-inner {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #DFDFDF;
    padding-top: calc(100% * 24 / 1440);
}

.site-footer a {
    font-family: "Roboto Mono", monospace;
    font-size: 13px;
    font-weight: 450;
    line-height: 1;
    letter-spacing: 0;
    color: #B4B4B4;
    font-variant-ligatures: none;
    transition: opacity 0.3s ease;
}

.site-footer a:hover {
    opacity: 0.7;
}

/* ==========================================
   5. レスポンシブ対応（スマホ＆タブレット共通）
   ========================================== */
@media (max-width: 1023px) {
    body {
        padding: 40px 24px; /* スマホ時は固定値のpxにリセット */
    }

    /* --- トップ・詳細のスマホリセット --- */
    body.home,
    body.project {
        padding: 24px 0 16px;
    }

    body.home .site,
    body.project .site {
        width: 100%;
        padding-inline: var(--side);
    }

    body.home .header,
    body.project .header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        column-gap: 12px;
        row-gap: 6px;
        margin: 0 0 80px;
    }

    body.home .logo,
    body.project .logo,
    body.home .header-role,
    body.project .header-role,
    body.home .header-actions,
    body.project .header-actions,
    body.home .header-contact,
    body.project .header-contact {
        grid-column: auto;
        white-space: normal;
        padding-left: 0;
    }

    body.home .logo,
    body.project .logo {
        grid-column: 1;
        grid-row: 1;
    }

    body.home .header-role,
    body.project .header-role {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    body.home .header-actions,
    body.project .header-actions {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        align-self: start;
        gap: 0;
    }

    body.home .header-contact,
    body.project .header-contact {
        display: none;
    }

    body.menu-open {
        padding-right: 0;
    }

    .project-list-overlay {
        width: 100%;
        max-width: 100%;
        left: 0;
        right: 0;
    }

    .project-list-panel {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        padding: 120px var(--side) 80px;
    }

    .project-list,
    .project-list > li,
    .project-list-item {
        min-width: 0;
        max-width: 100%;
    }

    .project-list-heading {
        grid-column: auto;
    }

    .project-list-item {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding-inline: 0;
    }

    .project-list-item::before,
    .project-list-item::after {
        left: 0;
        right: 0;
    }

    .project-list-title,
    .project-list-type,
    .project-list-role {
        grid-column: auto;
        max-width: 100%;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }

    .main-content {
        gap: 48px;
    }

    .works-row {
        display: flex;
        flex-direction: column;
        gap: 48px;
        width: 100%;
    }

    .works-row .work-item {
        grid-column: auto;
        width: 100%;
    }

    .image-wrapper {
        margin-bottom: 12px;
    }

    .listing-toolbar {
        flex-wrap: wrap;
        margin-inline: 0;
        gap: 16px;
    }

    .works-text-list {
        margin-inline: 0;
    }

    .works-text-title {
        font-size: 24px;
    }

    .works-text-item {
        width: calc(100% + 2 * var(--side));
        margin-inline: calc(-1 * var(--side));
        padding: 16px var(--side) 12px;
    }

    body.listing-noiz .main-content {
        display: flex;
        flex-direction: column;
        gap: 48px;
        height: auto !important;
        margin-inline: 0;
        padding-inline: 0;
    }

    body.listing-text .main-content {
        display: none;
    }

    body.project .project-works {
        margin-inline: 0;
        padding-top: 120px;
    }

    body.listing-noiz .work-item {
        position: static !important;
        width: 100% !important;
        left: auto !important;
        top: auto !important;
    }

    body.listing-noiz .image-wrapper {
        margin-bottom: 0;
    }

    /* --- 詳細ページ用のスマホリセット --- */
    .project-intro {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin: 0;
        grid-column: auto;
    }

    .project-main-title,
    .project-intro-meta {
        grid-column: auto;
    }

    #project-contents {
        gap: 20px;
    }

    .project-block {
        gap: 20px;
        padding-inline: 0;
    }

    .project-text-container {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        gap: 20px;
    }

    .project-col,
    .project-col.summary,
    .project-col.right-col {
        grid-column: auto;
        width: 100%;
    }

    .project-col:empty {
        display: none;
    }

    .site-footer {
        margin-top: 48px;
        margin-left: 0;
        margin-right: 0;
        padding-top: 0;
    }

    .footer-inner {
        padding-top: 16px;
    }
}
