main {
    justify-content: start;
}

#setting {
    background: #333;
    padding: 12px 12px 20px 12px;
    width: calc(100% - 16px);
    box-sizing: border-box;
    border-radius: 12px;
}

@supports (appearance: base-select) {
    select {
        appearance: base-select;
    }
}

select {
    padding: 8px;
    color: white;
    outline: none;
    border: 1px solid #58c9ff;
    border-radius: 8px;
    background-color: #1d95ff;
    cursor: pointer;
    font-weight: 500;
    width: calc((100% - 32px) / 4);
    height: 45px;
    display: flex;
    align-items: center;
    &::picker(select) {
        /* 웹 표준 맞습니다 파폭 쓰는 건 제 잘못이 안님*/
        appearance: base-select;
        color: white;
        background-color: #0d3960d6;
        backdrop-filter: blur(4px);
        border: 0;
        margin-top: 4px;
        border-radius: 8px;
        padding: 4px;
    }
    &:focus {
        outline: 1px solid white;
    }
}

option {
    padding: 8px;
    border-radius: 8px;
    &:focus-visible {
        box-shadow: inset 0 0 0 1px rgb(255, 255, 255); /* border처럼 보이게 */
    }
    &:focus {
        outline: 0;
    }
}

@media screen and (max-width: 600px) {
    .settingBox {
        flex-direction: column;
    }
    select {
        width: 100%;
        margin-bottom: 8px;
        &:last-child {
            margin-bottom: 0;
        }
    }
    #howBS {
        width: 100% !important;
        height: calc(100% - 100px) !important;
    }
    .settingBox {
        height: unset !important;
    }
    #postSearch {
        transform: translateY(8px);
    }
    body:has(#isSearch:checked) #postSearch {
        display: none; /* 버그 해결 임시 조치 */
    }
    body:has(#isSearch:checked) .settingBox:has(input)::after {
        content: "버그로 인하여 임시로 검색 창을 없앱니다";
    }
}

main:has(button:not([hidden])) > #frameframe > .frame:last-child {
    margin-bottom: 0;
}

.frame {
    background-color: #111;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    width: calc(100% - 16px);
    box-sizing: border-box;
    margin-bottom: 8px;
    & > img {
        width: 80px;
        height: 80px;
        margin-right: 8px;
        border-radius: 24px;
        object-fit: cover;
    }
    & > div {
        display: flex;
        flex-direction: column;
        & > div {
            display: flex;
            align-items: center;
            & > img {
                width: 15px;
                margin-right: 4px;
                margin-left: 8px;
                &:first-child {
                    margin-left: 0;
                }
            }
        }
        & > * {
            margin-bottom: 6px;
            &:last-child {
                margin-bottom: 0;
            }
        }
        & > div:last-child > a:not(:last-child) {
            margin-right: 8px;
        }
    }
}

.nickname {
    font-weight: 600;
}

.content {
    word-break: break-all;
}

.time {
    color: #ccc;
}

.sticker {
    width: 100px;
}

#frameframe {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    margin: 0;
}

button {
    padding: 8px;
    color: white;
    outline: none;
    border: 1px solid #58c9ff;
    border-radius: 8px;
    background-color: #1d95ff;
    cursor: pointer;
    font-weight: 500;
    &:active {
        background-color: #1d65ff;
        border-color: #587fff;
    }
    &:focus-visible {
        outline: solid 1px white;
    }
}

.total {
    margin-top: 0;
}

#how {
    position: absolute;
    background-color: #111111dd;
    backdrop-filter: blur(5px);
    border-radius: 24px;
    padding: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 70%;
    &::after {
        width: 100dvw;
        height: 100dvh;
    }
}

#howBS {
    width: calc(100% - 125px);
    height: 100%;
    position: fixed;
    backdrop-filter: blur(3px);
    background: #00000066;
    margin: 0;
}

.upmargin {
    margin-bottom: 8px;
}

.downmargin {
    margin-top: 8px;
    font-size: 16px;
}

.disable {
    display: none !important;
}

.settingBox {
    width: 100%;
    height: calc(50% + 8px);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

#postSearch {
    width: 100%;
    height: 45px;
    padding: 8px;
    color: white;
    outline: none;
    border: 1px solid #58c9ff;
    border-radius: 8px;
    background-color: #1d95ff;
    box-sizing: border-box;
    &::placeholder {
        color: white;
    }
}
