.subContents {max-width:none !important;}

:root {
    color-scheme: light dark;
    --bg: #f4f6fb;
    --bg-dark: #0f172a;
    --text: #1f2937;
    --text-muted: #526281;
    --text-dark: #e5e7eb;
    --primary: #3864ff;
    --card: #ffffff;
    --card-dark: #1e293b;
    --border: #d5d9e6;
    --border-dark: #293548;
    --bubble-user: #3864ff;
    --bubble-user-dark: #4c6fff;
    --bubble-bot: #e8ecf8;
    --bubble-bot-dark: #273349;
}

* {
    box-sizing: border-box;
}

html,body {
    width:100%; height:100dvh;
    margin: 0; padding:0;
}

body, h1, h2, h3, p {
    margin: 0; padding:0;
    font-family: "Noto Sans KR";
}

body.theme-light {
    background: #fff;
    color:#000;
}

/* body.theme-dark {
    background: var(--bg-dark);
    color: var(--text-dark);
} */

.app-shell {
    /*min-height: 100dvh;*/
    display: flex;
    flex-direction: column;
    width:100%;
    max-width:900px;
    margin:0 auto;
    position:relative;
}

.app-header {
    width:100%; position:relative; padding:11px 12px; text-align:left; margin:20px 0;
}

.app-title {
    width:100%; position:relative;
}

.app-title .headInner {
    display:flex; flex-flow: row nowrap; align-items: center; justify-content: flex-start; gap:6px;
}

.app-title .headInner > p{
    font-size:20px; font-weight:500; color:#000;
}

.app-title > a {
    position:absolute; top:50%; right:12px; width:32px; height:32px; transform:translateY(-50%); background:#fff;
}

/* .badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    background: rgba(56, 100, 255, 0.12);
    color: var(--primary);
}

.app-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.55);
}

body.theme-dark .status-indicator {
    border-color: var(--border-dark);
    background: rgba(15, 23, 42, 0.65);
}

.status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #9ca3af;
}

.status-indicator[data-status="authenticated"] .status-dot {
    background: #22c55e;
}

.icon-button {
    border: none;
    background: transparent;
    padding: 0.45rem 0.65rem;
    border-radius: 0.65rem;
    cursor: pointer;
    font-size: 1rem;
    color: inherit;
    transition: background 0.2s ease;
}

.icon-button:hover {
    background: rgba(56, 100, 255, 0.12);
} */

main {
    width:100%; background:#fff; overflow-y:auto; height:calc(100dvh - 200px); position:relative;
}
 main::-webkit-scrollbar {
    display:none;
}
/*main::-webkit-scrollbar-track {
    background-color: #f5f5f5; padding:5px;
}
main::-webkit-scrollbar-thumb {
    background-color: #0098FF; border-radius:10px;
}
main::-webkit-scrollbar-button {
    display: none;
} */

.chatIntro {
    padding-top:60px; position:relative;
}

.chatIntro .inner {
    display:flex; flex-flow: column; align-items: center; justify-content: flex-start;
    position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); width:100%;
}

.chatIntro .inner > .introTit{
    font-size:22px; font-weight:500; line-height:150%; color:#000; margin:16px 0 20px; text-align:center;
}

.chatIntro .inner > .introTit span{
    color:#0098FF;
}

.chatIntro .inner > .introDesc{
    font-size:16px; font-weight:400; line-height:150%; color:#000; text-align:center; margin-bottom:60px;
}

.chatIntro .inner > .introDesc span{
    color: #0098FF;
}

.chat-main {
    padding:32px 20px;
}

.chat-history {
    width:100%; display:flex; flex-flow:column; gap:20px;
}

.chat-message {
    display: flex;
}

.chat-message.bot {
    flex-flow:column; gap:8px;
}

.chat-message.bot .profile{
    display:flex; flex-flow: row nowrap; align-items: center ;justify-content: flex-start; gap:8px;
}

.chat-message.bot .profile p{
    font-size: 14px; font-weight:500; line-height:160%;
}

.chat-message.user {
    justify-content: flex-end;
}

.bubble {
    padding: 14px 16px;
    border-radius: 1.2rem;
    line-height: 1.5;
    max-width: 70%;
    white-space:pre-line;

    font-size:16px;
    font-weight:400;
    line-height:150%;
    color:#000;

    box-shadow:3px 3px 10px #aaa;
}

.chat-message.user .bubble {
    background: #5C5C5C;
    color: #fff;
    border-radius:20px 0 20px 20px;
}

.chat-message.bot .bubble {
    background: #fff;
    color: #000;
    border-radius:0 20px 20px 20px;
}

.bubble .question {
    font-size:18px; font-weight:bold;
}

.question {
    font-size:18px;
    font-weight:normal;
    white-space: pre-line;
}

.bubble .waterMark {
    color:#5c5c5c;
}

.bubble .reference {
    font-weight:bold;
}


/* 기본: 모바일 */
.input-bar {
    width: 100%;
    position: relative;
    background: #fff;
    padding: 0 16px;
}

/* PC (태블릿 이상) */
@media (min-width: 768px) {
    .input-bar {
        padding: 14px 16px;
    }
}

.input-field {
    width:100%; position:relative;
}

#chatInput {
    width:100%; padding: 12px 52px 12px 20px; background:#F5F5F5; resize:none; border:none; border-radius:30px; min-height:56px;
    font-size:16px; font-weight:500; color:#000; line-height:30px; font-family: "Noto Sans KR";
}

#chatInput:focus{
    outline:none;
}

#chatInput::-webkit-scrollbar {
    display:none;
}

/* body.theme-dark #chatInput {
    border-color: rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.92);
} */

.send-button {
    position:absolute; top:50%; right:20px; width:32px; height:32px; background:url(/common/images/common/helpbot_send_off.svg)50% 50% no-repeat; transform:translateY(-50%);
}

#chatInput.typing + a{
    background: url(/common/images/common/helpbot_send_on.svg) 50% 50% no-repeat;
}


@media (max-width: 480px) {
    .app-shell {width:100%;}
}
@media (max-width: 767px) {
    main {
        height:calc(100dvh - 220px);
    }
}
@media (max-width: 1280px) {
    .app-header {
        margin:0; padding: 17px 12px;
    }
    .app-title .headInner {
        justify-content: center;
    }

    .chat-main {
        padding:20px 20px;
    }
}

.loading-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(15, 23, 42, 0.65);
    color: #fff;
    z-index: 9999;
    transition: opacity 0.2s ease;
    font-size: 1.05rem;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.loading-overlay .spinner {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

