body.chat-home-standalone {
    margin: 0;
    background: #f1f5fb;
}

.chat-home-page {
    --chp-primary: #4a6da7;
    --chp-primary-dark: #3a5a8a;
    --chp-text: #1f2f46;
    --chp-muted: #627087;
    --chp-border: #dbe4f2;
    --chp-surface: #ffffff;
    --chp-panel: #f8fbff;
    --chp-head-height: 54px;
    --chp-content-width-open: min(1080px, calc(100vw - 360px));
    --chp-content-width-closed: min(1120px, calc(100vw - 300px));
    --chp-session-side-pad: 0.62rem;
    --chp-session-slot-width: 2.1rem;
    --chp-session-slot-height: 26px;
    --chp-chat-overlap: 2rem;
    font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--chp-text);
    height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr;
    grid-template-columns: 300px minmax(0, 1fr);
    background: #f1f5fb;
    position: relative;
    overflow: hidden;
    transition: grid-template-columns 0.22s ease;
}

.chat-home-page:not(.is-sidebar-open) {
    grid-template-columns: 56px minmax(0, 1fr);
}

.chat-home-page .chp-global-head {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    min-height: var(--chp-head-height);
    padding: 0.28rem 0.9rem 0 0.9rem;
    background: rgba(241, 245, 251, 0.22);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: none;
    position: sticky;
    top: 0;
    z-index: 6;
}

.chat-home-page .chp-global-head strong {
    margin: 0;
    font-size: 0.84rem;
    color: #36557f;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-home-page .chp-overlay {
    position: fixed;
    inset: 0;
    background: rgba(16, 26, 42, 0.34);
    border: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 8;
}

.chat-home-page .chp-sidebar {
    grid-column: 1;
    grid-row: 1 / span 2;
    border-right: 0;
    background: #f7faff;
    box-shadow: none;
    padding: 0.9rem 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    height: auto;
    min-height: 0;
    overflow-y: auto;
    position: relative;
    z-index: 3;
}

.chat-home-page .chp-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.4rem 0 0.62rem;
}

.chat-home-page .chp-brand {
    color: #355c91;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none;
}

.chat-home-page .chp-side-toggle {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #4f6d97;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.chat-home-page:not(.is-sidebar-open) .chp-sidebar-head {
    justify-content: center;
    padding: 0;
}

.chat-home-page:not(.is-sidebar-open) .chp-brand {
    display: none;
}

.chat-home-page .chp-new-session {
    width: 100%;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #355c91;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.38rem;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.28rem 0.62rem;
    cursor: pointer;
    margin-top: 0.14rem;
}

.chat-home-page .chp-new-session:hover {
    color: #2d4f7c;
}

.chat-home-page .chp-new-session-label {
    white-space: nowrap;
}

