.serpentia-ai-shell,
.serpentia-ai-shell * {
    box-sizing: border-box;
}

.serpentia-ai-shell {
    --serpentia-terra: #B6502E;
    --serpentia-terra-deep: #8E3A22;
    --serpentia-clay: #D9A088;
    --serpentia-ink: #0A0A0A;
    --serpentia-paper: #FAFAF7;
    --serpentia-chat-height: min(920px, calc(100vh - 48px));
    --serpentia-font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --serpentia-font-serif: Georgia, "Times New Roman", serif;
    width: 100%;
    height: var(--serpentia-chat-height);
    min-height: 650px;
    display: grid;
    grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    font-family: var(--serpentia-font-sans);
    line-height: 1.45;
    isolation: isolate;
    box-shadow: 0 30px 80px rgba(10, 10, 10, 0.32), 0 2px 0 rgba(255, 255, 255, 0.03) inset;
}

.serpentia-theme-dark {
    --serpentia-bg: #0A0A0A;
    --serpentia-bg-soft: #15110F;
    --serpentia-panel: rgba(250, 250, 247, 0.055);
    --serpentia-panel-strong: rgba(250, 250, 247, 0.105);
    --serpentia-panel-muted: rgba(250, 250, 247, 0.035);
    --serpentia-line: rgba(250, 250, 247, 0.115);
    --serpentia-line-strong: rgba(217, 160, 136, 0.32);
    --serpentia-text: #FAFAF7;
    --serpentia-muted: rgba(250, 250, 247, 0.62);
    --serpentia-muted-2: rgba(250, 250, 247, 0.42);
    --serpentia-input: rgba(250, 250, 247, 0.07);
    --serpentia-card: rgba(250, 250, 247, 0.06);
    background:
        radial-gradient(circle at 20% 10%, rgba(182, 80, 46, 0.34), transparent 34%),
        radial-gradient(circle at 80% 80%, rgba(217, 160, 136, 0.14), transparent 38%),
        linear-gradient(145deg, #090807 0%, #120D0B 52%, #0A0A0A 100%);
    color: var(--serpentia-text);
    border: 1px solid rgba(250, 250, 247, 0.11);
}

.serpentia-theme-light {
    --serpentia-bg: #FAFAF7;
    --serpentia-bg-soft: #F1E6DF;
    --serpentia-panel: rgba(10, 10, 10, 0.045);
    --serpentia-panel-strong: rgba(182, 80, 46, 0.10);
    --serpentia-panel-muted: rgba(10, 10, 10, 0.025);
    --serpentia-line: rgba(10, 10, 10, 0.105);
    --serpentia-line-strong: rgba(182, 80, 46, 0.23);
    --serpentia-text: #0A0A0A;
    --serpentia-muted: rgba(10, 10, 10, 0.60);
    --serpentia-muted-2: rgba(10, 10, 10, 0.42);
    --serpentia-input: rgba(255, 255, 255, 0.82);
    --serpentia-card: rgba(255, 255, 255, 0.68);
    background:
        radial-gradient(circle at 16% 10%, rgba(217, 160, 136, 0.50), transparent 32%),
        radial-gradient(circle at 84% 84%, rgba(182, 80, 46, 0.13), transparent 36%),
        linear-gradient(145deg, #FAFAF7 0%, #F7ECE5 58%, #FAFAF7 100%);
    color: var(--serpentia-text);
    border: 1px solid rgba(10, 10, 10, 0.10);
}

.serpentia-ai-shell button,
.serpentia-ai-shell input,
.serpentia-ai-shell textarea {
    font: inherit;
}

.serpentia-ai-shell button {
    cursor: pointer;
}

.serpentia-ai-shell button:focus-visible,
.serpentia-ai-shell textarea:focus-visible,
.serpentia-ai-shell input:focus-visible {
    outline: 2px solid var(--serpentia-clay);
    outline-offset: 2px;
}

.serpentia-ai-shell svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.serpentia-sidebar {
    min-width: 0;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.44), rgba(10, 10, 10, 0.22));
    border-right: 1px solid var(--serpentia-line);
    backdrop-filter: blur(22px);
    z-index: 5;
}

.serpentia-theme-light .serpentia-sidebar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.42));
}

.serpentia-brand {
    height: 48px;
    display: flex;
    align-items: center;
}

.serpentia-brand-lockup {
    display: none;
    width: min(190px, 100%);
    height: auto;
}

