body {
    margin: 0;
    font-family: 'Hiragino Kaku Gothic ProN',
        'ヒラギノ角ゴ ProN W3',
        'Helvetica Neue',
        Arial,
        'Hiragino Sans',
        'Meiryo',
        sans-serif;
}

.wrapper {
    display: flex;
}

.left-area {
    width: calc((100% - 500px) / 2);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-image: url('../img/pc_back/back_pc_C.png');
    background-position: right;
    background-size: cover;
}

.right-area {
    width: calc((100% - 500px) / 2);
    height: 100vh;
    position: fixed;
    top: 0;
    right: 0;
    background-image: url('../img/pc_back/back_pc_B.png');
    background-position: left;
    background-size: cover;
}

.center-area {
    width: 500px;
    margin: 0 auto;
    height: 100%;
    background: #fff;
    position: relative;
    overflow: hidden;
}

img {
    max-width: 100%;
}

.d-none {
    display: none !important;
}

header {
    position: fixed;
    top: 0;
    width: 500px;
    background: #fff;
    z-index: 3;
}

header h2 {
    margin: 10px 15px 0;
}

/* コンテンツ部 */
.contents {
    display: flex;
    flex-direction: column;
    justify-content: start;
    overflow-y: scroll;
    min-height: 500px;
    scrollbar-width: none;
    padding: 100px 0 200px;
}

.time {
    text-align: center;
    color: #9b9b9b;
    font-size: 14px;
    margin-top: 20px;
}

.conversation {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 30px 5%;
}

.result {
    margin: 0 5%;
}

.result h3 {
    margin-bottom: 20px;
}

.result p {
    white-space: pre-line;
}

.my-icon,
.ai-icon {
    width: 15%;
}

.my-turn,
.ai-turn {
    width: 70%;
}

.my-turn-name {
    text-align: right;
}

.my-turn-fukidashi {
    background: #eeeef0;
    border: 2px #cacacc solid;
    padding: 10px;
    border-radius: 6px;
}

.ai-turn-link {
    margin: 0 5% 20px;
}

.ai-turn-fukidashi {
    background: #fffac6;
    border: 2px #f9b52c solid;
    padding: 10px;
    border-radius: 6px;
}

.ai-turn a {
    word-wrap: break-word;
}

.image-title {
    margin-top: 20px;
    background: #ffa500;
    display: inline-block;
    padding: 4px 4px 0;
    border-radius: 4px 4px 0 0;
    color: #fff;
}

.image {
    display: flex;
    flex-direction: column;
    border: 4px #ffa500 solid;
}

.image-role {
    background: #ffff70;
    padding: 7px 0;
    text-align: center;
}

.info-area {
    background: #fff;
    margin-top: 20px;
    padding: 5px 10px;
}

.info-area div {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #fffac6;
    align-items: center;
}

.ai-turn-useful {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin: 15px 70px;
}

.ai-turn-useful button {
    cursor: pointer;
}

.first-img,
.second-img,
.third-img {
    margin-top: 30px;
}

.if-area {
    border: 1px #999 solid;
    padding: 15px;
    margin: 0 15px;
    position: relative;
    border-radius: 10px;
}

/* 吹き出しの三角部分 */
.if-area::before {
    content: "";
    position: absolute;
    top: -16px;
    left: calc(65% - 1px);
    border-width: 0 11px 16px;
    border-style: solid;
    border-color: transparent transparent #333 transparent;
}

.if-area::after {
    content: "";
    position: absolute;
    top: -15px;
    left: 65%;
    border-width: 0 10px 15px;
    border-style: solid;
    border-color: transparent transparent #fff transparent;
}

.first-title,
.second-title,
.third-title {
    background: #cc0000;
    color: #fff;
    text-align: center;
    padding: 5px 0;
}

.first-matching,
.second-matching,
.third-matching {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px #888 solid;
    padding: 2px 10px;
    margin-top: 10px;
}

.first-meaning,
.second-meaning,
.third-meaning {
    margin-top: 10px;
}

.first-url-title,
.second-url-title,
.third-url-title {
    margin-top: 10px;
}

.debug-area {
    background: #cfcfcf;
    padding: 4px;
    border-radius: 4px;
}

/* 入力部 */
footer {
    border-top: 2px #dcdada solid;
    position: fixed;
    bottom: 0;
    width: 500px;
    background: #fff;
    z-index: 3;
}

.input-area {
    /* margin-top: 20px; */
    position: relative;
}

.input-area textarea {
    background: #fff;
    /* border: 2px #b6b6b6 solid; */
    width: 100%;
    resize: none;
    scrollbar-width: none;
    line-height: 1.3;
    align-content: center;
    /* border-radius: 4px; */
    display: block;
    padding: 5px 15px 50px;
    align-content: start;
    margin-bottom: 10px;
    font-size: 18px;
}

