html {
    overscroll-behavior: none;
}

/* スレッド一覧画面での横スクロール防止 */
body {
    overflow-x: hidden;
}

.container-fluid {
    overflow-x: hidden;
}

/* モバイル用の横スクロール防止 */
@media (max-width: 767.98px) {
    * {
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    .col, .col-auto, .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12 {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .navbar-brand {
        max-width: 60vw;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .text-truncate {
        max-width: 100%;
    }
}

/* スマホ表示時のヘッダー固定対応 */
@media (max-width: 767.98px) {
    .navbar {
        min-height: 56px;
    }
    
    .flex-row.d-flex {
        margin-top: 56px !important;
        height: calc(100vh - 56px) !important;
    }
    
    .h-100.w-100.overflow-scroll {
        height: calc(100vh - 56px) !important;
        /* プルトゥリフレッシュ検索に必要な設定 */
        position: relative;
        overscroll-behavior-y: contain;
    }
    
    /* プルトゥリフレッシュ検索のための追加設定 */
    .h-100.w-100.overflow-scroll {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
}

.thread a {
    color: black;
    text-decoration: none;
}

.gotop, .gobottom{
    display: block;
    width: 60px;
    height: 60px;
    box-sizing: border-box;
    background: #FFF;
    border: 1px solid #999;
    text-align: center;
    letter-spacing: -1px;
    font-size: 85%;
    text-decoration: none;
    color: #333;
    opacity: 0.5;
    position: relative;
}
.gotop{
    padding-top: 30px;
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 1400;
}
.gotop::before{
    content: "";
    display: block;
    border-top: 2px solid #333;
    border-right: 2px solid #333;
    width: 25%;
    height: 25%;
    top: 25%;
    left: 0;
    right: 0;
    margin: auto;
    position: absolute;
    transform: rotate(-45deg);
}
.gotop:hover, .gobottom:hover{
    opacity: 1;
}
.gobottom::after{
    content: "";
    display: block;
    border-top: 2px solid #333;
    border-right: 2px solid #333;
    width: 25%;
    height: 25%;
    bottom: 25%;
    left: 0;
    right: 0;
    margin: auto;
    position: absolute;
    transform: rotate(-225deg);
}
.gobottom{
    padding-bottom: 30px;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1400;
}
.preview{
    display: block;
    width: 120px;
    height: 120px;
    box-sizing: border-box;
    background: #000000;
    border: 1px solid #999;
    text-align: center;
    letter-spacing: -1px;
    font-size: 85%;
    text-decoration: none;
    color: #333;
    position: relative;
    opacity: 0.8;
}
.preview:hover{
    opacity: 1;
}
.preview img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(3px);
    -webkit-filter: blur(3px);
}
.preview:hover img{
    filter: blur(0);
    -webkit-filter: blur(0);
}