.serpentia-theme-dark .serpentia-brand-lockup-dark,
.serpentia-theme-light .serpentia-brand-lockup-light {
    display: block;
}

.serpentia-new-chat {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 999px;
    color: var(--serpentia-paper);
    background: linear-gradient(135deg, var(--serpentia-terra) 0%, #C96942 100%);
    box-shadow: 0 14px 32px rgba(182, 80, 46, 0.34);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.serpentia-new-chat:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 38px rgba(182, 80, 46, 0.42);
    filter: saturate(1.04);
}

.serpentia-new-chat span {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(250, 250, 247, 0.18);
    line-height: 1;
}

.serpentia-sidebar-search {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--serpentia-line);
    background: var(--serpentia-panel-muted);
    border-radius: 14px;
    padding: 9px 11px;
    color: var(--serpentia-muted-2);
}

.serpentia-sidebar-search input {
    width: 100%;
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    color: var(--serpentia-muted);
    box-shadow: none;
    pointer-events: none;
}

.serpentia-sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.serpentia-sidebar-section-muted {
    margin-top: auto;
}

.serpentia-sidebar-label {
    margin: 0 0 2px;
    color: var(--serpentia-muted-2);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    font-weight: 800;
}

.serpentia-thread {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 16px;
    padding: 12px 12px;
    text-align: left;
    color: var(--serpentia-text);
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 3px;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.serpentia-thread:hover,
.serpentia-thread.is-active {
    background: var(--serpentia-panel-strong);
    border-color: var(--serpentia-line-strong);
}

.serpentia-thread:hover {
    transform: translateX(2px);
}

.serpentia-thread span {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.serpentia-thread small {
    color: var(--serpentia-muted);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.serpentia-capability {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 34px;
    padding: 0 4px;
    color: var(--serpentia-muted);
    font-size: 13px;
}

.serpentia-capability span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--serpentia-clay);
    box-shadow: 0 0 0 4px rgba(217, 160, 136, 0.12);
    flex: 0 0 auto;
}

.serpentia-sidebar-footer {
    border: 1px solid var(--serpentia-line);
    background: var(--serpentia-panel-muted);
    border-radius: 20px;
    padding: 14px;
}

.serpentia-plan-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--serpentia-paper);
    background: rgba(182, 80, 46, 0.92);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.09em;
}

.serpentia-sidebar-footer p {
    margin: 10px 0 0;
    color: var(--serpentia-muted);
    font-size: 12px;
}

.serpentia-chat-panel {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    background:
        linear-gradient(180deg, rgba(250, 250, 247, 0.045), transparent 24%),
        rgba(10, 10, 10, 0.08);
}

.serpentia-theme-light .serpentia-chat-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.10));
}

.serpentia-topbar {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--serpentia-line);
    background: rgba(10, 10, 10, 0.13);
    backdrop-filter: blur(22px);
    z-index: 3;
}

.serpentia-theme-light .serpentia-topbar {
    background: rgba(250, 250, 247, 0.55);
}

.serpentia-mobile-menu {
    display: none !important;
    flex-direction: column;
    gap: 4px;
}

.serpentia-mobile-menu span {
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.serpentia-topbar-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.serpentia-topbar-mark {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: linear-gradient(135deg, rgba(217, 160, 136, 0.18), rgba(182, 80, 46, 0.14));
    border: 1px solid var(--serpentia-line-strong);
}

.serpentia-topbar-mark img {
    width: 30px;
    height: 30px;
    display: block;
}

.serpentia-topbar-title strong {
    display: block;
    color: var(--serpentia-text);
    font-size: 15px;
    letter-spacing: -0.01em;
}

.serpentia-topbar-title span:not(.serpentia-topbar-mark) {
    display: block;
    color: var(--serpentia-muted);
    font-size: 12px;
}

.serpentia-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.serpentia-model-pill,
.serpentia-icon-button {
    min-height: 40px;
    border: 1px solid var(--serpentia-line);
    border-radius: 999px;
    color: var(--serpentia-text);
    background: var(--serpentia-panel);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.serpentia-model-pill:hover,
.serpentia-icon-button:hover {
    background: var(--serpentia-panel-strong);
    border-color: var(--serpentia-line-strong);
    transform: translateY(-1px);
}

.serpentia-model-pill {
    gap: 8px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 800;
}

.serpentia-model-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--serpentia-terra);
    box-shadow: 0 0 0 4px rgba(182, 80, 46, 0.18);
}

.serpentia-icon-button {
    width: 40px;
    padding: 0;
}