.chat-home-page .chp-search-trigger {
    width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 0;
    background: transparent;
    color: #355c91;
    padding: 0.1rem 0.62rem 0.2rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.chat-home-page .chp-sidebar-spacer {
    flex: 1;
    min-height: 0.55rem;
}

.chat-home-page .chp-settings-trigger {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
    border: 0;
    background: transparent;
    color: #355c91;
    padding: 0.28rem 0.62rem 0.36rem;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    text-align: left;
    cursor: pointer;
}

.chat-home-page .chp-settings-trigger i {
    width: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.86rem;
    line-height: 1;
}

.chat-home-page .chp-settings-trigger:hover {
    color: #284a76;
}

.chat-home-page .chp-session-heading {
    margin: 0.26rem 0 0;
    padding: 0 0.62rem;
    color: #6c82a3;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.chat-home-page:not(.is-sidebar-open) .chp-new-session {
    width: 34px;
    height: 34px;
    padding: 0;
    margin: 0.15rem auto 0.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chat-home-page:not(.is-sidebar-open) .chp-new-session-label {
    display: none;
}

.chat-home-page:not(.is-sidebar-open) .chp-search-trigger,
.chat-home-page:not(.is-sidebar-open) .chp-session-heading,
.chat-home-page:not(.is-sidebar-open) .chp-session-list,
.chat-home-page:not(.is-sidebar-open) .chp-settings-trigger {
    display: none;
}

.chat-home-page .chp-session-list {
    display: grid;
    gap: 0.2rem;
}

.chat-home-page .chp-session-item {
    width: 100%;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: #2b466d;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.42rem var(--chp-session-side-pad);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.chat-home-page .chp-session-item-main {
    min-width: 0;
    flex: 1;
    position: relative;
    padding-right: var(--chp-session-slot-width);
}

.chat-home-page .chp-session-item strong {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.84rem;
    line-height: 1.35;
    min-width: 0;
}

.chat-home-page .chp-session-item .chp-session-title-text {
    display: block;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-home-page .chp-session-item .chp-session-pin {
    flex: 0 0 auto;
    font-size: 0.72rem;
    color: #3f628f;
}

.chat-home-page .chp-session-item .chp-session-time {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: var(--chp-session-slot-width);
    height: var(--chp-session-slot-height);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.73rem;
    color: #67809f;
    text-align: center;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transition: opacity 0.14s ease;
}

.chat-home-page .chp-session-item .chp-session-run-status {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: var(--chp-session-slot-width);
    height: var(--chp-session-slot-height);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    color: #476a99;
    text-align: center;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transition: opacity 0.14s ease;
}

.chat-home-page .chp-session-item .chp-session-time[hidden],
.chat-home-page .chp-session-item .chp-session-run-status[hidden] {
    display: none !important;
}

.chat-home-page .chp-session-item:hover {
    background: rgba(61, 96, 145, 0.08);
}

.chat-home-page .chp-session-item.is-active {
    background: rgba(52, 86, 133, 0.14);
}

.chat-home-page .chp-session-item.is-active strong {
    color: #274a76;
}

.chat-home-page .chp-session-item.is-active .chp-session-time {
    color: #466a99;
}

.chat-home-page .chp-session-menu-btn {
    width: var(--chp-session-slot-width);
    height: var(--chp-session-slot-height);
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    color: #516b8f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.14s ease, background-color 0.14s ease;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.chat-home-page .chp-session-item:hover .chp-session-time,
.chat-home-page .chp-session-item:focus-within .chp-session-time,
.chat-home-page .chp-session-item.is-menu-open .chp-session-time,
.chat-home-page .chp-session-item:hover .chp-session-run-status,
.chat-home-page .chp-session-item:focus-within .chp-session-run-status,
.chat-home-page .chp-session-item.is-menu-open .chp-session-run-status {
    opacity: 0;
}

.chat-home-page .chp-session-item:hover .chp-session-menu-btn,
.chat-home-page .chp-session-item:focus-within .chp-session-menu-btn,
.chat-home-page .chp-session-item.is-menu-open .chp-session-menu-btn {
    opacity: 1;
    pointer-events: auto;
}

.chat-home-page .chp-session-menu-btn:hover {
    background: transparent;
}

.chat-home-page .chp-session-title-edit {
    width: 100%;
    box-sizing: border-box;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: inherit;
    padding: 0;
    margin: 0;
    outline: none;
    min-width: 0;
}

.chat-home-page .chp-session-item.is-editing-title .chp-session-time,
.chat-home-page .chp-session-item.is-editing-title .chp-session-menu-btn {
    opacity: 0;
    pointer-events: none;
}

.chat-home-page .chp-session-menu {
    position: absolute;
    top: calc(100% - 4px);
    right: 0.2rem;
    z-index: 12;
    min-width: 170px;
    background: #ffffff;
    border: 1px solid rgba(135, 158, 191, 0.38);
    border-radius: 10px;
    box-shadow: 0 12px 24px rgba(18, 34, 57, 0.14);
    padding: 0.32rem;
    display: grid;
    gap: 0.16rem;
}

.chat-home-page .chp-session-menu[hidden] {
    display: none;
}

.chat-home-page .chp-session-menu-action {
    width: 100%;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #334f74;
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    padding: 0.44rem 0.48rem;
    font-size: 0.78rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.chat-home-page .chp-session-menu-action:hover {
    background: rgba(68, 102, 147, 0.1);
}

.chat-home-page .chp-session-menu-action i {
    width: 14px;
    text-align: center;
    color: #58739b;
}

.chat-home-page .chp-session-menu-action.is-danger {
    color: #a33642;
}

.chat-home-page .chp-session-menu-action.is-danger i {
    color: #b63b47;
}

.chat-home-page .chp-session-menu-action.is-danger:hover {
    background: rgba(207, 83, 92, 0.12);
}

@media (hover: none) {
    .chat-home-page .chp-session-item .chp-session-time {
        opacity: 0;
    }

    .chat-home-page .chp-session-menu-btn {
        opacity: 1;
        pointer-events: auto;
    }
}

.chat-home-page .chp-main {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 0.9rem;
    position: relative;
    margin: 0;
    transition: transform 0.22s ease, width 0.22s ease;
}

.chat-home-page:not(.is-sidebar-open) .chp-main {
    width: 100%;
    transform: none;
}

.chat-home-page .chp-mobile-toggle {
    display: none;
}

.chat-home-page .chp-chat-shell {
    flex: 1;
    border: 0;
    border-radius: 16px;
    background: transparent;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    box-shadow: none;
    transition: padding 0.24s ease;
}

.chat-home-page .chp-chat-user {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    color: inherit;
    font: inherit;
    text-decoration: none;
    cursor: default;
}

.chat-home-page .chp-chat-avatar,
.chat-home-page .chp-chat-avatar-img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-block;
    object-fit: cover;
    background: rgba(211, 225, 244, 0.7);
    flex: 0 0 auto;
}

.chat-home-page .chp-chat-name {
    font-size: 0.76rem;
    color: #5c7597;
    white-space: nowrap;
}

.chat-home-page .chp-chat-user.is-login-cta {
    padding: 0.25rem 0.58rem;
    border-radius: 999px;
    background: rgba(63, 95, 142, 0.1);
    box-shadow: inset 0 0 0 1px rgba(69, 104, 155, 0.22);
    cursor: pointer;
}

.chat-home-page .chp-chat-user.is-login-cta .chp-chat-name {
    color: #33537d;
    font-weight: 700;
}

.chat-home-page .chp-chat-user.is-login-cta .chp-chat-avatar-img {
    display: none;
}

.chat-home-page .chp-chat-user.is-login-cta:hover {
    background: rgba(63, 95, 142, 0.16);
}

.chat-home-page .chp-empty-guide {
    margin: 0 auto 2.7rem;
    padding: 0 0.9rem;
    color: #49658c;
    font-size: 1.92rem;
    font-weight: 600;
    line-height: 1.45;
    text-align: center;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.24s ease, max-height 0.24s ease;
}

.chat-home-page .chp-empty-guide .chp-empty-guide-break {
    display: inline;
}

.chat-home-page .chp-login-guide {
    margin: -1.9rem auto 2.05rem;
    padding: 0 0.9rem;
    font-size: 0.92rem;
    color: #647b9c;
    text-align: center;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.chat-home-page.is-guest.is-empty-chat .chp-login-guide {
    opacity: 1;
    transform: translateY(0);
}

.chat-home-page .chp-login-guide a {
    color: #365f96;
    font-weight: 700;
    text-decoration: none;
}

.chat-home-page .chp-login-guide.is-emphasis {
    color: #476a98;
    animation: chp-login-guide-pulse 0.72s ease-out;
}

.chat-home-page .chp-search-modal {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
}

.chat-home-page .chp-search-modal[hidden] {
    display: none !important;
}

.chat-home-page .chp-search-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(24, 34, 50, 0.28);
}

.chat-home-page .chp-search-dialog {
    position: relative;
    width: min(460px, calc(100vw - 32px));
    border-radius: 16px;
    background: #ffffff;
    padding: 0.9rem;
    box-shadow: 0 18px 42px rgba(24, 35, 56, 0.2);
    display: grid;
    gap: 0.62rem;
}

.chat-home-page .chp-search-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-home-page .chp-search-dialog-head strong {
    color: #2f4a72;
    font-size: 0.9rem;
}

.chat-home-page .chp-search-close {
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    color: #617896;
    cursor: pointer;
}

.chat-home-page .chp-search-field {
    border-radius: 11px;
    background: #f2f6fd;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.46rem 0.6rem;
    color: #6180a7;
}

.chat-home-page .chp-search-field input {
    width: 100%;
    border: 0;
    background: transparent;
    color: #415b80;
    font-size: 0.84rem;
    outline: none;
}

.chat-home-page .chp-search-results {
    display: grid;
    gap: 0.22rem;
    max-height: 46vh;
    overflow-y: auto;
}

.chat-home-page .chp-settings-page[hidden] {
    display: none !important;
}

.chat-home-page.is-settings-open .chp-chat-shell {
    display: none;
}

.chat-home-page .chp-settings-page {
    flex: 1;
    min-height: 0;
    padding: calc(var(--chp-head-height) + 0.95rem) max(0.95rem, calc((100% - var(--chp-content-width-open)) / 2)) 0.95rem;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 0.72rem;
    background: transparent;
}

.chat-home-page:not(.is-sidebar-open) .chp-settings-page {
    padding-left: max(0.95rem, calc((100% - var(--chp-content-width-closed)) / 2));
    padding-right: max(0.95rem, calc((100% - var(--chp-content-width-closed)) / 2));
}

.chat-home-page .chp-settings-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px #dce6f5;
    padding: 0.52rem 0.56rem;
}

.chat-home-page .chp-settings-head strong {
    font-size: 0.93rem;
    color: #2d4a74;
    margin-right: auto;
}

.chat-home-page .chp-settings-head-spacer {
    width: 28px;
    height: 28px;
}

.chat-home-page .chp-settings-back {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #5d7597;
    cursor: pointer;
}

.chat-home-page .chp-settings-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    color: #647c9d;
    font-size: 0.78rem;
    padding: 0 0.2rem;
}

.chat-home-page .chp-settings-subhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.chat-home-page .chp-settings-subback {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    flex: 0 0 auto;
    white-space: nowrap;
    border: 0;
    border-radius: 999px;
    background: #edf3fc;
    color: #3b5b84;
    font-size: 0.73rem;
    font-weight: 700;
    padding: 0.3rem 0.52rem;
    cursor: pointer;
}

.chat-home-page .chp-settings-tabs {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    flex-wrap: wrap;
}

.chat-home-page .chp-settings-tab {
    border: 0;
    border-radius: 999px;
    background: #eef3fb;
    color: #587195;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.34rem 0.62rem;
    cursor: pointer;
}

.chat-home-page .chp-settings-tab.is-active {
    background: #2f507d;
    color: #f1f6ff;
}

.chat-home-page .chp-settings-refresh {
    border: 0;
    border-radius: 8px;
    background: #edf4ff;
    color: #2e527f;
    font-size: 0.77rem;
    font-weight: 700;
    padding: 0.28rem 0.52rem;
    cursor: pointer;
}

.chat-home-page .chp-settings-tools {
    min-height: 0;
    overflow-y: auto;
    display: grid;
    gap: 0.5rem;
    padding-right: 0.1rem;
}

.chat-home-page .chp-settings-section[hidden] {
    display: none !important;
}

.chat-home-page .chp-settings-section {
    min-height: 0;
    overflow-y: auto;
    display: grid;
    gap: 0.56rem;
}

.chat-home-page .chp-settings-menu {
    display: grid;
    gap: 0.52rem;
}

.chat-home-page .chp-settings-menu[hidden] {
    display: none !important;
}

.chat-home-page .chp-settings-menu-item {
    border: 1px solid #dce6f5;
    border-radius: 12px;
    background: #f9fbff;
    color: #3a577d;
    text-align: left;
    padding: 0.62rem 0.66rem;
    display: grid;
    gap: 0.2rem;
    cursor: pointer;
}

.chat-home-page .chp-settings-menu-item strong {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    font-size: 0.82rem;
}

.chat-home-page .chp-settings-menu-item span {
    font-size: 0.74rem;
    color: #6680a3;
}

@media (min-width: 981px) {
    .chat-home-page .chp-settings-page {
        justify-items: center;
    }

    .chat-home-page .chp-settings-head,
    .chat-home-page .chp-settings-menu,
    .chat-home-page .chp-settings-meta,
    .chat-home-page .chp-settings-section {
        width: min(760px, 100%);
    }
}

.chat-home-page .chp-tool-card {
    border-radius: 12px;
    border: 1px solid #dce6f5;
    background: #f9fbff;
    padding: 0.56rem 0.62rem;
    display: grid;
    gap: 0.26rem;
}

.chat-home-page .chp-tool-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
}

.chat-home-page .chp-tool-card-head strong {
    font-size: 0.81rem;
    color: #2f4a72;
}

.chat-home-page .chp-tool-badge {
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.16rem 0.45rem;
    white-space: nowrap;
}

.chat-home-page .chp-tool-badge.is-ok {
    background: #ebf7ee;
    color: #2d7b40;
}

.chat-home-page .chp-tool-badge.is-limited {
    background: #fff2e6;
    color: #a35a18;
}

.chat-home-page .chp-tool-desc {
    font-size: 0.74rem;
    color: #506785;
    line-height: 1.45;
}

.chat-home-page .chp-tool-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    color: #7186a5;
    flex-wrap: wrap;
}

