#main {
    /* 研究員カードより前に来ないように */
    position: relative;
    z-index: 2;
    padding-top: 15px;
}

.footer-bottom {
    position: inherit;
}
#post-info {
    #post-info-top {
        display: flex;
        justify-content: space-between;

        #article-meta-block {
            display: flex;
            gap: 15px;
        }
        #article-action-block {
            height: fit-content;
            display: flex;
            gap: 5px;

            #action-separator {
                height: 30px;
                width: 1px;
                margin: auto 10px;
                background-color: #dbdbdb;
            }
        }
    }
}
.ql-editor {
    padding: 0;
    overflow-y: visible;
}
/* 筆者コンテナ */
@media screen and (max-width: 479px) {
    #author-container {
        display: grid;
        gap: 5px;
        grid-template-columns: auto 35px 1fr;
        grid-template-rows: 35px auto;

        #author-user-badge {
            grid-column: 1 / 2;
            grid-row: 1 / 2;
        }
        #author-avatar {
            grid-column: 2 / 3;
            grid-row: 1 / 2;
        }
        #author-name {
            grid-column: 1 / -1;
            grid-row: 2 / 3;
        }
        #follow-button-container {
            grid-column: 3 / 4;
            grid-row: 1 / 2;
        }
    }
}
@media screen and (min-width: 480px) {
    #author-container {
        display: grid;
        gap: 10px;
        grid-template-columns: auto 35px 1fr auto;
        height: 45px;

        #author-user-badge {
            margin: auto 0;
        }
        #author-avatar {
            margin: auto 0;
        }
        #author-name {
            margin: auto 0;
            flex-grow: 1;
        }
        #follow-button-container {
            margin: auto 0;
        }
    }
}

/* xもyoutubeもなし */
@media screen and (min-width: 460px) and (max-width: 539px) {
    #post-info-top:not(:has(#article-action-block > div:nth-child(6))) #article-meta-block {
        flex-direction: column;
        gap: 5px !important;
    }
}
@media screen and (max-width: 459px) {
    #post-info-top:not(:has(#article-action-block > div:nth-child(6))) {
        flex-direction: column;
        gap: 10px !important;

        #article-action-block {
            justify-content: space-around;
            width: 80%;
            min-width: 330px;
            margin: 0 auto;
        }
    }
}

/* xかyoutubeどちらか片方 */
@media screen and ( ( (min-width: 835px) and (max-width: 929px) ) or ( (min-width: 575px) and (max-width: 619px) ) ) {
    #post-info-top:has(#article-action-block > div:nth-child(6)) #article-meta-block {
        flex-direction: column;
        gap: 5px !important;
    }
}
@media screen and (max-width: 574px) {
    #post-info-top:has(#article-action-block > div:nth-child(6)) {
        flex-direction: column;
        gap: 10px !important;

        #article-action-block {
            justify-content: space-around;
            width: 80%;
            min-width: 330px;
            margin: 0 auto;
        }
    }
}


/* xとyoutube両方 */
@media screen and ( ( (min-width: 835px) and (max-width: 989px) ) or ( (min-width: 575px) and (max-width: 679px) ) ) {
    #post-info-top:has(#article-action-block > div:nth-child(7)) #article-meta-block {
        flex-direction: column;
        gap: 5px !important;
    }
}
@media screen and (min-width: 834px) and (max-width: 859px) {
    #post-info-top:has(#article-action-block > div:nth-child(7)) #action-separator{ display: none; }
}
@media screen and (max-width: 574px) {
    #post-info-top:has(#article-action-block > div:nth-child(7)) {
        flex-direction: column;
        gap: 10px !important;

        #article-action-block {
            justify-content: space-around;
            width: 80%;
            min-width: 330px;
            margin: 0 auto;
        }
    }
}


#post-content {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
#post-content::-webkit-scrollbar {
    display: none;
}



#page-thumbnail {
    width: 100%;
    max-height: 300px;

    object-fit: contain;
}
#h2-title {
    font-size: large;
    font-weight: bold;
    margin: 10px 0;
}
#post-info {
    display: grid;
    gap: 15px;

    #article-meta-block > div > div {
        margin: auto 0;
    }
}


.meta-button-wrapper {
    width: 45px; height: 45px;
    border-radius: 50%;
    background-color: #f5f5f5;
    /* background-color: transparent; */

    #like-button, #bookmark-button {
        height: 45px;

        i {
            /* font-size: large; */
        }
    }
    #like-button.liked {
        div:has(.fa-regular.fa-heart) {
            display: none;
            i {
                color: #D5309E;
            }
        }
    }
    #like-button.unliked {
        div:has(.fa-solid.fa-heart) {
            display: none;
        }
    }

    #bookmark-button.bookmarkd {
        div:has(.fa-regular.fa-bookmark) {
            display: none;
            i {
                color: #497DE4;
            }
        }
    }
    #bookmark-button.unbookmarkd {
        div:has(.fa-solid.fa-bookmark) {
            display: none;
        }
    }
}
.meta-button-wrapper button, .meta-button-wrapper a {
    border-radius: 50% !important;
}

