/* /Layout/MainLayout.razor.rz.scp.css */
.page[b-fdckxpgmp7] {
    position: relative;
    display: flex;
    flex-direction: column;
}

main[b-fdckxpgmp7] {
    flex: 1;
}

.sidebar[b-fdckxpgmp7] {
    background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
}

.top-row[b-fdckxpgmp7] {
    background-color: #f7f7f7;
    border-bottom: 1px solid #d6d5d5;
    justify-content: flex-end;
    height: 3.5rem;
    display: flex;
    align-items: center;
}

    .top-row[b-fdckxpgmp7]  a, .top-row[b-fdckxpgmp7]  .btn-link {
        white-space: nowrap;
        margin-left: 1.5rem;
        text-decoration: none;
    }

    .top-row[b-fdckxpgmp7]  a:hover, .top-row[b-fdckxpgmp7]  .btn-link:hover {
        text-decoration: underline;
    }

    .top-row[b-fdckxpgmp7]  a:first-child {
        overflow: hidden;
        text-overflow: ellipsis;
    }

@media (max-width: 640.98px) {
    .top-row[b-fdckxpgmp7] {
        justify-content: space-between;
    }

    .top-row[b-fdckxpgmp7]  a, .top-row[b-fdckxpgmp7]  .btn-link {
        margin-left: 0;
    }
}

@media (min-width: 641px) {
    .page[b-fdckxpgmp7] {
        flex-direction: row;
    }

    .sidebar[b-fdckxpgmp7] {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .top-row[b-fdckxpgmp7] {
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .top-row.auth[b-fdckxpgmp7]  a:first-child {
        flex: 1;
        text-align: right;
        width: 0;
    }

    .top-row[b-fdckxpgmp7], article[b-fdckxpgmp7] {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }
}
/* /Layout/NavMenu.razor.rz.scp.css */
.navbar-toggler[b-irado1uip3] {
    background-color: rgba(255, 255, 255, 0.1);
}

.top-row[b-irado1uip3] {
    min-height: 3.5rem;
    background-color: rgba(0,0,0,0.4);
}

.navbar-brand[b-irado1uip3] {
    font-size: 1.1rem;
}

.bi[b-irado1uip3] {
    display: inline-block;
    position: relative;
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    top: -1px;
    background-size: cover;
}

.bi-house-door-fill-nav-menu[b-irado1uip3] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-house-door-fill' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5Z'/%3E%3C/svg%3E");
}

.bi-plus-square-fill-nav-menu[b-irado1uip3] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-plus-square-fill' viewBox='0 0 16 16'%3E%3Cpath d='M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm6.5 4.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3a.5.5 0 0 1 1 0z'/%3E%3C/svg%3E");
}

.bi-list-nested-nav-menu[b-irado1uip3] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-list-nested' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M4.5 11.5A.5.5 0 0 1 5 11h10a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 3 7h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 1 3h10a.5.5 0 0 1 0 1H1a.5.5 0 0 1-.5-.5z'/%3E%3C/svg%3E");
}

.nav-item[b-irado1uip3] {
    font-size: 0.9rem;
    padding-bottom: 0.5rem;
}

    .nav-item:first-of-type[b-irado1uip3] {
        padding-top: 1rem;
    }

    .nav-item:last-of-type[b-irado1uip3] {
        padding-bottom: 1rem;
    }

    .nav-item[b-irado1uip3]  a {
        color: #d7d7d7;
        border-radius: 4px;
        height: 3rem;
        display: flex;
        align-items: center;
        line-height: 3rem;
    }

.nav-item[b-irado1uip3]  a.active {
    background-color: rgba(255,255,255,0.37);
    color: white;
}

.nav-item[b-irado1uip3]  a:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

@media (min-width: 641px) {
    .navbar-toggler[b-irado1uip3] {
        display: none;
    }

    .collapse[b-irado1uip3] {
        /* Never collapse the sidebar for wide screens */
        display: block;
    }

    .nav-scrollable[b-irado1uip3] {
        /* Allow sidebar to scroll for tall menus */
        height: calc(100vh - 3.5rem);
        overflow-y: auto;
    }
}
/* /Pages/ChatPage.razor.rz.scp.css */

.gpt-page[b-1kfza8eov3] {
    display: flex;
    height: 100dvh;
    background: #f7f7f8;
    overflow: hidden;
    box-sizing: border-box;
}

.gpt-sidebar[b-1kfza8eov3] {
    width: 260px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: #f9f9fb;
    border-right: 1px solid #e5e7eb;
    transition: width 0.2s ease;
    overflow: hidden;
    min-height: 0;
}

.gpt-page.sidebar-collapsed .gpt-sidebar[b-1kfza8eov3] {
    width: 72px;
}

.gpt-sidebar-top[b-1kfza8eov3] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    height: 56px;
    min-height: 56px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.gpt-page.sidebar-collapsed .gpt-sidebar-top[b-1kfza8eov3] {
    justify-content: center;
    padding: 10px 8px;
}