.chat-home-page .chp-tools-empty {
    font-size: 0.78rem;
    color: #667d9f;
    text-align: center;
    padding: 1.2rem 0.7rem;
}

.chat-home-page .chp-mock-notice {
    border-radius: 10px;
    background: #f3f7ff;
    color: #4a6388;
    font-size: 0.76rem;
    padding: 0.46rem 0.55rem;
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
}

.chat-home-page .chp-mock-card {
    border-radius: 12px;
    border: 1px solid #dde7f5;
    background: #f9fbff;
    padding: 0.62rem;
    display: grid;
    gap: 0.46rem;
}

.chat-home-page .chp-mock-card h4 {
    margin: 0;
    color: #2d4a72;
    font-size: 0.83rem;
}

.chat-home-page .chp-mock-card p {
    margin: 0;
    color: #5f7493;
    font-size: 0.75rem;
    line-height: 1.45;
}

.chat-home-page .chp-mock-card label {
    display: grid;
    gap: 0.2rem;
    color: #496585;
    font-size: 0.73rem;
}

.chat-home-page .chp-mock-card select,
.chat-home-page .chp-mock-card textarea {
    border: 1px solid #d8e3f2;
    border-radius: 10px;
    background: #fff;
    color: #44617f;
    font-size: 0.75rem;
    padding: 0.45rem 0.5rem;
}

