.tt-support-choice {
    width: min(760px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0 120px;
    color: #202334;
}

.tt-support-choice__head {
    margin-bottom: 20px;
}

.tt-support-choice__eyebrow {
    display: block;
    margin-bottom: 5px;
    color: #6f63d9;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
}

.tt-support-choice__head h1 {
    margin: 0;
    font-size: 32px;
    line-height: 1.2;
}

.tt-support-choice__head p {
    margin: 8px 0 0;
    color: #717586;
    font-size: 15px;
}

.tt-support-choice__notice {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 13px;
    margin-bottom: 16px;
    padding: 18px;
    border: 1px solid #e7e4f8;
    border-left: 4px solid #7869df;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(71, 61, 133, .08);
}

.tt-support-choice__notice-icon,
.tt-support-choice__option-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.tt-support-choice__notice-icon {
    width: 42px;
    height: 42px;
    color: #7769dd;
    background: #f0edff;
    border-radius: 8px;
    font-size: 19px;
}

.tt-support-choice__notice h2 {
    margin: 0 0 7px;
    font-size: 18px;
}

.tt-support-choice__notice p,
.tt-support-choice__notice strong {
    display: block;
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
}

.tt-support-choice__notice p {
    color: #686c7c;
}

.tt-support-choice__notice strong {
    margin-top: 4px;
    color: #4e467f;
}

.tt-support-choice__options {
    display: grid;
    gap: 12px;
}

.tt-support-choice__option {
    width: 100%;
    min-height: 104px;
    padding: 16px;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    color: #282b3a;
    text-align: left;
    background: rgba(255, 255, 255, .92);
    border: 1px solid #e4e5eb;
    border-radius: 8px;
    box-shadow: 0 7px 20px rgba(36, 40, 61, .06);
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.tt-support-choice__option:hover,
.tt-support-choice__option:focus-visible {
    color: #282b3a;
    border-color: #a9a0e9;
    box-shadow: 0 9px 24px rgba(75, 63, 153, .12);
    text-decoration: none;
}

.tt-support-choice__option.is-primary {
    color: #fff;
    border-color: #7164d6;
    background: #7164d6;
    box-shadow: 0 11px 26px rgba(92, 78, 190, .24);
}

.tt-support-choice__option.is-primary:hover,
.tt-support-choice__option.is-primary:focus-visible {
    color: #fff;
    border-color: #6357c2;
}

.tt-support-choice__option.is-ai {
    border-color: #d8d3f4;
    background: #f8f7ff;
}

.tt-support-choice__option.is-human {
    color: #626675;
    border: 1px solid #d8d9df;
    background: #fff;
    box-shadow: none;
}

.tt-support-choice__option-icon {
    width: 46px;
    height: 46px;
    color: #7063d4;
    background: #efecff;
    border-radius: 8px;
    font-size: 20px;
}

.is-primary .tt-support-choice__option-icon {
    color: #fff;
    background: rgba(255, 255, 255, .16);
}

.is-human .tt-support-choice__option-icon {
    color: #747784;
    background: #f2f3f5;
}

.tt-support-choice__option-copy {
    min-width: 0;
}

.tt-support-choice__option-copy strong,
.tt-support-choice__option-copy small {
    display: block;
}

.tt-support-choice__option-copy strong {
    margin-bottom: 5px;
    font-size: 17px;
    line-height: 1.3;
}

.tt-support-choice__model-note {
    margin-left: 8px;
    color: #77738f;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.tt-support-choice__option-copy small {
    color: #737788;
    font-size: 13px;
    line-height: 1.5;
}

.is-primary .tt-support-choice__option-copy small {
    color: rgba(255, 255, 255, .82);
}

.tt-support-choice__action {
    min-height: 48px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #6659ca;
    background: #eeeaff;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.is-primary .tt-support-choice__action {
    color: #5d52b8;
    background: #fff;
}

.is-human .tt-support-choice__action {
    color: #6d707b;
    background: #f3f4f6;
    border: 1px solid #e0e1e5;
}

.tt-support-choice__option.is-busy {
    opacity: .68;
    pointer-events: none;
}

.tt-ai-chat[hidden],
.tt-support-choice[hidden] {
    display: none !important;
}

.tt-ai-chat {
    width: min(820px, calc(100% - 32px));
    min-height: 620px;
    margin: 32px auto 120px;
    display: grid;
    grid-template-rows: auto minmax(360px, 1fr) auto auto;
    overflow: hidden;
    color: #202334;
    background: #fff;
    border: 1px solid #e4e2f2;
    border-radius: 8px;
    box-shadow: 0 12px 34px rgba(59, 51, 111, .1);
}

.tt-ai-chat__head {
    min-height: 70px;
    padding: 12px 16px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid #ecebf2;
}

.tt-ai-chat__head > div strong,
.tt-ai-chat__head > div small {
    display: block;
}

.tt-ai-chat__head > div strong {
    font-size: 17px;
}

.tt-ai-chat__head > div small {
    margin-top: 2px;
    color: #42a66f;
    font-size: 12px;
}

.tt-ai-chat__back,
.tt-ai-chat__clear,
.tt-ai-chat__tools button {
    min-height: 42px;
    color: #6258ba;
    background: #f2efff;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
}

.tt-ai-chat__back {
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.tt-ai-chat__clear {
    padding: 0 13px;
}

.tt-ai-chat__messages {
    min-height: 0;
    padding: 20px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #f8f8fc;
}

.tt-ai-message {
    width: 100%;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

.tt-ai-message.is-user {
    justify-content: flex-end;
}

.tt-ai-message__avatar {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #fff;
    background: #7265d5;
    border-radius: 8px;
}

.tt-ai-message__bubble {
    max-width: min(78%, 600px);
    padding: 11px 13px;
    color: #323543;
    background: #fff;
    border: 1px solid #e6e5ed;
    border-radius: 6px 8px 8px;
    font-size: 14px;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.tt-ai-message.is-user .tt-ai-message__bubble {
    color: #fff;
    background: #7164d6;
    border-color: #7164d6;
    border-radius: 8px 6px 8px 8px;
}

.tt-ai-quota-card {
    margin: 2px 42px 4px;
    padding: 12px 14px;
    color: #555667;
    background: #f8f7ff;
    border: 1px solid #e1def8;
    border-radius: 7px;
    font-size: 12px;
    line-height: 1.55;
}

.tt-ai-quota-card > strong {
    display: block;
    margin-bottom: 6px;
    color: #292a38;
    font-size: 14px;
}

.tt-ai-quota-card b {
    color: #6658cf;
    font-size: 16px;
}

.tt-ai-quota-card small {
    display: block;
    margin-top: 2px;
    color: #777989;
}

.tt-ai-quota-card p {
    margin: 7px 0 0;
    color: #898a97;
}

.tt-ai-message.is-loading .tt-ai-message__bubble {
    min-width: 62px;
}

.tt-ai-loading-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 4px;
    background: #8b84b9;
    border-radius: 50%;
    animation: tt-ai-loading 1s infinite ease-in-out;
}

.tt-ai-loading-dot:nth-child(2) { animation-delay: .14s; }
.tt-ai-loading-dot:nth-child(3) { animation-delay: .28s; }

@keyframes tt-ai-loading {
    0%, 60%, 100% { opacity: .35; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-3px); }
}

.tt-ai-chat__tools {
    padding: 9px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid #ecebf2;
}

.tt-ai-chat__tools button {
    min-height: 38px;
    padding: 0 11px;
    white-space: nowrap;
}

.tt-ai-chat__tools button:disabled {
    opacity: .48;
    cursor: not-allowed;
}

.tt-ai-chat__tools span {
    color: #858895;
    font-size: 11px;
}

.tt-ai-chat__composer {
    padding: 12px 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
    border-top: 1px solid #ecebf2;
    background: #fff;
}

.tt-ai-chat__composer textarea {
    width: 100%;
    min-height: 48px;
    max-height: 132px;
    padding: 12px 13px;
    resize: none;
    color: #272a38;
    background: #f7f7fa;
    border: 1px solid #dddce7;
    border-radius: 7px;
    font-size: 16px;
    line-height: 1.45;
    outline: none;
}

.tt-ai-chat__composer textarea:focus {
    border-color: #8f84e0;
    box-shadow: 0 0 0 3px rgba(112, 99, 212, .1);
}

.tt-ai-chat__composer button {
    min-width: 92px;
    min-height: 48px;
    color: #fff;
    background: #7164d6;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
}

.tt-ai-chat__composer button:disabled {
    opacity: .55;
    cursor: wait;
}

@media (max-width: 575.98px) {
    .tt-support-choice {
        width: calc(100% - 24px);
        padding: 22px 0 calc(108px + env(safe-area-inset-bottom, 0px));
    }

    .tt-support-choice__head {
        margin-bottom: 14px;
    }

    .tt-support-choice__head h1 {
        font-size: 26px;
    }

    .tt-support-choice__notice {
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 10px;
        padding: 14px 12px;
    }

    .tt-support-choice__notice-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .tt-support-choice__notice h2 {
        font-size: 16px;
    }

    .tt-support-choice__notice p,
    .tt-support-choice__notice strong {
        font-size: 12px;
        line-height: 1.55;
    }

    .tt-support-choice__option {
        min-height: 0;
        padding: 14px 12px;
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 10px;
    }

    .tt-support-choice__option-icon {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    .tt-support-choice__option-copy strong {
        font-size: 16px;
    }

    .tt-support-choice__model-note {
        margin-left: 6px;
        font-size: 11px;
    }

    .tt-support-choice__option-copy small {
        font-size: 12px;
    }

    .tt-support-choice__action {
        grid-column: 1 / -1;
        width: 100%;
        min-height: 48px;
        margin-top: 2px;
    }

    .tt-ai-chat {
        width: 100%;
        height: calc(100dvh - 72px - env(safe-area-inset-bottom, 0px));
        min-height: 560px;
        margin: 0 0 calc(72px + env(safe-area-inset-bottom, 0px));
        grid-template-rows: auto minmax(0, 1fr) auto auto;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .tt-ai-chat__head {
        min-height: 60px;
        padding: 8px 10px;
        gap: 8px;
    }

    .tt-ai-chat__back span {
        display: none;
    }

    .tt-ai-chat__back {
        width: 42px;
        padding: 0;
        justify-content: center;
    }

    .tt-ai-chat__messages {
        padding: 14px 12px;
    }

    .tt-ai-message__bubble {
        max-width: 84%;
        font-size: 13px;
    }

    .tt-ai-quota-card {
        margin-right: 38px;
        margin-left: 38px;
        padding: 11px 12px;
    }

    .tt-ai-chat__tools {
        padding: 7px 10px;
    }

    .tt-ai-chat__tools span {
        display: none;
    }

    .tt-ai-chat__composer {
        padding: 9px 10px;
    }

    .tt-ai-chat__composer button {
        min-width: 52px;
    }

    .tt-ai-chat__composer button span {
        display: none;
    }
}