.serpentia-chat-scroll {
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 28px clamp(18px, 3.8vw, 54px) 22px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    scroll-behavior: smooth;
}

.serpentia-chat-scroll::-webkit-scrollbar {
    width: 12px;
}

.serpentia-chat-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.serpentia-chat-scroll::-webkit-scrollbar-thumb {
    background: var(--serpentia-panel-strong);
    border-radius: 999px;
    border: 4px solid transparent;
    background-clip: padding-box;
}

.serpentia-hero {
    width: min(760px, 100%);
    margin: 8px auto 2px;
    padding: clamp(26px, 4vw, 40px);
    border: 1px solid var(--serpentia-line);
    border-radius: 30px;
    background:
        radial-gradient(circle at 0 0, rgba(217, 160, 136, 0.18), transparent 34%),
        radial-gradient(circle at 100% 100%, rgba(182, 80, 46, 0.20), transparent 32%),
        var(--serpentia-card);
    text-align: center;
    box-shadow: 0 28px 80px rgba(10, 10, 10, 0.14);
}

.serpentia-hero-orb {
    width: 86px;
    height: 86px;
    margin: 0 auto 14px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--serpentia-line-strong);
    background: linear-gradient(135deg, rgba(250, 250, 247, 0.10), rgba(182, 80, 46, 0.14));
    box-shadow: 0 22px 45px rgba(182, 80, 46, 0.20);
}

.serpentia-hero-orb img {
    width: 62px;
    height: 62px;
}

.serpentia-eyebrow {
    margin: 0 0 7px;
    color: var(--serpentia-clay);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.serpentia-hero h2 {
    margin: 0;
    color: var(--serpentia-text);
    font-family: var(--serpentia-font-serif);
    font-size: clamp(31px, 4vw, 56px);
    line-height: 1.02;
    font-weight: 500;
    letter-spacing: -0.055em;
}

.serpentia-hero > p:not(.serpentia-eyebrow) {
    max-width: 560px;
    margin: 14px auto 0;
    color: var(--serpentia-muted);
    font-size: 15px;
}

.serpentia-prompt-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 24px;
}

.serpentia-prompt-grid button {
    min-height: 94px;
    border: 1px solid var(--serpentia-line);
    border-radius: 18px;
    padding: 14px;
    text-align: left;
    color: var(--serpentia-text);
    background: rgba(250, 250, 247, 0.055);
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.serpentia-theme-light .serpentia-prompt-grid button {
    background: rgba(255, 255, 255, 0.56);
}

.serpentia-prompt-grid button:hover {
    transform: translateY(-2px);
    background: var(--serpentia-panel-strong);
    border-color: var(--serpentia-line-strong);
}

.serpentia-prompt-grid button span {
    display: block;
    width: fit-content;
    margin-bottom: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--serpentia-paper);
    background: var(--serpentia-terra);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.10em;
}

.serpentia-message {
    width: min(860px, 100%);
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-self: center;
}

.serpentia-message-user {
    grid-template-columns: minmax(0, 1fr) 42px;
    align-self: center;
}

.serpentia-message-user .serpentia-avatar {
    order: 2;
}

.serpentia-message-user .serpentia-message-body {
    order: 1;
    align-items: flex-end;
}

.serpentia-avatar {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid var(--serpentia-line);
    background: var(--serpentia-panel);
    color: var(--serpentia-paper);
    font-weight: 900;
}

.serpentia-avatar img {
    width: 31px;
    height: 31px;
    display: block;
}

.serpentia-avatar-user {
    background: linear-gradient(135deg, var(--serpentia-terra), var(--serpentia-terra-deep));
    border-color: rgba(250, 250, 247, 0.10);
}

.serpentia-message-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
}

.serpentia-message-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--serpentia-muted-2);
    font-size: 12px;
}

.serpentia-message-meta strong {
    color: var(--serpentia-muted);
    font-weight: 800;
}

.serpentia-message-card {
    max-width: 100%;
    border: 1px solid var(--serpentia-line);
    border-radius: 22px;
    padding: 16px 17px;
    color: var(--serpentia-text);
    background: var(--serpentia-card);
    box-shadow: 0 16px 42px rgba(10, 10, 10, 0.09);
}

.serpentia-message-card p,
.serpentia-message-card ul,
.serpentia-message-card ol {
    margin-top: 0;
}

.serpentia-message-card p:last-child,
.serpentia-message-card ul:last-child,
.serpentia-message-card ol:last-child {
    margin-bottom: 0;
}