.chat-home-page .chp-mock-card button,
.chat-home-page .chp-mock-link {
    justify-self: start;
    border: 0;
    border-radius: 10px;
    background: #e8f0fd;
    color: #2f537f;
    font-size: 0.73rem;
    font-weight: 700;
    padding: 0.36rem 0.58rem;
    text-decoration: none;
}

.chat-home-page .chp-mock-card button[disabled] {
    opacity: 0.72;
    cursor: not-allowed;
}

.chat-home-page .chp-mock-card ul {
    margin: 0;
    padding-left: 1rem;
    display: grid;
    gap: 0.28rem;
    color: #4e6585;
    font-size: 0.76rem;
}

.chat-home-page .chp-mock-card li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
}

.chat-home-page .chp-search-result {
    border: 0;
    border-radius: 10px;
    background: #f5f8fd;
    color: #35557f;
    padding: 0.48rem 0.56rem;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    cursor: pointer;
}

.chat-home-page .chp-search-result strong {
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-home-page .chp-search-result span {
    font-size: 0.74rem;
    color: #6f85a1;
    flex: 0 0 auto;
}

.chat-home-page .chp-search-empty {
    margin: 0;
    color: #7891af;
    font-size: 0.82rem;
    padding: 0.38rem 0.2rem;
}

.chat-home-page .chp-chat-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-top: calc(var(--chp-head-height) + 0.95rem);
    padding-bottom: 1.75rem;
    padding-left: max(0.95rem, calc((100% - var(--chp-content-width-open)) / 2));
    padding-right: max(0.95rem, calc((100% - var(--chp-content-width-open)) / 2));
    margin-bottom: calc(var(--chp-chat-overlap) * -1);
    background: transparent;
    display: grid;
    align-content: start;
    gap: 0.58rem;
    transition: flex-basis 0.26s ease, opacity 0.2s ease, padding 0.24s ease, margin 0.24s ease;
}

.chat-home-page:not(.is-sidebar-open) .chp-chat-body {
    padding-left: max(0.95rem, calc((100% - var(--chp-content-width-closed)) / 2));
    padding-right: max(0.95rem, calc((100% - var(--chp-content-width-closed)) / 2));
}

.chat-home-page .chp-msg {
    max-width: min(80%, 620px);
    border-radius: 12px;
    border: 0;
    padding: 0.58rem 0.72rem;
}

.chat-home-page .chp-msg-content {
    font-size: 0.88rem;
    line-height: 1.45;
}

.chat-home-page .chp-msg-content p {
    margin: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.chat-home-page .chp-msg-content p+p {
    margin-top: 0.5rem;
}

.chat-home-page .chp-msg-content h1,
.chat-home-page .chp-msg-content h2,
.chat-home-page .chp-msg-content h3,
.chat-home-page .chp-msg-content h4 {
    margin: 0.65rem 0 0.4rem;
    line-height: 1.35;
}

.chat-home-page .chp-msg-content h1 {
    font-size: 1.03rem;
}

.chat-home-page .chp-msg-content h2 {
    font-size: 0.98rem;
}

.chat-home-page .chp-msg-content h3,
.chat-home-page .chp-msg-content h4 {
    font-size: 0.92rem;
}

.chat-home-page .chp-msg-content ul,
.chat-home-page .chp-msg-content ol {
    margin: 0.42rem 0 0.42rem 1.15rem;
    padding: 0;
}

.chat-home-page .chp-msg-content li+li {
    margin-top: 0.22rem;
}

.chat-home-page .chp-msg-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.8em;
    padding: 0.08rem 0.3rem;
    border-radius: 6px;
    background: rgba(38, 64, 100, 0.11);
}

.chat-home-page .chp-msg-content pre {
    margin: 0.52rem 0;
    padding: 0.62rem 0.7rem;
    border-radius: 10px;
    background: rgba(24, 41, 66, 0.95);
    overflow-x: auto;
}

.chat-home-page .chp-msg-content pre code {
    background: transparent;
    color: #e9f0ff;
    padding: 0;
    font-size: 0.79rem;
}

.chat-home-page .chp-msg-content blockquote {
    margin: 0.52rem 0;
    padding: 0.14rem 0 0.14rem 0.68rem;
    border-left: 3px solid rgba(63, 97, 143, 0.34);
    color: #4f678b;
}

.chat-home-page .chp-msg-content a {
    color: #2a5e9a;
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-all;
}

.chat-home-page .chp-msg-content hr {
    border: 0;
    height: 1px;
    margin: 0.62rem 0;
    background: rgba(99, 124, 157, 0.28);
}

.chat-home-page .chp-msg-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.52rem 0;
    font-size: 0.79rem;
}

.chat-home-page .chp-msg-content th,
.chat-home-page .chp-msg-content td {
    border: 1px solid rgba(108, 132, 165, 0.36);
    padding: 0.34rem 0.44rem;
    text-align: left;
    vertical-align: top;
}

.chat-home-page .chp-msg-content th {
    background: rgba(113, 138, 173, 0.15);
    font-weight: 700;
}

.chat-home-page .chp-token-usage-card {
    border-radius: 12px;
    border: 1px solid #d8e4f6;
    background: #f8fbff;
    padding: 0.56rem 0.62rem;
}

.chat-home-page .chp-token-card-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.46rem;
    margin-bottom: 0.34rem;
}

.chat-home-page .chp-token-card-title {
    font-size: 0.82rem;
    font-weight: 800;
    color: #2d4e79;
    margin: 0;
}

.chat-home-page .chp-token-card-bar {
    width: 100%;
    height: 7px;
    border-radius: 999px;
    background: #e3ebf8;
    overflow: hidden;
    margin-bottom: 0.46rem;
}

.chat-home-page .chp-token-card-bar-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #6285b4 0%, #365d8e 100%);
}

.chat-home-page .chp-token-card-inline {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.52rem;
    margin-bottom: 0.34rem;
}