.input-area textarea:focus {
    outline: none;
    box-shadow: none;
}

.btn-area {
    position: absolute;
    display: flex;
    bottom: 0;
    left: 0;
    padding: 5px 15px;
    justify-content: space-between;
    width: 100%;
}

.machine-btn-area {
    position: relative;
}

.selected-machine-close {
    width: 20px;
    height: auto;
    position: absolute;
    top: -8px;
    right: -10px;
}

.machine-search {
    margin: 10px;
    position: relative;
}

.machine-search input {
    width: 100%;
    padding: 5px;
    border: 1px #999 solid;
    font-size: 14px;
    border-radius: 4px;
}

.machine-search img {
    position: absolute;
    right: 4px;
    width: 20px;
    top: 4px;
}

.select-area {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    margin: auto;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.2);
    z-index: 9;
}

.select-list {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    margin: auto;
    width: 400px;
    border: 1px #999 solid;
    border-radius: 6px;
    height: 85vh;
    background: #fff;
    box-shadow: 5px 5px 5px #999;
    overflow: hidden;
    z-index: 10;
}

.select-list h3 {
    margin: 5px 10px 0;
    color: #999;
    border-bottom: 1px #999 solid;
    font-size: 16px;
}

.kaiseki-tags ul li label,
.enshutsu-tags ul li label,
.select-list .select-list-area li label {
    display: block;
    padding: 0 5px;
}

.select-btn {
    background: #b4b4b5;
    color: #fff;
    padding: 3px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
}

.select-close-btn,
.kaiseki-close-btn,
.enshutsu-close-btn {
    text-align: center;
    margin: 5px 15px;
}

.select-close-btn button,
.kaiseki-close-btn button,
.enshutsu-close-btn button {
    width: 100%;
    padding: 5px 0;
    border-radius: 8px;
    background: #999;
    color: #fff;
    cursor: pointer;
}

.kaiseki-comment,
.enshutsu-comment {
    font-weight: normal;
    margin: 10px 15px 0;
    padding: 5px 0;
    border-top: #999 1px solid;
    color: #999;
}

.option-btn {
    width: 35px;
    display: flex;
}

#tag-btn img {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

#machine-list h3 {
    border-bottom: none;
}

.select-list .select-list-area,
.select-list .kaiseki-tags,
.select-list .enshutsu-tags {
    overflow-y: scroll;
    height: 100%;
    scrollbar-width: thin;
    margin: 5px 10px;
    overflow-x: hidden;
    white-space: nowrap;
    cursor: pointer;
}


.kaiseki-tags ul li:hover,
.enshutsu-tags ul li:hover,
.select-list .select-list-area li:hover {
    color: #df0000;
}

.disabled-bg {
    background: #999;
}

.kaiseki-tags ul .selected:hover,
.enshutsu-tags ul .selected:hover,
.select-list .select-list-area .selected:hover {
    color: #fff;
}

.tag-select-dialog {
    background: #fff;
    position: absolute;
    bottom: 0;
    white-space: nowrap;
}

li {
    list-style: none;
    white-space: nowrap;
}

.tag-select-item label {
    display: block;
    cursor: pointer;
}

.selected-area {
    display: flex;
}

.selected-tag {
    align-items: center;
    padding: 2px 10px;
    border-radius: 10px;
    position: relative;
    background: #b40000;
    color: #fff;
    max-width: 60%;
}

.selected-name {
    white-space: nowrap;
    color: #888;
    font-size: 14px;
    cursor: pointer;
}

.selected-tag button {
    width: 20px;
    height: auto;
    position: absolute;
    top: -8px;
    right: -10px;
}

.btn-area .option-area {
    display: flex;
    align-items: center;
    width: 90%;
    gap: 10px;
    /* font-size: 14px; */
}

.btn-area .submit-btn {
    width: 35px;
    align-content: center;
}

.btn-area .submit-btn button {
    display: flex;
}

.upload-btn-area {
    margin: 10px 15px 20px;
}

.upload-btn {
    width: 100%;
    justify-content: center;
    padding: 30px 0;
}

.upload-btn img {
    width: 18px;
    margin-right: 4px;
    vertical-align: middle;
}

.send-btn {
    width: 32px;
    align-content: center;
    margin-bottom: 3px;
}

.input-center {
    width: 80%;
}

.category-select {
    display: flex;
    /* margin: 10px 15px; */
    border-bottom: 2px #b40000 solid;
    /* border-radius: 8px; */
    font-size: 14px;
}

.category-select label {
    display: block;
    width: 50%;
    text-align: center;
    cursor: pointer;
    color: #b40000;
    padding: 3px 0;
}