.serpentia-message-card ul,
.serpentia-message-card ol {
    padding-left: 1.25em;
}

.serpentia-message-user .serpentia-message-card {
    color: var(--serpentia-paper);
    border-color: rgba(250, 250, 247, 0.12);
    background: linear-gradient(135deg, var(--serpentia-terra), #A64628);
    box-shadow: 0 16px 46px rgba(182, 80, 46, 0.22);
}

.serpentia-tool-row,
.serpentia-message-files {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.serpentia-tool-row span,
.serpentia-message-file,
.serpentia-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    max-width: 100%;
    border-radius: 999px;
    border: 1px solid var(--serpentia-line);
    padding: 0 10px;
    color: var(--serpentia-muted);
    background: var(--serpentia-panel-muted);
    font-size: 12px;
    font-weight: 700;
}

.serpentia-message-user .serpentia-message-file {
    color: rgba(250, 250, 247, 0.82);
    border-color: rgba(250, 250, 247, 0.18);
    background: rgba(250, 250, 247, 0.10);
}

.serpentia-message-file span,
.serpentia-file-chip span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.serpentia-file-chip span {
    max-width: 210px;
}

.serpentia-composer {
    padding: 12px clamp(18px, 3.8vw, 54px) 22px;
    border-top: 1px solid var(--serpentia-line);
    background: linear-gradient(180deg, transparent, rgba(10, 10, 10, 0.20) 18%, rgba(10, 10, 10, 0.33));
    backdrop-filter: blur(18px);
}

.serpentia-theme-light .serpentia-composer {
    background: linear-gradient(180deg, transparent, rgba(250, 250, 247, 0.78) 18%, rgba(250, 250, 247, 0.92));
}

.serpentia-file-preview {
    width: min(860px, 100%);
    margin: 0 auto 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.serpentia-file-preview:empty {
    display: none;
}

.serpentia-file-chip {
    min-height: 34px;
    color: var(--serpentia-text);
    background: var(--serpentia-panel-strong);
    border-color: var(--serpentia-line-strong);
}

.serpentia-file-chip button {
    border: 0;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(250, 250, 247, 0.11);
    color: inherit;
    padding: 0;
    line-height: 1;
}

.serpentia-theme-light .serpentia-file-chip button {
    background: rgba(10, 10, 10, 0.08);
}

.serpentia-composer-box {
    width: min(860px, 100%);
    margin: 0 auto;
    border: 1px solid var(--serpentia-line-strong);
    border-radius: 26px;
    background: var(--serpentia-input);
    box-shadow: 0 24px 70px rgba(10, 10, 10, 0.22), 0 1px 0 rgba(255, 255, 255, 0.05) inset;
    overflow: hidden;
}

.serpentia-theme-light .serpentia-composer-box {
    box-shadow: 0 24px 70px rgba(182, 80, 46, 0.12), 0 1px 0 rgba(255, 255, 255, 0.80) inset;
}

.serpentia-composer textarea {
    width: 100%;
    min-height: 62px;
    max-height: 180px;
    resize: none;
    display: block;
    padding: 18px 18px 10px;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--serpentia-text);
    box-shadow: none;
}

.serpentia-composer textarea::placeholder {
    color: var(--serpentia-muted-2);
}

.serpentia-composer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 10px 10px 12px;
}

.serpentia-composer-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.serpentia-tool-button {
    min-height: 38px;
    border: 1px solid var(--serpentia-line);
    border-radius: 999px;
    padding: 0 12px;
    color: var(--serpentia-muted);
    background: var(--serpentia-panel-muted);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 800;
    transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.serpentia-tool-button:hover,
.serpentia-tool-button.is-active {
    color: var(--serpentia-text);
    background: var(--serpentia-panel-strong);
    border-color: var(--serpentia-line-strong);
    transform: translateY(-1px);
}

.serpentia-tool-button svg {
    width: 18px;
    height: 18px;
}

.serpentia-recording-pill {
    display: none;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--serpentia-paper);
    background: rgba(182, 80, 46, 0.92);
    font-size: 13px;
    font-weight: 900;
}

.serpentia-ai-shell.is-recording .serpentia-recording-pill {
    display: inline-flex;
}

.serpentia-wave {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 18px;
}

.serpentia-wave i {
    display: block;
    width: 3px;
    height: 9px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.76;
    animation: serpentia-wave 760ms ease-in-out infinite;
}

.serpentia-wave i:nth-child(2) {
    animation-delay: 120ms;
}