.chat-home-page .chp-token-card-inline strong {
    color: #2d4f7c;
    font-size: 0.82rem;
    font-weight: 800;
}

.chat-home-page .chp-token-card-inline span {
    color: #4b668d;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.chat-home-page .chp-token-card-mix {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.52rem;
    margin-bottom: 0.34rem;
}

.chat-home-page .chp-token-card-mix-text {
    color: #4b668d;
    font-size: 0.74rem;
    white-space: nowrap;
}

.chat-home-page .chp-token-card-mix .chp-token-card-bar {
    width: min(180px, 42%);
    margin-bottom: 0;
}

.chat-home-page .chp-token-card-sub {
    font-size: 0.71rem;
    color: #6781a4;
    margin: 0;
}

.chat-home-page .chp-token-card-sub code {
    font-size: 0.78rem;
    border-radius: 999px;
    padding: 0.1rem 0.4rem;
    background: #e9f0fc;
    color: #2f527d;
}

.chat-home-page .chp-token-card-warn {
    margin-top: 0.32rem;
    font-size: 0.72rem;
    color: #98520f;
    background: #fff4e7;
    border: 1px solid #f1d8ba;
    border-radius: 8px;
    padding: 0.26rem 0.4rem;
}

.chat-home-page .chp-msg-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    margin-top: 0.24rem;
}

.chat-home-page .chp-msg-time {
    display: inline-block;
    margin: 0;
    font-size: 0.72rem;
    color: #7a8ea9;
}

.chat-home-page .typing-cursor {
    display: inline-block;
    margin-left: 1px;
    color: #5f789d;
    animation: chp-cursor-blink 0.92s steps(1, end) infinite;
}

@keyframes chp-cursor-blink {
    0%, 48% { opacity: 1; }
    49%, 100% { opacity: 0; }
}

.chat-home-page .chp-msg-ai {
    background: transparent;
    color: #2f507d;
}

.chat-home-page .chp-msg-user {
    margin-left: auto;
    margin-right: 0.28rem;
    background: #23436d;
    border-color: #23436d;
    color: #fff;
    border-radius: 14px 14px 4px 14px;
}

.chat-home-page .chp-msg-user span {
    color: rgba(255, 255, 255, 0.84);
}

.chat-home-page .chp-msg-user .chp-msg-time {
    color: rgba(255, 255, 255, 0.84);
}