.category-select .disabled {
    background: #bbb;
    cursor: default;
    color: #fff;
}

.select-area .selected {
    background: #b40000;
    color: #fff;
}

.category-select input {
    display: none;
}

.selected-area {
    margin: 5px 10px 0;
}

.select-page-group {
    display: flex;
    gap: 10px;
    /* margin-bottom: 20px; */
    overflow-x: scroll;
    white-space: nowrap;
    scrollbar-width: none;
}

.option-area .selected {
    background: #b40000;
    color: #fff;
}

.page-group label {
    display: block;
    color: #000;
    background: #fff;
    padding: 5px 1rem;
    border: 1px #111 solid;
    border-radius: 20px;
    cursor: pointer;
    margin-top: 20px;
}

.page-group .selected {
    border: 1px #b41d14 solid;
    background: #f5ddde;
    color: #b41d14;
    padding: 5px .5rem;
}

.page-group .selected::before {
    content: '✓';
    /* margin-right: 5px; */
    color: #b41d14;
    font-weight: bold;
}

.page-group-radio,
.role-tag-radio {
    display: none;
}

.upload-preview {
    /* position: absolute; */
    top: 5px;
    left: 10px;
}

.upload-preview-img {
    height: 120px;
    width: 100%;
    position: relative;
    margin: 20px auto;
}

.upload-preview-img img {
    height: 100%;
    margin: auto;
    display: block;
}

.upload-preview-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
}

.submit-preview-img {
    margin: 5px 10px;
    display: flex;
    height: 110px;
}

.select-role-tag {
    display: flex;
    overflow-x: scroll;
    white-space: nowrap;
    scrollbar-width: none;
    margin-top: 10px;
    background: #f5ddde;
}

.select-role-tag .role-tag {
    padding: 7px 0;
    border-bottom: 3px #f5ddde solid;
}

.select-role-tag .role-tag .role-tag-label {
    display: inline-block;
    padding: 3px 10px;
    /* color: #b41d14; */
    cursor: pointer;
}

.select-role-tag .selected {
    color: #b41d14;
    border-bottom: 3px #b41d14 solid;
}

.select-role-tag .role-tag:not(:last-child) .role-tag-label {
    border-right: 1px #ccc solid;
}

/* ローディング */
.loading {
    text-align: center;
    position: fixed;
    width: 500px;
    height: 100%;
    min-height: 100vh;
    align-content: center;
    top: 0;
    background: rgba(255, 255, 255, .25);
    z-index: 999;
    left: calc((100vw - 500px) / 2);
}

.loading div {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.loading img {
    width: 64px;
}

.next-section {
    position: absolute;
    top: -60px;
    width: 100%;
    height: calc(100% + 60px);
    padding: 10px;
    background: #fff;
    align-content: center;
}

.next-section #next-btn {
    width: 100%;
    padding: 10px 0;
    background: #b41d14;
    color: #fff;
}

.msg {
    background: linear-gradient(90deg, #3c0303, #8f0000 50%, #3c0303);
    background: -webkit-linear-gradient(0deg, #3c0303, #8f0000 50%, #3c0303);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    font-size: 30px;
    font-weight: bold;
    /* padding: 50% 0; */
}

.msg:first-child {
    margin-top: 50%;
}

/* 
.msg:not(:first-child) {
    padding-bottom: 40%;
} */

.hr {
    margin: 25px;
}

.page-top {
    position: fixed;
    right: calc(((100vw - 500px) / 2) + 10px);
    bottom: 150px;
    z-index: 2;
}

.page-top button {
    padding: 5px 10px;
    background: #b40000;
    color: #fff;
    border-radius: 16px;
    margin-bottom: 10px;
}

#pull-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    text-align: center;
    line-height: 80px;
    background: #e03229;
    color: #fff;
    font-size: 20px;
    z-index: 9999;
    transform: translateY(-100%);
    transition: transform 0.2s ease;
}

#pull-indicator.show {
    transform: translateY(0);
}

.w-100 {
    width: 100% !important;
}

@media screen and (max-width: 500px) {
    .input-area {
        margin-bottom: 30px;
    }

    .option-area {
        font-size: 12px;
    }

    .select-btn {
        /* padding: 2px 6px; */
        padding: 6px 10px;
        font-size: 15px;
    }

    header {
        width: 100%;
    }

    footer {
        width: 100%;
    }

    .select-list {
        width: 95%;
    }

    .kaiseki-tags ul li,
    .enshutsu-tags ul li,
    .select-list .select-list-area li {
        padding: 5px 0;
    }

    .page-top {
        right: 10px;
        bottom: 175px;
    }
}