@charset "utf-8";
body {
    position: relative;
    width: 100%;
    height: 100dvh;
    padding: 0 4%;
    background-color: #1f1f1f;
    color: #fcf8ef;
}

h1 {
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    line-height: 3.5rem;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h3 {
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    line-height: 3.5rem;
}

p, li {
    font-size: 1.5rem;
    line-height: 1.8rem;
}

#reverse {
    display: none;
    height: auto;
    width: 100%;
}

#reverse.active {
    display: block;
}

#reverse h1, #reverse h2, #reverse h3, #reverse h4, #reverse h5, #reverse h6, #reverse p, #reverse a, .post-tags, #reverse li {
    color: #fcf8ef;
    font-family: 'New Tegomin', 'togalite';
    font-weight: 400;
    margin-bottom: 20px;
}

#reverse header {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    background-color: transparent;
}

#reverse footer {
    left: 50%;
    transform: translateX(-50%);
    background-color: transparent;
}

.contents {
    max-width: 800px;
    width: 100%;
    text-align: center;
    margin: 60px auto 120px;
}

.contents a {
    color: #fcf8ef;
    font-size: 1rem;
}

.contents h3 {
    margin-bottom: 50px;
}

.contents1 h4 {
    text-align: center;
}

.contents1 {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-direction: column;
}

.cat-list {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 80px;
    text-align: center;
    width: 100%;
}

.cat-item {
    background-color: #555555;
    padding: 20px 20px 0;
    border-radius: 10px;
    margin-bottom: 20px;
    width: 100%;
}

.cat-item h2 {
    margin-bottom: 10px;
}

.post-categories {
    margin-right: 10px;
    font-size: 1rem;
}

.article {
    text-align: initial;
}

.wp-block-cover {
    background-color: #cccccc;
    min-height: 100%;
    font-family: 'New Tegomin', 'togalite';
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 1.8rem;
}

.wp-block-cover ul li {
    margin-bottom: 1em;
}

a {
    text-decoration: underline;
    text-decoration-color: #cccccc;
    text-decoration-thickness: 1px;
}

button {
    position: fixed;
    right: 4%;
    z-index: 20;
    font-size: 1.5rem;
    padding: 5px;
    border: 1px solid #ffffff;
    border-radius: 10px;
    background-color: #ffffff;
    color: #000000;
}

button:hover {
    opacity: 0.8;
}

#backToHomeButton {
    bottom: 10px;
}

#backToTopButton {
    display: none;
    bottom: 80px;
}

.chat-group {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #cccccc;
}

#chat-wrapper {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    font-family: 'New Tegomin';
}

#chat-history {
    max-width: 200px;
    width: 100%;
    padding: 10px;
    padding-bottom: 20%;
    height: auto;
    text-align: left;
}

#chat-history h4 {
    margin-top: 0;
    font-size: 1.5rem;
}

#chat-history-list {
    padding-left: 0;
}

#chat-history-list li {
    margin-bottom: 5px;
}

#chat-history-list li a {
    text-decoration: none;
    color: #cccccc;
}

#chat-history-list li a:hover {
    text-decoration: underline;
}

#chat-container {
    padding-bottom: 20%;
    max-width: 600px;
    width: 100%;
}

.chat-flex {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: end;
}

#chat-question {
    height: 120px;
    width: 80%;
    max-width: 1200px;
    font-size: 1.2rem;
    padding: 15px;
    box-sizing: border-box;
    resize: none;
}

#chat-submit {
    position: relative;
    right: auto;
    font-size: 1.5rem;
    padding: 5px 10px;
}

.ai-file-detail {
    padding-top: 220px;
    font-size: 1.5rem;
}

#scrollToBottom {
    display: none;
    bottom: 150px;
}

#reverse .chat-row p {
    font-size: 1rem;
    margin-bottom: 0;
}

#reverse .chat-row li {
    margin-bottom: 0;
}

#reverse .chat-row .file-content p {
    font-size: 1.5rem;
    line-height: 1.8rem;
}

#reverse .user{
    margin-bottom: 10px;
}

#chat-messages {
    text-align: left;
}

#reverse .chat-row .ai_contents {
    margin-bottom: 30px;
}

#reverse .chat-row .full_content p {
    padding-bottom: 1rem;
}

.ai_contents .full_content img {
    max-width: 200px;   /* 横幅の最大 */
    max-height: 200px;  /* 縦幅の最大 */
    width: auto;        /* アスペクト比維持 */
    height: auto;       /* アスペクト比維持 */
    display: block;
    margin-bottom: 0.5em;
}

@media screen and (width < 850px){
    main {
        padding-top: 60px;
    }

    .single2 {
        padding-top: 60px;
    }

    .cat-list {
        flex-direction: column;
        gap: 0;
    }

    #reverse p, #reverse li, .wp-block-cover {
        font-size: 1rem;
        line-height: 1;
    }

    button {
        font-size: 1rem;
    }

    #backToHomeButton {
        bottom: 40px;
    }

    #scrollToBottom {
        bottom: 120px;
    }

    #chat-container {
        padding: 10px 0 150px;
        border-top: 1px solid #ffffff;
    }

    #reverse .chat-row .file-content p {
        font-size: 1rem;
        line-height: 1;
    }

    .ai-file-detail {
        padding-top: 120px;
        padding-bottom: 120px;
    }

    #chat-wrapper {
        flex-direction: column;
    }

    #chat-history {
        padding-bottom: 0;
    }

    #chat-submit {
        font-size: 0.8rem;
        padding: 3px 8px;
    }

}