.chat-home-page .chp-msg-user .chp-msg-content code {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.chat-home-page .chp-msg-user .chp-msg-content a {
    color: #e6f0ff;
}

.chat-home-page .chp-msg-user .chp-msg-content blockquote {
    border-left-color: rgba(255, 255, 255, 0.38);
    color: rgba(255, 255, 255, 0.9);
}

.chat-home-page .chp-msg-user .chp-msg-content hr {
    background: rgba(255, 255, 255, 0.24);
}

.chat-home-page .chp-msg-user .chp-msg-content th,
.chat-home-page .chp-msg-user .chp-msg-content td {
    border-color: rgba(255, 255, 255, 0.26);
}

.chat-home-page .chp-msg-user .chp-msg-content th {
    background: rgba(255, 255, 255, 0.12);
}

.chat-home-page .chp-msg-copy-btn {
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    background: transparent;
    color: #4e6d97;
    cursor: pointer;
    opacity: 0.9;
    transition: background 0.14s ease, color 0.14s ease, opacity 0.14s ease;
}

.chat-home-page .chp-msg-copy-btn:hover {
    background: transparent;
    color: #365784;
}

.chat-home-page .chp-msg-copy-btn.is-copied {
    background: transparent;
    color: #2c7a47;
}

.chat-home-page .chp-msg-user .chp-msg-copy-btn {
    background: transparent;
    color: rgba(255, 255, 255, 0.92);
}

.chat-home-page .chp-msg-user .chp-msg-copy-btn:hover {
    background: transparent;
    color: #fff;
}

.chat-home-page .chp-msg-user .chp-msg-copy-btn.is-copied {
    background: transparent;
    color: #f1fff7;
}

.chat-home-page .chp-chips {
    width: var(--chp-content-width-open);
    max-width: calc(100% - 1.9rem);
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    border-top: 0;
    background: rgba(241, 245, 251, 0.72);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.22s ease, transform 0.24s ease, max-height 0.24s ease, padding 0.24s ease;
}

.chat-home-page .chp-chips button {
    border: 0;
    border-radius: 999px;
    background: #eef4ff;
    color: #426087;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.36rem 0.64rem;
    cursor: pointer;
}

.chat-home-page .chp-chips button:hover {
    background: #e3edff;
}

.chat-home-page .chp-chat-input {
    width: var(--chp-content-width-open);
    max-width: calc(100% - 1.9rem);
    margin: 0.5rem auto 0.7rem;
    border: 0;
    border-radius: 18px;
    background: #f2f7ff;
    padding: 0.58rem 0.62rem 0.48rem;
    display: grid;
    gap: 0.35rem;
    box-shadow: inset 0 0 0 1px rgba(201, 214, 234, 0.58);
    transform: translateY(0);
    transition: transform 0.28s ease;
}

.chat-home-page .chp-chat-input.is-login-blocked {
    animation: chp-login-input-shake 0.36s ease;
}

.chat-home-page.is-empty-chat .chp-chat-shell {
    justify-content: center;
}

.chat-home-page.is-empty-chat .chp-empty-guide {
    opacity: 1;
    max-height: 160px;
    transform: translateY(0);
    position: relative;
    z-index: 2;
}

.chat-home-page.is-empty-chat .chp-chat-body {
    flex: 0 0 0;
    min-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.chat-home-page.is-empty-chat .chp-chips,
.chat-home-page.is-empty-chat .chp-chat-input {
    transform: none;
}

.chat-home-page.is-empty-chat .chp-chips {
    max-height: 140px;
    opacity: 1;
    pointer-events: auto;
    padding: 0.2rem 0 0.25rem;
}

.chat-home-page .chp-loading {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    padding: 0.38rem 0.52rem;
    margin: 0.44rem 0 0.7rem 0.34rem;
    border-radius: 999px;
    background: rgba(235, 242, 252, 0.95);
}

.chat-home-page .chp-loading-dots {
    display: inline-flex;
    align-items: center;
    gap: 0.26rem;
}

.chat-home-page .chp-loading-dots span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #5f779b;
    animation: chp-loading-bounce 1.2s infinite ease-in-out both;
}

.chat-home-page .chp-loading-dots span:nth-child(1) {
    animation-delay: -0.24s;
}

.chat-home-page .chp-loading-dots span:nth-child(2) {
    animation-delay: -0.12s;
}

@keyframes chp-loading-bounce {
    0%, 80%, 100% { transform: scale(0.65); opacity: 0.45; }
    40% { transform: scale(1); opacity: 1; }
}

@keyframes chp-login-guide-pulse {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.76;
    }
    45% {
        transform: translateY(0) scale(1.02);
        opacity: 1;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes chp-login-input-shake {
    0% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    45% { transform: translateX(4px); }
    70% { transform: translateX(-3px); }
    100% { transform: translateX(0); }
}

.chat-home-page:not(.is-sidebar-open) .chp-chips,
.chat-home-page:not(.is-sidebar-open) .chp-chat-input {
    width: var(--chp-content-width-closed);
}

.chat-home-page .chp-input-top textarea {
    width: 100%;
    border: 0;
    outline: none;
    resize: none;
    background: transparent;
    color: #4e6688;
    font-size: 0.9rem;
    line-height: 1.4;
    min-height: 24px;
    max-height: 130px;
    padding: 0.3rem 0.42rem;
}

.chat-home-page .chp-input-top {
    position: relative;
}

.chat-home-page .chp-slash-menu {
    position: absolute;
    left: 0.34rem;
    right: 0.34rem;
    bottom: calc(100% + 0.28rem);
    border-radius: 12px;
    border: 1px solid #d4e2f5;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(37, 59, 92, 0.16);
    padding: 0.34rem;
    display: grid;
    gap: 0.2rem;
    z-index: 12;
}

.chat-home-page .chp-slash-menu[hidden] {
    display: none !important;
}

.chat-home-page .chp-slash-item {
    width: 100%;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #39557e;
    text-align: left;
    display: grid;
    gap: 0.12rem;
    padding: 0.36rem 0.44rem;
    cursor: pointer;
}

.chat-home-page .chp-slash-item:hover,
.chat-home-page .chp-slash-item.is-active {
    background: #eef4ff;
}

.chat-home-page .chp-slash-item strong {
    font-size: 0.77rem;
    font-weight: 700;
}

.chat-home-page .chp-slash-item span {
    font-size: 0.72rem;
    color: #6982a3;
}

.chat-home-page .chp-slash-empty {
    font-size: 0.72rem;
    color: #6f87a7;
    padding: 0.3rem 0.44rem;
}

.chat-home-page .chp-input-bottom {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.14rem 0.18rem 0;
}

.chat-home-page .chp-btn-plain {
    border: 0;
    background: transparent;
    color: #4e678c;
    cursor: pointer;
}

.chat-home-page .chp-btn-plus {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.86rem;
}

.chat-home-page .chp-btn-model {
    margin-right: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.2rem 0.16rem;
}

.chat-home-page .chp-btn-send {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #23436d;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: none;
    transition: none;
}

.chat-home-page .chp-btn-send i {
    font-size: 0.78rem;
}

.chat-home-page .chp-btn-send.is-stop i {
    font-size: 0.98rem;
    line-height: 1;
}

.chat-home-page .chp-btn-send:hover {
    background: #23436d;
}

.chat-home-page .chp-btn-send:active {
    transform: none;
}

@media (max-width: 980px) {
    .chat-home-page {
        --chp-chat-overlap: 1rem;
    }

    .chat-home-page {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .chat-home-page:not(.is-sidebar-open) {
        grid-template-columns: 1fr;
    }

    .chat-home-page .chp-global-head {
        grid-column: 1;
        grid-row: 1;
        padding-left: 3.2rem;
    }

    .chat-home-page .chp-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 9;
        width: min(300px, 84vw);
        background: #f7faff;
        transform: translateX(-102%);
        transition: transform 0.22s ease;
        box-shadow: none;
        height: 100vh;
    }

    .chat-home-page.is-sidebar-open .chp-sidebar {
        transform: translateX(0);
    }

    .chat-home-page.is-sidebar-open .chp-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .chat-home-page .chp-side-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .chat-home-page .chp-main {
        grid-column: 1;
        grid-row: 1 / span 2;
        width: 100%;
        padding: 0.4rem;
        transform: none;
    }

    .chat-home-page .chp-mobile-toggle {
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 10;
        width: 34px;
        height: 34px;
        border: 0;
        border-radius: 10px;
        background: transparent;
        color: #4e678c;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: none;
    }

    .chat-home-page.is-sidebar-open .chp-mobile-toggle {
        opacity: 0;
        pointer-events: none;
    }

    .chat-home-page .chp-msg {
        max-width: 96%;
    }

    .chat-home-page .chp-chat-body {
        padding-left: 0.45rem;
        padding-right: 0.45rem;
    }

    .chat-home-page:not(.is-sidebar-open) .chp-chat-body {
        padding-left: 0.45rem;
        padding-right: 0.45rem;
    }

    .chat-home-page .chp-chips,
    .chat-home-page .chp-chat-input {
        width: 100%;
        max-width: 100%;
    }

    .chat-home-page.is-empty-chat .chp-chips,
    .chat-home-page.is-empty-chat .chp-chat-input {
        transform: none;
    }

    .chat-home-page:not(.is-sidebar-open) .chp-chips,
    .chat-home-page:not(.is-sidebar-open) .chp-chat-input {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 560px) {
    .chat-home-page {
        --chp-chat-overlap: 0.65rem;
    }

    .chat-home-page .chp-global-head {
        padding-left: 2.95rem;
    }

    .chat-home-page .chp-main {
        padding: 0.28rem;
    }

    .chat-home-page .chp-chat-body {
        padding-left: 0.34rem;
        padding-right: 0.34rem;
    }

    .chat-home-page:not(.is-sidebar-open) .chp-chat-body {
        padding-left: 0.34rem;
        padding-right: 0.34rem;
    }

    .chat-home-page .chp-chips,
    .chat-home-page .chp-chat-input {
        width: 100%;
        max-width: 100%;
    }

    .chat-home-page.is-empty-chat .chp-chips,
    .chat-home-page.is-empty-chat .chp-chat-input {
        transform: none;
    }

    .chat-home-page:not(.is-sidebar-open) .chp-chips,
    .chat-home-page:not(.is-sidebar-open) .chp-chat-input {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 375px) {
    .chat-home-page .chp-empty-guide {
        font-size: 1.42rem;
        line-height: 1.35;
        margin-bottom: 1.8rem;
    }

    .chat-home-page.is-empty-chat .chp-empty-guide {
        max-height: 140px;
    }

    .chat-home-page .chp-empty-guide .chp-empty-guide-break {
        display: block;
    }
}

/* ══════════════════════════════════════════════════════════════
   서브에이전트 상세 패널
   ══════════════════════════════════════════════════════════════ */

.chat-home-page .chp-sub-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(420px, 100vw);
    height: 100vh;
    background: #ffffff;
    border-left: 1px solid #e5e9f0;
    box-shadow: -8px 0 32px rgba(18, 34, 57, 0.12);
    z-index: 15;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

/* hidden 속성이 있어도 flex 유지 — transform으로만 가시성 제어 */
.chat-home-page .chp-sub-panel[hidden] {
    display: flex;
    transform: translateX(100%);
    pointer-events: none;
}

.chat-home-page .chp-sub-panel.is-open {
    transform: translateX(0);
    pointer-events: auto;
}

.chat-home-page .chp-sub-panel-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.chat-home-page .chp-sub-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #e5e9f0;
    background: #f7faff;
    flex: 0 0 auto;
}

.chat-home-page .chp-sub-panel-head-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #2f4a72;
    font-size: 0.88rem;
    font-weight: 700;
}

.chat-home-page .chp-sub-panel-head-left i {
    color: #4a6da7;
    font-size: 0.9rem;
}

.chat-home-page .chp-sub-panel-close {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #6180a7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.14s ease;
    flex-shrink: 0;
}

.chat-home-page .chp-sub-panel-close:hover {
    background: rgba(68, 102, 147, 0.1);
}

.chat-home-page .chp-sub-panel-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem;
    display: grid;
    align-content: start;
    gap: 0.75rem;
}

/* 패널 내 메시지 */
.chat-home-page .chp-sub-msg {
    border-radius: 10px;
    padding: 0.65rem 0.8rem;
    background: #f5f8fd;
    border: 1px solid #e5e9f0;
}

.chat-home-page .chp-sub-msg-main {
    background: #eef4ff;
    border-color: rgba(74, 109, 167, 0.2);
}

.chat-home-page .chp-sub-msg-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
    font-size: 0.74rem;
    font-weight: 700;
    color: #4a6da7;
}