.gpt-sidebar-brand[b-1kfza8eov3] {
    font-size: 17px;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* =========================================================
   左メニュー上部アクション
   新しいチャット / チャット設定
   ========================================================= */
.gpt-sidebar-actions[b-1kfza8eov3] {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px 12px 12px 4px;
    border-bottom: none;
    flex-shrink: 0;
}

/* RadzenButton本体 */
[b-1kfza8eov3] .gpt-sidebar-action-btn {
    width: 100% !important;
    height: 36px !important;
    min-height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 0 4px !important;
    border: none !important;
    border-radius: 8px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #111827 !important;
    opacity: 1 !important;
    font-weight: 400 !important;
}

    /* hover */
    [b-1kfza8eov3] .gpt-sidebar-action-btn:hover {
        background: #f3f4f6 !important;
        color: #111827 !important;
    }

    /* RadzenButton内部 */
    [b-1kfza8eov3] .gpt-sidebar-action-btn .rz-button-box {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 10px !important;
    }

    /* アイコン */
    [b-1kfza8eov3] .gpt-sidebar-action-btn .rz-button-icon-left {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        margin: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 6px !important;
        background: #eef1f4 !important;
        color: #263238 !important;
        font-size: 22px !important;
        opacity: 1 !important;
    }

    /* 文字 */
    [b-1kfza8eov3] .gpt-sidebar-action-btn .rz-button-text {
        color: #111827 !important;
        font-size: 14px !important;
        font-weight: 400 !important;
        opacity: 1 !important;
        white-space: nowrap !important;
    }

/* サイドバー折りたたみ時はアイコンだけ表示 */
.gpt-page.sidebar-collapsed .gpt-sidebar-actions[b-1kfza8eov3] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 0 12px 0;
    border-bottom: none;
}

[b-1kfza8eov3] .gpt-page.sidebar-collapsed .gpt-sidebar-action-btn {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    padding: 0 !important;
    justify-content: center !important;
}

    [b-1kfza8eov3] .gpt-page.sidebar-collapsed .gpt-sidebar-action-btn .rz-button-box {
        justify-content: center !important;
        gap: 0 !important;
    }

    [b-1kfza8eov3] .gpt-page.sidebar-collapsed .gpt-sidebar-action-btn .rz-button-icon-left {
        margin: 0 !important;
    }

    [b-1kfza8eov3] .gpt-page.sidebar-collapsed .gpt-sidebar-action-btn .rz-button-text {
        display: none !important;
    }


/* サイドバー折りたたみ時のアイコンボタン */
[b-1kfza8eov3] .gpt-sidebar-icon-btn {
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: #263238 !important;
    box-shadow: none !important;
    border: none !important;
}

    /* RadzenButton内部 */
    [b-1kfza8eov3] .gpt-sidebar-icon-btn .rz-button-box {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        min-height: 34px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 6px !important;
        background: #eef1f4 !important;
    }

    /* アイコン本体 */
    [b-1kfza8eov3] .gpt-sidebar-icon-btn .rz-button-icon-left,
    [b-1kfza8eov3] .gpt-sidebar-icon-btn .rz-button-icon {
        margin: 0 !important;
        font-size: 22px !important;
        line-height: 1 !important;
        color: #263238 !important;
    }

/* 旧クラスが残っていても崩れないように最低限残す */
.gpt-new-chat-btn[b-1kfza8eov3] {
    width: 100%;
    height: 36px;
    border-radius: 8px;
    font-weight: 400;
}

.gpt-sidebar-settings-icon[b-1kfza8eov3],
.gpt-sidebar-icon-btn[b-1kfza8eov3] {
    flex-shrink: 0;
}

