/* FORM_VERSION: 20260529_183534_free_copy_feedback */
:root {
    --free-topbar-height: calc(58px + env(safe-area-inset-top, 0px));
    --free-input-height: calc(64px + env(safe-area-inset-bottom, 0px));
    --free-blue-bg: linear-gradient(135deg, rgba(31, 78, 121, 0.82), rgba(74, 141, 184, 0.64));
    --free-soft-surface: rgba(255, 255, 255, 0.96);
    --free-line: rgba(226, 232, 240, 0.95);
    --free-text: #111827;
}

html,
body.free-trial-page {
    width: 100%;
    height: var(--free-layout-height, 100dvh);
    min-height: var(--free-layout-height, 100dvh);
    overflow: hidden;
}

body.free-trial-page {
    --dash-mobile-topbar-height: var(--free-topbar-height);
    --dash-mobile-bottom-nav-height: 0px;
    --dash-mobile-chat-input-height: var(--free-input-height);
    --dash-mobile-chat-reply-clearance: 34px;
    --dash-blue: #1f4e79;
    --dash-text: var(--free-text);
    --dash-line: #e5e9f2;
    margin: 0;
    color: var(--free-text);
    background-image: url('https://xcnd.net/img/stars3.jpg?v=20260529_183534');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body.free-trial-page :where(button, a, [role="button"], input, textarea) {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

body.free-trial-page .free-mobile-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2500;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: var(--free-topbar-height);
    padding: calc(env(safe-area-inset-top, 0px) + 3px) 12px 3px;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
    box-shadow: 0 7px 20px rgba(15, 23, 42, 0.07);
}

body.free-trial-page .free-mobile-actions .chat-action-icon-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(42, 91, 126, 0.18);
    border-radius: 10px;
    color: #12263a;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(237, 247, 255, 0.5));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 8px 18px rgba(15, 42, 64, 0.08);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

body.free-trial-page .free-mobile-title {
    min-width: 0;
    padding-left: 0;
    color: #050505;
    font-size: clamp(0.86rem, 3.35vw, 0.98rem);
    font-weight: 700;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.free-trial-page .free-mobile-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
}

body.free-trial-page .free-mobile-actions .button-area {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin: 0;
    padding: 0;
    background: transparent !important;
}

body.free-trial-page .free-mobile-actions .chat-action-label {
    display: none;
}

body.free-trial-page .free-main {
    width: 100%;
    height: var(--free-layout-height, 100dvh);
    max-width: none;
    margin: 0;
    padding: var(--free-topbar-height) 0 0 !important;
    overflow: hidden;
    display: block;
    background: transparent;
}

body.free-trial-page .free-layout {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

body.free-trial-page .free-chat-wrapper {
    display: flex !important;
    width: 100%;
    height: 100%;
    max-width: none;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body.free-trial-page .free-chat-container {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 0;
    border: 0;
    background: var(--free-soft-surface);
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

body.free-trial-page .free-chat-topbar {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(237, 247, 255, 0.5)),
        rgba(255, 255, 255, 0.42);
    border-bottom: 1px solid rgba(31, 78, 121, 0.12);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.76),
        0 8px 18px rgba(31, 78, 121, 0.06);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    backdrop-filter: blur(16px) saturate(150%);
}

body.free-trial-page .chat-messages {
    flex: 1 1 auto;
    height: auto;
    min-height: 0 !important;
    max-height: none !important;
    padding: 16px 0 calc(var(--free-input-height) + 34px);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: #fff;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

body.free-trial-page .message.user-message,
body.free-trial-page .message.bot-message {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

body.free-trial-page .message-content {
    color: #2c3e50;
    font-size: 1rem;
    line-height: 1.7;
}

body.free-trial-page .bot-message .message-content {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 250, 0.95));
    border: 1px solid rgba(52, 73, 94, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(52, 73, 94, 0.05);
}

body.free-trial-page .user-message .message-content {
    color: #2c3e50;
    background: var(--baize-blue-message-bg);
    border: 1px solid var(--baize-blue-message-border);
    box-shadow: var(--baize-blue-message-shadow);
}

body.free-trial-page .free-input-area {
    flex: 0 0 auto;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0 !important;
    z-index: 2520;
    min-height: var(--free-input-height);
    padding: 6px 0 calc(env(safe-area-inset-bottom, 0px) + 6px);
    background: transparent;
    border-top: 0;
    box-shadow: none;
}

body.free-trial-page .free-input-container {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid var(--dash-line);
    border-radius: 0;
    background: #f8fafc;
    box-shadow: none;
}

body.free-trial-page .message-input {
    min-height: 24px;
    max-height: 118px;
    color: #111;
    background: transparent;
    border: 0;
    outline: none;
    resize: none;
    font-size: 1rem;
    line-height: 1.6;
}

body.free-trial-page .message-input::placeholder {
    color: rgba(17, 24, 39, 0.48);
    font-weight: 400;
}

body.free-trial-page .send-btn {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border-color: rgba(31, 111, 160, 0.36);
    background: var(--free-blue-bg);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 9px 20px rgba(31, 111, 160, 0.18);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
    font-size: 1.2rem;
    font-weight: 700;
}

body.free-trial-page .send-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    background: linear-gradient(135deg, rgba(80, 90, 100, 0.76), rgba(108, 118, 128, 0.62));
}

body.free-trial-page .thinking-block {
    margin: 8px 0 12px;
}

body.free-trial-page .thinking-summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 2px 0;
    color: rgba(31, 78, 121, 0.78);
    font-size: 0.9em;
    font-weight: 700;
    list-style: none;
    user-select: none;
}

body.free-trial-page .thinking-summary::-webkit-details-marker {
    display: none;
}

body.free-trial-page .thinking-icon,
body.free-trial-page .thinking-icon svg {
    width: 16px;
    height: 16px;
}

body.free-trial-page .thinking-icon svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.free-trial-page .thinking-chevron {
    margin-left: 4px;
    transition: transform 0.2s ease;
}

body.free-trial-page .thinking-block[open] .thinking-chevron {
    transform: rotate(90deg);
}

body.free-trial-page .thinking-text {
    margin-top: 10px;
    padding-left: 14px;
    border-left: 2px solid rgba(31, 78, 121, 0.18);
    color: rgba(17, 24, 39, 0.72);
    font-size: 0.88em;
    line-height: 1.65;
    word-break: break-word;
}

body.free-trial-page .empty-state-note {
    margin-top: 4px;
    color: rgba(17, 24, 39, 0.62);
    font-size: 0.92em;
}

@media (min-width: 769px) {
    body.free-trial-page {
        --free-topbar-height: 62px;
        --free-input-height: 72px;
    }

    body.free-trial-page .free-main {
        padding: calc(var(--free-topbar-height) + 10px) clamp(12px, 2vw, 24px) 16px !important;
    }

    body.free-trial-page .free-layout {
        width: min(100%, 1360px);
        max-width: none;
        margin: 0 auto;
        border-radius: 0;
        overflow: visible;
        background: transparent;
        box-shadow: none;
    }

    body.free-trial-page .free-chat-container {
        border-radius: 20px;
        border: 1px solid var(--free-line);
        box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
    }

    body.free-trial-page .free-input-area {
        position: static;
        padding: 10px;
        min-height: auto;
        background: rgba(255, 255, 255, 0.3);
    }

    body.free-trial-page .chat-messages {
        padding-bottom: 20px;
    }
}

@media (max-width: 768px) {
    body.free-trial-page .free-chat-topbar {
        display: none !important;
    }

    body.free-trial-page .free-chat-container {
        background: #fff;
    }

    body.free-trial-page .message-content {
        font-size: 0.98rem;
    }
}

@media (max-width: 360px) {
    body.free-trial-page .free-mobile-topbar {
        grid-template-columns: minmax(0, 1fr) auto;
        padding-left: 10px;
        padding-right: 10px;
    }

    body.free-trial-page .free-mobile-actions .chat-action-icon-btn {
        width: 30px;
        height: 30px;
        min-width: 30px;
        min-height: 30px;
        font-size: 15px;
    }
}