.chat-home-page .chp-sub-msg-main .chp-sub-msg-header {
    color: #2d4f7c;
}

.chat-home-page .chp-sub-msg-header time {
    margin-left: auto;
    font-weight: 400;
    color: #7a8ea9;
    font-size: 0.7rem;
}

.chat-home-page .chp-sub-badge {
    margin-left: 0.3rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: rgba(74, 109, 167, 0.14);
    color: #3a5a8a;
    font-size: 0.67rem;
    font-weight: 700;
}

.chat-home-page .chp-sub-msg-body {
    font-size: 0.81rem;
    line-height: 1.55;
    color: #2f507d;
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-home-page .chp-sub-msg-retry-meta {
    margin-top: 0.42rem;
    padding-top: 0.42rem;
    border-top: 1px dashed rgba(90, 64, 16, 0.25);
    display: grid;
    gap: 0.16rem;
    font-size: 0.75rem;
    line-height: 1.45;
    color: #6a4d16;
}

.chat-home-page .chp-sub-msg-retry-meta p {
    margin: 0;
}

.chat-home-page .chp-sub-msg-detail-wrap {
    margin-top: 0.5rem;
}

.chat-home-page .chp-sub-msg-detail-btn {
    border: 0;
    background: transparent;
    color: #3b5f93;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0;
    cursor: pointer;
}

.chat-home-page .chp-sub-msg-detail-btn:hover {
    text-decoration: underline;
}

.chat-home-page .chp-sub-msg-detail-body {
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px dashed rgba(74, 109, 167, 0.25);
    display: grid;
    gap: 0.35rem;
}

.chat-home-page .chp-sub-detail-item {
    font-size: 0.74rem;
    line-height: 1.45;
    color: #35537f;
}

.chat-home-page .chp-sub-detail-item p {
    margin: 0;
}

.chat-home-page .chp-sub-detail-loading,
.chat-home-page .chp-sub-detail-empty,
.chat-home-page .chp-sub-detail-error {
    margin: 0;
    font-size: 0.73rem;
    color: #6883a7;
}

.chat-home-page .chp-sub-detail-error {
    color: #a33642;
}

/* 빈 / 로딩 / 에러 상태 */
.chat-home-page .chp-sub-loading {
    display: flex;
    justify-content: center;
    padding: 2rem;
    color: #6a8ab8;
    font-size: 1.1rem;
}

.chat-home-page .chp-sub-empty,
.chat-home-page .chp-sub-error {
    margin: 0;
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.82rem;
    color: #7891af;
}

.chat-home-page .chp-sub-error {
    color: #a33642;
}

/* 메인 에이전트 지시 버블 — 황금/앰버 계열로 구분 */
.chat-home-page .chp-sub-msg-instruction {
    background: #fffbf0;
    border-color: rgba(200, 155, 40, 0.28);
}

.chat-home-page .chp-sub-msg-instruction .chp-sub-msg-header {
    color: #7a5a10;
}

.chat-home-page .chp-sub-msg-instruction .chp-sub-msg-body {
    color: #5a4010;
}

/* ══════════════════════════════════════════════════════════════
   플래너 블롯 — 실행 계획 표시
   ══════════════════════════════════════════════════════════════ */

.chat-home-page .chp-plan-blot {
    max-width: min(86%, 620px);
    min-height: 36px; /* overflow:hidden + CSS Grid 조합 시 min-content가 0으로 계산되는 현상 방지 */
    height: auto;
    border-radius: 12px;
    background: #f0f6ff;
    border: 1px solid rgba(74, 109, 167, 0.22);
    color: #2f4a72;
    font-size: 0.79rem;
    overflow: hidden;
    margin-bottom: 0.1rem;
    position: relative;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    transition: height 0.18s ease;
}

.chat-home-page .chp-plan-blot.is-expanded {
    overflow: hidden;
}

.chat-home-page .chp-plan-blot-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: 0.5rem;
    padding: 0.46rem 0.64rem;
    cursor: pointer;
    pointer-events: auto;
}