.gpt-thread-list[b-1kfza8eov3] {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 8px;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

    .gpt-thread-list[b-1kfza8eov3]::-webkit-scrollbar {
        width: 6px;
    }

    .gpt-thread-list[b-1kfza8eov3]::-webkit-scrollbar-track {
        background: transparent;
    }

    .gpt-thread-list[b-1kfza8eov3]::-webkit-scrollbar-thumb {
        background: rgba(156, 163, 175, 0.45);
        border-radius: 999px;
    }

.gpt-thread-row[b-1kfza8eov3] {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 6px;
    position: relative;
}

.gpt-thread-item[b-1kfza8eov3] {
    flex: 1;
    background: transparent;
    border: none;
    border-radius: 10px;
    text-align: left;
    padding: 12px 12px;
    cursor: pointer;
    color: #111827;
    min-width: 0;
    transition: background 0.15s ease;
}

    .gpt-thread-item:hover[b-1kfza8eov3] {
        background: #ececf1;
    }

    .gpt-thread-item.active[b-1kfza8eov3] {
        background: #e5e7eb;
    }

.gpt-thread-title-row[b-1kfza8eov3] {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.gpt-thread-pin-mark[b-1kfza8eov3] {
    flex: 0 0 auto;
    font-size: 12px;
    line-height: 1;
    opacity: 0.9;
}

.gpt-thread-title[b-1kfza8eov3] {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 400;
    color: #111827;
    line-height: 1.35;
}

.gpt-thread-meta[b-1kfza8eov3] {
    margin-top: 4px;
    font-size: 14px;
    color: #6b7280;
}

.gpt-thread-delete[b-1kfza8eov3] {
    flex-shrink: 0;
    align-self: flex-start;
    width: 36px;
    min-width: 36px;
    height: 36px;
    border-radius: 10px;
    color: #9ca3af;
}

.gpt-thread-menu-wrap[b-1kfza8eov3] {
    position: relative;
    flex-shrink: 0;
}

.gpt-thread-menu-btn[b-1kfza8eov3] {
    width: 36px;
    min-width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 10px;
    color: #6b7280;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .gpt-thread-menu-btn:hover[b-1kfza8eov3] {
        background: #ececf1;
        color: #111827;
    }

.gpt-thread-menu[b-1kfza8eov3] {
    position: absolute;
    right: 0;
    min-width: 150px;
    max-height: 220px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 6px;
    z-index: 9999;
}

    .gpt-thread-menu.open-down[b-1kfza8eov3] {
        top: 40px;
        bottom: auto;
    }

    .gpt-thread-menu.open-up[b-1kfza8eov3] {
        top: auto;
        bottom: 40px;
    }

.gpt-thread-menu-item[b-1kfza8eov3] {
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    color: #111827;
    cursor: pointer;
}

    .gpt-thread-menu-item:hover[b-1kfza8eov3] {
        background: #f3f4f6;
    }

    .gpt-thread-menu-item.danger[b-1kfza8eov3] {
        color: #b91c1c;
    }

        .gpt-thread-menu-item.danger:hover[b-1kfza8eov3] {
            background: #fef2f2;
        }

.gpt-thread-pin[b-1kfza8eov3] {
    margin-right: 6px;
}

.gpt-main[b-1kfza8eov3] {
    flex: 1;
    min-width: 0;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
}

.gpt-topbar[b-1kfza8eov3] {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: none;
    background: #ffffff;
    flex-shrink: 0;
}

.gpt-topbar-left[b-1kfza8eov3] {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gpt-subtitle[b-1kfza8eov3] {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.gpt-alert-wrap[b-1kfza8eov3] {
    margin: 12px 120px 16px 16px;
    flex-shrink: 0;
}

[b-1kfza8eov3] .gpt-alert {
    border-radius: 12px !important;
    margin: 0 !important;
}

.gpt-office-confirm-actions[b-1kfza8eov3] {
    display: flex;
    gap: 8px;
    margin: 0 120px 12px 16px;
    flex-shrink: 0;
}

.gpt-alert-detail[b-1kfza8eov3] {
    margin-top: 8px;
    white-space: pre-wrap;
    font-size: 12px;
}

.gpt-chat-shell[b-1kfza8eov3] {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
}

.gpt-messages[b-1kfza8eov3] {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 0 16px 0;
    box-sizing: border-box;
    background: #ffffff;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

    .gpt-messages[b-1kfza8eov3]::-webkit-scrollbar {
        width: 6px;
    }

    .gpt-messages[b-1kfza8eov3]::-webkit-scrollbar-track {
        background: transparent;
    }

    .gpt-messages[b-1kfza8eov3]::-webkit-scrollbar-thumb {
        background: rgba(156, 163, 175, 0.45);
        border-radius: 999px;
    }

.gpt-messages-inner[b-1kfza8eov3] {
    width: min(980px, calc(100% - 32px));
    margin: 0 auto;
    box-sizing: border-box;
}

.gpt-message-row[b-1kfza8eov3] {
    display: flex;
    margin-bottom: 20px;
}

    .gpt-message-row.user[b-1kfza8eov3] {
        justify-content: flex-end;
    }

    .gpt-message-row.assistant[b-1kfza8eov3] {
        justify-content: flex-start;
    }

.gpt-message-container[b-1kfza8eov3] {
    max-width: min(820px, 90%);
}

.gpt-message-role[b-1kfza8eov3] {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 6px;
    padding: 0 4px;
}

.gpt-message-bubble[b-1kfza8eov3] {
    border-radius: 16px;
    padding: 14px 16px;
    box-sizing: border-box;
    word-break: break-word;
}

.user-bubble[b-1kfza8eov3] {
    background: #faf9f2;
    color: #111827;
}

.assistant-bubble[b-1kfza8eov3] {
    background: #f8fcf8;
    color: #111827;
    border: 1px solid #eef4ee;
}

/* =========================================================
   メッセージ本文
   ========================================================= */
.gpt-message-text[b-1kfza8eov3] {
    line-height: 1.7;
    word-break: break-word;
    overflow-x: auto;
}

    .gpt-message-text[b-1kfza8eov3],
    .gpt-message-text p[b-1kfza8eov3],
    .gpt-message-text li[b-1kfza8eov3],
    .gpt-message-text div[b-1kfza8eov3],
    .gpt-message-text span[b-1kfza8eov3] {
        font-size: 16px;
    }

        /* MarkupStringで生成されたHTMLには ::deep で当てる */
        .gpt-message-text[b-1kfza8eov3]  p,
        .chat-message-content[b-1kfza8eov3]  p {
            margin: 0 0 10px 0;
            line-height: 1.7;
        }

            .gpt-message-text[b-1kfza8eov3]  p:last-child,
            .chat-message-content[b-1kfza8eov3]  p:last-child {
                margin-bottom: 0;
            }

        .gpt-message-text[b-1kfza8eov3]  ul,
        .gpt-message-text[b-1kfza8eov3]  ol,
        .chat-message-content[b-1kfza8eov3]  ul,
        .chat-message-content[b-1kfza8eov3]  ol {
            margin: 8px 0 12px 24px;
            padding-left: 18px;
        }

        .gpt-message-text[b-1kfza8eov3]  li,
        .chat-message-content[b-1kfza8eov3]  li {
            margin: 4px 0;
            line-height: 1.7;
        }

        .gpt-message-text[b-1kfza8eov3]  h1,
        .gpt-message-text[b-1kfza8eov3]  h2,
        .gpt-message-text[b-1kfza8eov3]  h3,
        .gpt-message-text[b-1kfza8eov3]  h4,
        .gpt-message-text[b-1kfza8eov3]  h5,
        .gpt-message-text[b-1kfza8eov3]  h6,
        .chat-message-content[b-1kfza8eov3]  h1,
        .chat-message-content[b-1kfza8eov3]  h2,
        .chat-message-content[b-1kfza8eov3]  h3,
        .chat-message-content[b-1kfza8eov3]  h4,
        .chat-message-content[b-1kfza8eov3]  h5,
        .chat-message-content[b-1kfza8eov3]  h6 {
            margin: 0.8em 0 0.4em;
            line-height: 1.35;
            font-weight: 700;
        }

        .gpt-message-text[b-1kfza8eov3]  h1,
        .chat-message-content[b-1kfza8eov3]  h1 {
            font-size: 1.4rem;
        }

        .gpt-message-text[b-1kfza8eov3]  h2,
        .chat-message-content[b-1kfza8eov3]  h2 {
            font-size: 1.1rem;
        }

        .gpt-message-text[b-1kfza8eov3]  h3,
        .chat-message-content[b-1kfza8eov3]  h3 {
            font-size: 1rem;
        }

        .gpt-message-text[b-1kfza8eov3]  h4,
        .gpt-message-text[b-1kfza8eov3]  h5,
        .gpt-message-text[b-1kfza8eov3]  h6,
        .chat-message-content[b-1kfza8eov3]  h4,
        .chat-message-content[b-1kfza8eov3]  h5,
        .chat-message-content[b-1kfza8eov3]  h6 {
            font-size: 0.95rem;
        }

        /* =========================================================
   Markdown表
   ChatPage.razor.css はCSS isolation対象のため ::deep が必要
   ========================================================= */
        .gpt-message-text[b-1kfza8eov3]  table,
        .chat-message-content[b-1kfza8eov3]  table {
            border-collapse: collapse !important;
            width: auto;
            min-width: 360px;
            max-width: 100%;
            margin: 14px 0;
            font-size: 15px;
            background-color: #ffffff;
            display: table;
        }

        .gpt-message-text[b-1kfza8eov3]  thead,
        .chat-message-content[b-1kfza8eov3]  thead {
            display: table-header-group;
        }

        .gpt-message-text[b-1kfza8eov3]  tbody,
        .chat-message-content[b-1kfza8eov3]  tbody {
            display: table-row-group;
        }

        .gpt-message-text[b-1kfza8eov3]  tr,
        .chat-message-content[b-1kfza8eov3]  tr {
            display: table-row;
        }

        .gpt-message-text[b-1kfza8eov3]  th,
        .gpt-message-text[b-1kfza8eov3]  td,
        .chat-message-content[b-1kfza8eov3]  th,
        .chat-message-content[b-1kfza8eov3]  td {
            display: table-cell;
            border: 1px solid #d0d7de !important;
            padding: 8px 10px;
            text-align: left;
            vertical-align: top;
            line-height: 1.6;
            white-space: nowrap;
            word-break: keep-all;
        }

        .gpt-message-text[b-1kfza8eov3]  th,
        .chat-message-content[b-1kfza8eov3]  th {
            background-color: #f6f8fa;
            font-weight: 600;
        }

        .gpt-message-text[b-1kfza8eov3]  tbody tr:nth-child(even),
        .chat-message-content[b-1kfza8eov3]  tbody tr:nth-child(even) {
            background-color: #fafafa;
        }

        /* =========================================================
   コードブロック
   ========================================================= */
        .gpt-message-text[b-1kfza8eov3]  pre,
        .chat-message-content[b-1kfza8eov3]  pre {
            overflow-x: auto;
            padding: 12px;
            border-radius: 10px;
            background: #111827;
            color: #f9fafb;
            font-size: 13px;
            border: 1px solid #d0d7de;
        }

        .gpt-message-text[b-1kfza8eov3]  code,
        .chat-message-content[b-1kfza8eov3]  code {
            font-family: Consolas, Monaco, "Courier New", monospace;
            font-size: 13px;
        }

/* =========================================================
   考え中表示
   ========================================================= */
.gpt-message-thinking[b-1kfza8eov3] {
    color: #6b7280;
    font-style: italic;
    opacity: 0.9;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.gpt-thinking-text[b-1kfza8eov3] {
    display: inline-block;
}

.gpt-thinking-dots[b-1kfza8eov3] {
    display: inline-flex;
    min-width: 18px;
}

    .gpt-thinking-dots span[b-1kfza8eov3] {
        display: inline-block;
        animation: gpt-thinking-blink-b-1kfza8eov3 1.4s infinite;
        opacity: 0.2;
    }

        .gpt-thinking-dots span:nth-child(1)[b-1kfza8eov3] {
            animation-delay: 0s;
        }

        .gpt-thinking-dots span:nth-child(2)[b-1kfza8eov3] {
            animation-delay: 0.2s;
        }

        .gpt-thinking-dots span:nth-child(3)[b-1kfza8eov3] {
            animation-delay: 0.4s;
        }

@keyframes gpt-thinking-blink-b-1kfza8eov3 {
    0%, 20% {
        opacity: 0.2;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.2;
    }
}

/* =========================================================
   画像表示
   ========================================================= */
.gpt-message-image-wrap[b-1kfza8eov3] {
    position: relative;
    display: inline-block;
    margin-bottom: 10px;
}

.gpt-message-image[b-1kfza8eov3] {
    display: block;
    max-width: 100%;
    max-height: 240px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
}

.gpt-image-actions[b-1kfza8eov3] {
    margin-top: 8px;
}

.gpt-image-action-link[b-1kfza8eov3] {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #dbe2ea;
}

    .gpt-image-action-link:hover[b-1kfza8eov3] {
        background: #eef4f8;
    }

/* =========================================================
   添付ファイル
   ========================================================= */
.gpt-file-chip[b-1kfza8eov3] {
    display: inline-block;
    margin-bottom: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    font-size: 12px;
}

.gpt-attached-file[b-1kfza8eov3] {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.gpt-attached-file-link[b-1kfza8eov3] {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #2563eb;
    text-decoration: none;
    word-break: break-all;
}

    .gpt-attached-file-link:hover[b-1kfza8eov3] {
        text-decoration: underline;
    }

.gpt-attached-file-name[b-1kfza8eov3] {
    color: #111827;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    word-break: break-all;
}

.gpt-attached-file-card[b-1kfza8eov3] {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.gpt-attached-file-icon[b-1kfza8eov3] {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #eef6f8;
    color: #4f7f8a;
}

.gpt-attached-file-info[b-1kfza8eov3] {
    min-width: 0;
    max-width: 360px;
}

.gpt-attached-file-type[b-1kfza8eov3] {
    margin-top: 2px;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.3;
}

.gpt-attached-file-download[b-1kfza8eov3] {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #4f7f8a;
    text-decoration: none;
}

    .gpt-attached-file-download:hover[b-1kfza8eov3] {
        background: #eef6f8;
    }

/* =========================================================
   入力欄
   ========================================================= */
.gpt-input-shell[b-1kfza8eov3] {
    flex: 0 0 auto;
    width: min(980px, calc(100% - 32px));
    margin: 0 auto;
    padding: 12px 0 20px 0;
    box-sizing: border-box;
    border-top: 1px solid #ececf1;
    background: #ffffff;
}

.gpt-pending-image-box[b-1kfza8eov3] {
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
}

.gpt-pending-image-header[b-1kfza8eov3] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #4b5563;
    font-weight: 600;
}

.gpt-pending-image-preview[b-1kfza8eov3] {
    max-width: 240px;
    border-radius: 10px;
    display: block;
    border: 1px solid #d1d5db;
}

.gpt-input-row[b-1kfza8eov3] {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.gpt-file-picker[b-1kfza8eov3] {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    overflow: hidden;
}

    .gpt-file-picker[b-1kfza8eov3]  .gpt-file-input-overlay,
    .gpt-file-input-overlay[b-1kfza8eov3] {
        position: absolute;
        inset: 0;
        opacity: 0;
        cursor: pointer;
        width: 44px;
        height: 44px;
        z-index: 2;
    }

.gpt-attach-button[b-1kfza8eov3] {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f3f4f6;
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    border: 1px solid #d1d5db;
    box-sizing: border-box;
    transition: all 0.15s ease;
}

.gpt-file-picker:hover .gpt-attach-button[b-1kfza8eov3] {
    background: #f9fafb;
    border-color: #c4ccd6;
    color: #111827;
}

.gpt-textarea[b-1kfza8eov3] {
    flex: 1;
    min-height: 52px;
    max-height: 180px;
    resize: vertical;
    border: 1px solid #d1d5db;
    border-radius: 16px;
    padding: 14px 16px;
    font-size: 16px;
    line-height: 1.5;
    box-sizing: border-box;
    outline: none;
    overflow-y: auto;
    background: #ffffff;
}

    .gpt-textarea:focus[b-1kfza8eov3] {
        border-color: #9ca3af;
        box-shadow: 0 0 0 2px rgba(156, 163, 175, 0.15);
    }

.gpt-action-buttons[b-1kfza8eov3] {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.gpt-action-btn[b-1kfza8eov3] {
    min-width: 88px;
    height: 42px;
    border-radius: 14px;
    font-weight: 600;
}

.gpt-send-btn[b-1kfza8eov3] {
    font-weight: 600;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.15);
}

.gpt-sidebar-collapse-btn[b-1kfza8eov3],
.gpt-mobile-sidebar-open[b-1kfza8eov3] {
    appearance: none;
    -webkit-appearance: none;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border: none;
    background: transparent;
    border-radius: 8px;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}

    .gpt-sidebar-collapse-btn:hover[b-1kfza8eov3],
    .gpt-mobile-sidebar-open:hover[b-1kfza8eov3] {
        background: #f3f4f6;
    }

.gpt-sidebar-toggle-radzen-icon[b-1kfza8eov3] {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: transparent;
    color: #111827;
    font-size: 20px;
    line-height: 1;
}

.gpt-sidebar-collapse-btn:hover .gpt-sidebar-toggle-radzen-icon[b-1kfza8eov3],
.gpt-mobile-sidebar-open:hover .gpt-sidebar-toggle-radzen-icon[b-1kfza8eov3] {
    background: #eef1f4;
}

.gpt-input-note[b-1kfza8eov3] {
    margin-top: 10px;
    text-align: center;
    font-size: 12px;
    line-height: 1.5;
    color: #6b7280;
}

/* チャット欄全体の文字 */
#chatMessages[b-1kfza8eov3] {
    font-size: 16px;
    line-height: 1.7;
}

    #chatMessages p[b-1kfza8eov3],
    #chatMessages div[b-1kfza8eov3],
    #chatMessages li[b-1kfza8eov3],
    #chatMessages table[b-1kfza8eov3],
    #chatMessages th[b-1kfza8eov3],
    #chatMessages td[b-1kfza8eov3] {
        font-size: 16px;
        line-height: 1.7;
    }

/* =========================================================
   回答コピーアイコン
   Razor側で描画されるので ::deep は不要
   ========================================================= */
.message-actions[b-1kfza8eov3] {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-top: 10px;
}

.message-copy-button[b-1kfza8eov3] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    margin: 0;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 6px;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
}

    .message-copy-button:hover[b-1kfza8eov3] {
        background: #f3f4f6;
        color: #374151;
    }

    .message-copy-button:active[b-1kfza8eov3] {
        background: #e5e7eb;
    }

.message-copy-icon[b-1kfza8eov3] {
    font-family: 'Material Symbols Outlined' !important;
    font-weight: 400 !important;
    font-style: normal !important;
    font-size: 18px !important;
    line-height: 1 !important;
    width: 18px !important;
    height: 18px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    direction: ltr;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24 !important;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'liga';
}

    .message-copy-icon.copied[b-1kfza8eov3] {
        color: #16a34a;
    }

/* =========================================================
   コードブロックコピーアイコン
   JavaScriptで後から生成するため ::deep が必要
   ========================================================= */
[b-1kfza8eov3] .gpt-codeblock-copy {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 6px !important;
    background: transparent !important;
    color: #6b7280 !important;
    cursor: pointer !important;
}

    [b-1kfza8eov3] .gpt-codeblock-copy:hover {
        background: #f3f4f6 !important;
        color: #374151 !important;
    }

    [b-1kfza8eov3] .gpt-codeblock-copy:active {
        background: #e5e7eb !important;
    }

[b-1kfza8eov3] .gpt-codeblock-copy-icon {
    font-family: 'Material Symbols Outlined' !important;
    font-weight: 400 !important;
    font-style: normal !important;
    font-size: 18px !important;
    line-height: 1 !important;
    width: 18px !important;
    height: 18px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center;
    letter-spacing: normal !important;
    text-transform: none !important;
    white-space: nowrap !important;
    direction: ltr !important;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24 !important;
    -webkit-font-feature-settings: 'liga' !important;
    -webkit-font-smoothing: antialiased !important;
    font-feature-settings: 'liga' !important;
}

    [b-1kfza8eov3] .gpt-codeblock-copy-icon.copied {
        color: #16a34a !important;
    }

    [b-1kfza8eov3] .gpt-codeblock-copy-icon.failed {
        color: #dc2626 !important;
    }


.gpt-thread-section-title[b-1kfza8eov3] {
    padding: 12px 16px 4px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    line-height: 1.4;
    flex-shrink: 0;
}

.gpt-page[b-1kfza8eov3] {
    background: var(--app-bg);
    color: var(--app-text);
}

.gpt-sidebar[b-1kfza8eov3] {
    background: var(--app-surface-subtle);
    border-right: 1px solid var(--app-border);
    color: var(--app-text);
}

.gpt-main[b-1kfza8eov3] {
    background: var(--app-bg);
    color: var(--app-text);
}

.gpt-message-assistant[b-1kfza8eov3] {
    background: var(--app-surface);
    color: var(--app-text);
}

.gpt-message-user[b-1kfza8eov3] {
    color: var(--app-text);
}

.gpt-thread-item[b-1kfza8eov3] {
    color: var(--app-text);
}

    .gpt-thread-item:hover[b-1kfza8eov3] {
        background: var(--app-hover);
    }

.gpt-sidebar-title[b-1kfza8eov3],
.gpt-section-title[b-1kfza8eov3] {
    color: var(--app-text-muted);
}


/* =========================================================
   レスポンシブ
   ========================================================= */
@media (max-width: 900px) {
    .gpt-sidebar[b-1kfza8eov3] {
        width: 240px;
    }

    .gpt-page.sidebar-collapsed .gpt-sidebar[b-1kfza8eov3] {
        width: 64px;
    }

    .gpt-message-container[b-1kfza8eov3] {
        max-width: 96%;
    }

    .gpt-messages[b-1kfza8eov3] {
        padding: 16px 0 12px 0;
    }

    .gpt-messages-inner[b-1kfza8eov3] {
        width: min(980px, calc(100% - 24px));
    }

    .gpt-input-shell[b-1kfza8eov3] {
        width: min(980px, calc(100% - 24px));
        padding: 12px 0 16px 0;
    }

    .gpt-input-row[b-1kfza8eov3] {
        gap: 10px;
    }

    .gpt-page.sidebar-collapsed .gpt-sidebar-action-btn[b-1kfza8eov3] {
        width: 40px;
        height: 40px;
    }
}


/* =========================================================
   ダークモード対応
   ========================================================= */

.gpt-page[b-1kfza8eov3] {
    background: var(--app-bg);
    color: var(--app-text);
}

.gpt-sidebar[b-1kfza8eov3] {
    background: var(--app-surface-subtle);
    border-right-color: var(--app-border);
    color: var(--app-text);
}

.gpt-main[b-1kfza8eov3],
.gpt-topbar[b-1kfza8eov3],
.gpt-chat-shell[b-1kfza8eov3],
.gpt-messages[b-1kfza8eov3],
.gpt-input-shell[b-1kfza8eov3] {
    background: var(--app-bg);
    color: var(--app-text);
}

.gpt-sidebar-brand[b-1kfza8eov3],
.gpt-subtitle[b-1kfza8eov3],
.gpt-thread-title[b-1kfza8eov3],
.gpt-thread-item[b-1kfza8eov3],
.gpt-attached-file-name[b-1kfza8eov3] {
    color: var(--app-text);
}

.gpt-thread-meta[b-1kfza8eov3],
.gpt-thread-section-title[b-1kfza8eov3],
.gpt-message-role[b-1kfza8eov3],
.gpt-input-note[b-1kfza8eov3] {
    color: var(--app-text-muted);
}

.gpt-thread-item:hover[b-1kfza8eov3],
.gpt-thread-menu-btn:hover[b-1kfza8eov3],
.message-copy-button:hover[b-1kfza8eov3],
.gpt-sidebar-collapse-btn:hover[b-1kfza8eov3],
.gpt-mobile-sidebar-open:hover[b-1kfza8eov3] {
    background: var(--app-hover);
}

.gpt-thread-item.active[b-1kfza8eov3] {
    background: var(--app-hover);
}

.gpt-message-bubble[b-1kfza8eov3],
.assistant-bubble[b-1kfza8eov3],
.user-bubble[b-1kfza8eov3] {
    color: var(--app-text);
}

.assistant-bubble[b-1kfza8eov3] {
    background: var(--app-surface);
    border-color: var(--app-border);
}

.user-bubble[b-1kfza8eov3] {
    background: var(--app-surface-subtle);
}

.gpt-textarea[b-1kfza8eov3] {
    background: var(--app-surface);
    color: var(--app-text);
    border-color: var(--app-border);
}

    .gpt-textarea[b-1kfza8eov3]::placeholder {
        color: var(--app-text-muted);
    }

.gpt-attach-button[b-1kfza8eov3] {
    background: var(--app-surface);
    color: var(--app-text);
    border-color: var(--app-border);
}

.gpt-file-picker:hover .gpt-attach-button[b-1kfza8eov3] {
    background: var(--app-hover);
    color: var(--app-text);
    border-color: var(--app-border);
}

.gpt-input-shell[b-1kfza8eov3] {
    border-top-color: var(--app-border);
}

.gpt-thread-menu[b-1kfza8eov3] {
    background: var(--app-surface);
    border-color: var(--app-border);
    color: var(--app-text);
}

.gpt-thread-menu-item[b-1kfza8eov3] {
    color: var(--app-text);
}

    .gpt-thread-menu-item:hover[b-1kfza8eov3] {
        background: var(--app-hover);
    }

.gpt-pending-image-box[b-1kfza8eov3],
.gpt-attached-file-card[b-1kfza8eov3] {
    background: var(--app-surface);
    border-color: var(--app-border);
    color: var(--app-text);
}

.gpt-attached-file-type[b-1kfza8eov3],
.gpt-pending-image-header[b-1kfza8eov3] {
    color: var(--app-text-muted);
}

/* =========================================================
   ダークモード微調整
   ========================================================= */

/* 左メニューのボタン文字・アイコン */
.dark-mode[b-1kfza8eov3]  .gpt-sidebar-action-btn {
    color: var(--app-text) !important;
}

    .dark-mode[b-1kfza8eov3]  .gpt-sidebar-action-btn:hover {
        background: var(--app-hover) !important;
        color: var(--app-text) !important;
    }

    .dark-mode[b-1kfza8eov3]  .gpt-sidebar-action-btn .rz-button-icon-left {
        background: #1f2937 !important;
        color: #f9fafb !important;
    }

    .dark-mode[b-1kfza8eov3]  .gpt-sidebar-action-btn .rz-button-text {
        color: var(--app-text) !important;
    }

/* 折りたたみ時のアイコンボタン */
.dark-mode[b-1kfza8eov3]  .gpt-sidebar-icon-btn {
    color: var(--app-text) !important;
}

    .dark-mode[b-1kfza8eov3]  .gpt-sidebar-icon-btn .rz-button-box {
        background: #1f2937 !important;
    }

    .dark-mode[b-1kfza8eov3]  .gpt-sidebar-icon-btn .rz-button-icon-left,
    .dark-mode[b-1kfza8eov3]  .gpt-sidebar-icon-btn .rz-button-icon {
        color: #f9fafb !important;
    }

/* サイドバー開閉アイコン */
.dark-mode .gpt-sidebar-toggle-radzen-icon[b-1kfza8eov3] {
    color: var(--app-text);
}

.dark-mode .gpt-sidebar-collapse-btn:hover .gpt-sidebar-toggle-radzen-icon[b-1kfza8eov3],
.dark-mode .gpt-mobile-sidebar-open:hover .gpt-sidebar-toggle-radzen-icon[b-1kfza8eov3] {
    background: var(--app-hover);
}

/* 右上アイコン */
.dark-mode[b-1kfza8eov3]  .user-icon,
.dark-mode[b-1kfza8eov3]  .rz-icon,
.dark-mode .user-icon-link[b-1kfza8eov3] {
    color: var(--app-text-muted) !important;
}

    .dark-mode .user-icon-link:hover[b-1kfza8eov3],
    .dark-mode[b-1kfza8eov3]  .user-icon:hover {
        color: var(--app-text) !important;
    }

/* 入力欄 */
.dark-mode .gpt-textarea[b-1kfza8eov3] {
    background: #1f2937;
    color: #f9fafb;
    border-color: #374151;
}

    .dark-mode .gpt-textarea[b-1kfza8eov3]::placeholder {
        color: #9ca3af;
    }

/* 添付ボタン */
.dark-mode .gpt-attach-button[b-1kfza8eov3] {
    background: #1f2937;
    color: #f9fafb;
    border-color: #374151;
}

.dark-mode .gpt-file-picker:hover .gpt-attach-button[b-1kfza8eov3] {
    background: #2d3748;
    border-color: #4b5563;
}

/* 送信ボタンの周辺 */
.dark-mode .gpt-input-note[b-1kfza8eov3] {
    color: #9ca3af;
}

/* 初期メッセージ・吹き出し */
.dark-mode .assistant-bubble[b-1kfza8eov3] {
    background: #1f2937;
    color: #f9fafb;
    border-color: #374151;
}

.dark-mode .user-bubble[b-1kfza8eov3] {
    background: #243041;
    color: #f9fafb;
}

/* スレッド一覧 */
.dark-mode .gpt-thread-item[b-1kfza8eov3] {
    color: var(--app-text);
}

.dark-mode .gpt-thread-title[b-1kfza8eov3] {
    color: var(--app-text);
}

.dark-mode .gpt-thread-meta[b-1kfza8eov3],
.dark-mode .gpt-thread-section-title[b-1kfza8eov3] {
    color: var(--app-text-muted);
}

.dark-mode .gpt-thread-item:hover[b-1kfza8eov3],
.dark-mode .gpt-thread-item.active[b-1kfza8eov3] {
    background: var(--app-hover);
}

.dark-mode .gpt-thread-menu-btn[b-1kfza8eov3] {
    color: var(--app-text-muted);
}

    .dark-mode .gpt-thread-menu-btn:hover[b-1kfza8eov3] {
        background: var(--app-hover);
        color: var(--app-text);
    }

/* 入力欄上の区切り線 */
.dark-mode .gpt-input-shell[b-1kfza8eov3] {
    border-top-color: #374151;
}