.serpentia-wave i:nth-child(3) {
    animation-delay: 240ms;
}

@keyframes serpentia-wave {
    0%, 100% { transform: scaleY(0.55); }
    50% { transform: scaleY(1.35); }
}

.serpentia-send-button {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 0;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--serpentia-paper);
    background: linear-gradient(135deg, var(--serpentia-terra), #C76442);
    box-shadow: 0 12px 24px rgba(182, 80, 46, 0.26);
    transition: opacity 160ms ease, transform 160ms ease, filter 160ms ease;
}

.serpentia-send-button:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: saturate(1.07);
}

.serpentia-send-button:disabled {
    cursor: not-allowed;
    opacity: 0.42;
    filter: grayscale(0.18);
    box-shadow: none;
}

.serpentia-composer-note {
    width: min(860px, 100%);
    margin: 8px auto 0;
    color: var(--serpentia-muted-2);
    text-align: center;
    font-size: 11px;
}

.serpentia-typing {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
}

.serpentia-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--serpentia-clay);
    animation: serpentia-typing 1s ease-in-out infinite;
}

.serpentia-typing span:nth-child(2) {
    animation-delay: 160ms;
}

.serpentia-typing span:nth-child(3) {
    animation-delay: 320ms;
}

@keyframes serpentia-typing {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
    40% { transform: translateY(-5px); opacity: 1; }
}

.serpentia-admin-wrap .serpentia-ai-shell {
    margin-top: 18px;
    max-width: 1320px;
}

.serpentia-admin-card {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 14px;
    margin: 8px 0 12px;
    border-radius: 12px;
    border: 1px solid #dcdcde;
    background: #fff;
}

@media (max-width: 980px) {
    .serpentia-ai-shell {
        grid-template-columns: 1fr;
        min-height: 620px;
    }

    .serpentia-sidebar {
        position: absolute;
        inset: 0 auto 0 0;
        width: min(318px, 84vw);
        transform: translateX(-102%);
        transition: transform 220ms ease;
        box-shadow: 24px 0 60px rgba(10, 10, 10, 0.30);
    }

    .serpentia-ai-shell.sidebar-open .serpentia-sidebar {
        transform: translateX(0);
    }

    .serpentia-mobile-menu {
        display: inline-flex !important;
    }

    .serpentia-topbar {
        padding-inline: 16px;
    }
}

@media (max-width: 700px) {
    .serpentia-ai-shell {
        border-radius: 20px;
        min-height: 660px;
    }

    .serpentia-topbar {
        min-height: 68px;
        gap: 10px;
    }

    .serpentia-topbar-title span:not(.serpentia-topbar-mark) {
        display: none;
    }

    .serpentia-topbar-actions .serpentia-icon-button {
        display: none;
    }

    .serpentia-model-pill {
        max-width: 148px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .serpentia-chat-scroll {
        padding: 18px 14px;
        gap: 18px;
    }

    .serpentia-hero {
        padding: 24px 16px;
        border-radius: 24px;
    }

    .serpentia-prompt-grid {
        grid-template-columns: 1fr;
    }

    .serpentia-message,
    .serpentia-message-user {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 9px;
    }

    .serpentia-message-user .serpentia-avatar {
        order: 0;
    }

    .serpentia-message-user .serpentia-message-body {
        order: 0;
        align-items: flex-start;
    }

    .serpentia-avatar {
        width: 34px;
        height: 34px;
        border-radius: 12px;
    }

    .serpentia-avatar img {
        width: 25px;
        height: 25px;
    }

    .serpentia-composer {
        padding: 10px 12px 14px;
    }

    .serpentia-tool-button {
        padding-inline: 10px;
    }

    .serpentia-composer-note {
        display: none;
    }
}

/* Full-page shortcode modes -------------------------------------------------
   Use [serpentia_ai_chat layout="full"] to break out of a theme content column.
   Use [serpentia_ai_chat layout="fullscreen"] to pin the prototype to the browser viewport.
*/
.serpentia-ai-shell.serpentia-layout-full {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    border-radius: 0 !important;
    box-shadow: none;
}

.serpentia-ai-shell.serpentia-layout-fullscreen {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 999999;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none;
}

body.admin-bar .serpentia-ai-shell.serpentia-layout-fullscreen {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .serpentia-ai-shell.serpentia-layout-fullscreen {
        top: 46px;
    }
}

body:has(.serpentia-ai-shell.serpentia-layout-fullscreen) {
    overflow: hidden;
}