.chat-home-page .chp-plan-blot-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(74, 109, 167, 0.14);
    color: #476899;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    flex-shrink: 0;
}

.chat-home-page .chp-plan-blot-goal {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    font-size: 0.79rem;
    color: #2f4a72;
}

.chat-home-page .chp-plan-blot-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2rem;
    padding: 0.08rem 0.36rem;
    border-radius: 999px;
    background: rgba(74, 109, 167, 0.12);
    color: #4b6e9d;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1;
}

.chat-home-page .chp-plan-blot-toggle {
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #6a88b0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    transition: background 0.14s ease, color 0.14s ease;
    flex-shrink: 0;
    justify-self: end;
}

.chat-home-page .chp-plan-blot-toggle:hover {
    background: rgba(74, 109, 167, 0.12);
    color: #4a6da7;
}

.chat-home-page .chp-plan-blot-steps {
    border-top: 1px solid rgba(74, 109, 167, 0.14);
    padding: 0.45rem 0.64rem 0.5rem;
    display: grid;
    gap: 0.32rem;
    background: #f0f6ff;
}

.chat-home-page .chp-plan-replan-note {
    border: 1px solid rgba(74, 109, 167, 0.2);
    background: rgba(255, 255, 255, 0.75);
    border-radius: 8px;
    padding: 0.42rem 0.5rem;
    margin-bottom: 0.16rem;
    display: grid;
    gap: 0.24rem;
}

.chat-home-page .chp-plan-replan-note-title {
    font-size: 0.66rem;
    font-weight: 700;
    color: #436592;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.chat-home-page .chp-plan-replan-note-text {
    font-size: 0.72rem;
    color: #3d5f8a;
    line-height: 1.4;
}

.chat-home-page .chp-plan-replan-note-terms {
    font-size: 0.68rem;
    color: #5f7ea5;
    line-height: 1.35;
}

/* CSS display:grid 가 HTML hidden 속성을 오버라이드하는 문제 방지 */
.chat-home-page .chp-plan-blot-steps[hidden] {
    display: none;
}

.chat-home-page .chp-plan-step {
    display: grid;
    grid-template-columns: 1.1rem minmax(0, 1fr) auto 0.95rem;
    align-items: center;
    column-gap: 0.36rem;
    font-size: 0.74rem;
    color: #4a6488;
    padding: 0.18rem 0;
    min-width: 0;
}

.chat-home-page .chp-plan-step-empty {
    display: block;
    color: #6d84a6;
    font-size: 0.73rem;
    padding: 0.12rem 0.02rem;
}

.chat-home-page .chp-plan-step-num {
    font-size: 0.66rem;
    font-weight: 700;
    color: #8aa8c8;
    text-align: right;
}

.chat-home-page .chp-plan-step-title {
    min-width: 0;
    font-size: 0.74rem;
    color: #3a5a80;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-home-page .chp-plan-step-need {
    font-size: 0.65rem;
    color: #6d84a6;
    border-radius: 999px;
    padding: 0.02rem 0.34rem;
    background: rgba(74, 109, 167, 0.12);
    white-space: nowrap;
}

.chat-home-page .chp-plan-step-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 0.6rem;
}

.chat-home-page .chp-plan-step-pending {
    color: #b0c4de;
}

.chat-home-page .chp-plan-step-running {
    color: #4a9fd4;
    animation: chp-spin 1s linear infinite;
}

.chat-home-page .chp-plan-step-done {
    color: #4caf88;
}

.chat-home-page .chp-plan-step-needs-retry {
    color: #d89a2f;
}

.chat-home-page .chp-plan-step-error {
    color: #d9534f;
}

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

/* ══════════════════════════════════════════════════════════════
   블롯 — 클릭 가능 스타일 강화
   ══════════════════════════════════════════════════════════════ */

.chat-home-page .chp-blot {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 0.5rem;
    max-width: min(86%, 620px);
    padding: 0.5rem 0.64rem;
    border-radius: 12px;
    background: #f4f8ff;
    border: 1px solid rgba(106, 134, 171, 0.26);
    color: #35557f;
    font-size: 0.79rem;
    line-height: 1.35;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.chat-home-page .chp-blot:hover {
    background: #ebf2ff;
    box-shadow: 0 3px 12px rgba(68, 100, 144, 0.12);
    transform: translateY(-1px);
}

.chat-home-page .chp-blot:focus-visible {
    outline: 2px solid #4a6da7;
    outline-offset: 2px;
}

.chat-home-page .chp-blot:active {
    transform: translateY(0);
}

.chat-home-page .chp-blot-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(84, 117, 164, 0.14);
    color: #476899;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.chat-home-page .chp-blot-label {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

.chat-home-page .chp-blot-status {
    font-size: 0.7rem;
    color: #6c84a7;
    white-space: nowrap;
}

.chat-home-page .chp-blot-chevron {
    margin-left: 0.1rem;
    font-size: 0.68rem;
    color: #7a9ac0;
    opacity: 0.56;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.chat-home-page .chp-blot:hover .chp-blot-chevron {
    opacity: 0.92;
    transform: translateX(1px);
}

/* 패널 열린 상태에서 채팅 영역 축소 (데스크톱) */
@media (min-width: 981px) {
    .chat-home-page.is-sub-panel-open .chp-main {
        padding-right: 420px;
        transition: padding-right 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    }
}

/* 모바일: 패널이 전체 화면 덮기 */
@media (max-width: 980px) {
    .chat-home-page .chp-sub-panel {
        width: 100vw;
        border-left: none;
    }
}