/* #author-container {
    div {
        margin: auto 0;
    }

    #autor-rank-bg {
        width: 35px; height: 35px;
    }
    #author-avatar {
        width: 35px; height: 35px;
        border-radius: 50%;
    }

    #author-info {
        margin-left: 10px;

        #author-name {
            font-size: medium;
            line-height: 0.8em;
        }
        #author-follower {
            font-size: small;
            color: gray;
        }
    }

    a {
        text-decoration: none;
    }
    a > div {
        transition: transform 0.15s;
    }
} */
body:not(.--CLIENT-USE-TOUCH, .--CLIENT-USE-PEN) #author-container .author-prof:hover > div {
    transform: scale(0.9);
}

#follow-button.following {
    #button-unfollowing {
        display: none;
    }
}
#follow-button.unfollowing {
    #button-following {
        display: none;
    }
}

/* TRL */
.trlproject-container {
    padding: 5px 10px;
    border-radius: 5px;
    color: black;
    border: 2px #e18007 solid;
}

/* 改変元作品（自サイト） */
.original-work {
    display: grid;
    grid-template-columns: minmax(90px, 1fr) 3fr;
    gap: 10px;
    border-radius: 12px;
    padding: 10px 20px;
    color: #2d2d2d;
    background-color: #f5f5f5;
    transition: all 0.15s;
    text-decoration: none !important;
    max-width: 500px;
    margin-bottom: 10px;

    .owc-thumb {
        div, img {
            width: 100%;
            aspect-ratio: 16 / 9;
            object-fit: cover;
            border-radius: 6px;
        }
        .rac-card-desc {
            padding: 5px;
            padding-right: 0;
            color: white;
            overflow: hidden;
            font-size: small;
            line-height: 1.3em;
        }
    }
    .owc-title {
        color: #2d2d2d;
        overflow: hidden;
        width: 100%;
        display: -webkit-box;
        -webkit-line-clamp: 2; 
        -webkit-box-orient: vertical;

        font-weight: bold;
        text-overflow: ellipsis;
        font-size: small;
        height: 100%;
        margin-bottom: 5px;
    }
    .owc-author {
        display: flex;
        gap: 5px;
    }
}
.original-work > div {
    margin: auto 0;
}
.original-work:not(:hover) .small { color: gray; }
body:not(.--CLIENT-USE-TOUCH, .--CLIENT-USE-PEN) .original-work:hover {
    background-color: #4db4b4;
    color: white;
}

/* 改変元作品（他サイト） */
.original-work-ext {
    display: flex;
    justify-content: space-between;
    border-radius: 12px;
    padding: 10px 20px;
    color: #2d2d2d;
    background-color: #f5f5f5;
    transition: all 0.15s;
    text-decoration: none !important;
    max-width: 500px;
    margin-bottom: 10px;
}
.original-work-ext > div {
    margin: auto 0;
}
.original-work-ext:not(:hover) .small { color: gray; }
body:not(.--CLIENT-USE-TOUCH, .--CLIENT-USE-PEN) .original-work-ext:hover {
    background-color: #4db4b4;
    color: white;
}



/* DLページ */
#dwb-label {
font-size: large;
font-weight: bold;
}
.download-page-button {
    .ts-button-v3 {
        /* padding: 20px !important; */
        border-radius: 10px;

        .dwb-l {
            /* text-align: center; */
            margin: 20px;
        }
        .dwb-r {
            padding-left: 10px;
            border-left: 1px rgba(0, 0, 0, 0.1) solid;
            height: 100%;
            margin: 0 !important;
        }
    }
}
.dl-button {
    display: flex;
    justify-content: space-between;
    border-radius: 12px;
    padding: 10px 20px;
    color: #2d2d2d;
    background-color: #f5f5f5;
    transition: all 0.15s;
    text-decoration: none !important;
    max-width: 500px;
}
.dl-button > div {
    margin: auto 0;
}
.dl-button:not(:hover) .small { color: gray; }
body:not(.--CLIENT-USE-TOUCH, .--CLIENT-USE-PEN) .dl-button:hover {
    background-color: #4db4b4;
    color: white;
}

#comment-section {
    #enter-comment-overlay.invisible {
        display: none;
    }
    #enter-comment-overlay {
        position: fixed;
        z-index: 100;
        top: 0; left: 0;
        width: 100vw; height: 100vh;
        background-color: rgba(0, 0, 0, 0.2);

        
        
        #enter-comment-overlay-wrapper {
            position: absolute;
            width: calc(100vw - 40px);
            /* height: 400px; */
            max-width: 600px;
            top: 50vh;
            left: 50vw;
            transform: translate(-50%, -50%);
            background: #FAFAFA;

            #close-comment-overlay-button-wrapper {
                position: absolute;
                top: 5px;
                right: 5px;
            }

            #enter-comment-overlay-in {
                display: flex; flex-direction: column;
                gap: 20px;

                #comment-author-wrapper {
                    width: calc(100% - 50px);
                }
                span {
                    display: none;
                }
            }
            #enter-comment-overlay-in.comment-new #label-for-new-comment { display: inline; }
            #enter-comment-overlay-in.comment-edit #label-for-edit-comment { display: inline; }
            #enter-comment-overlay-in.comment-reply #label-for-reply-comment { display: inline; }
        }
    }
}
@media screen and (max-width: 834px){
    #enter-comment-overlay-in {
        padding: 40px 20px 45px 20px;
    }

    /* コメント表示ボタン */
    #comment-show-more-button button {
        border: none; outline: none;
        background-color: transparent;
        margin: 30px;
        padding: 10px 20px;
    }
    #comment-list.show-less {
        li:not(:nth-of-type(1), :nth-of-type(2), :nth-of-type(3)) {
            display: none;
        }
    }
    #comment-list:not(:has(li:nth-of-type(4))) + div + #comment-show-more-button {
        /* 4番目がない時はボタンを表示しない */
        display: none;
    }
    #comment-list.show-less + div + #comment-show-more-button .show-less {
        display: none;
    }
    #comment-list:not(.show-less) + div + #comment-show-more-button .show-more {
        display: none;
    }
}
@media screen and (min-width: 835px){
    #enter-comment-overlay-in {
        padding: 40px 50px 45px 50px;
    }
    #comment-show-more-button { display: none; }
}


@media screen and (max-width: 834px){
    #comment-section ul { padding-left: 10px; }
    #comment-section li li { padding-left: 0px; }
}
@media screen and (min-width: 835px){
    #comment-section ul { padding-left: 20px; }
    #comment-section li li { padding-left: 0px; }
}
#comment-section {
    li { margin-top: 20px; }
    #comment-list {
        li {
            list-style: none;
        }
        li:not(.depth-1) ul {
            padding-left: 0;
        }
        .comment-body {
            display: flex;
            gap: 20px;

            .comment-author-avatar {
                width: 35px; height: 35px;
                border-radius: 50%;
                transition: all 0.15s;
                margin-top: 20px;
                flex-shrink: 0;
            }
            .comment-column {
                display: flex;
                flex-direction: column;
                flex-shrink: 1;

                .comment-meta {
                    display: flex; gap: 25px;
                    font-size: small;

                    .comment-author-name {
                        font-weight: bold;
                    }
                    .comment-author-name:has(i) {
                        color: purple;
                    }
                }
                .comment-pending {
                    color: green
                }
                .comment-action {
                    display: flex;
                    gap: 10px;
                    margin-top: 3px;

                    span:not(.red) {
                        color: gray;
                    }
                }
                [data-s="closed"] .close { display: none; }
                [data-s="open"] .open { display: none; }
            }
        }
        li.depth-1 > .comment-body:has([data-s="closed"]) + .children { display: none; }
    }
    #comment-list:has(li) + #empty-message {
        display: none;
    }
    li:not(:has(.children li)) > .comment-body .show-reply-button-container,
    li:not(.depth-1) > .comment-body .show-reply-button-container {
        display: none;
    }
    #empty-message {
        display: flex;
        flex-direction: column;
        margin: 30px 0 20px 0;

        div {
            width: 100%;
            text-align: center;

            i {
                color: #ddd;
                font-size: 4em;
                margin-bottom: 15px;
            }
            .large {
                font-size: large;
            }
        }
    }
}
body:not(.--CLIENT-USE-TOUCH, .--CLIENT-USE-PEN) .comment-author-avatar:hover {
    transform: scale(0.9);
}
@media screen and (max-width: 419px) {
    .comment-action { font-size: small; }
}


/* TRL関連 */
.trl-logo-link {
    height: 35px;
    display: block;
    margin: auto 0;
    transition: transform 0.15s;
}
body:not(.--CLIENT-USE-TOUCH, .--CLIENT-USE-PEN) .trl-logo-link:hover {
    transform: scale(0.95);
}
