.c365-robot-tile-content {
    --c365-robot-shell-dark: #07131b;
    --c365-robot-shell-mid: #102b3a;
    --c365-robot-shell-light: #274b5d;
    --c365-robot-face-surface: #edf5f9;
    --c365-robot-accent: var(--c365-tile-accent, #00dfff);
    --c365-robot-accent-rgb: var(--c365-tile-accent-rgb, 0, 223, 255);
    --c365-robot-eye: var(--c365-robot-accent);
    --c365-robot-mouth: var(--c365-robot-accent);
    --c365-robot-edge-light: rgba(151, 221, 245, .32);
    --c365-robot-muted: #78909e;
    --c365-robot-gaze-x: 0px;
    --c365-robot-gaze-y: 0px;
    --c365-robot-mouth-open: 1;
    --c365-robot-head-angle: 0deg;
    --c365-robot-head-x: 0px;
    --c365-robot-head-y: 0px;
    --c365-robot-listening: #20d58a;
    --c365-robot-listening-rgb: 32, 213, 138;
    --c365-robot-listening-border: rgba(64, 241, 169, .82);
    --c365-robot-listening-glow: 0 0 34px rgba(32, 213, 138, .3);
    --c365-robot-listening-eye: #64ffc0;
    --c365-robot-listening-wave: #59f5b3;
    --c365-robot-listening-surface: rgba(8, 68, 48, .18);
    --c365-robot-listening-control: #17b978;
    container-type: size;
    display: grid;
    grid-template: minmax(0, 1fr) auto / minmax(0, 1fr);
    grid-template-areas: "interaction" "composer";
    gap: clamp(.55rem, 2cqw, 1rem);
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

.c365-renderer-content,
.c365-renderer-content__chart {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
}

.c365-clock-tile {
    width: 100%;
    height: 100%;
    display: grid;
    place-content: center start;
    place-items: start;
    gap: .65rem;
    color: var(--c365-tile-text-primary, #edf8fc);
    min-width: 0;
    min-height: 0;
    padding-block: clamp(.2rem, 1.4cqw, .5rem);
    text-align: left;
}

.c365-clock-tile time {
    color: var(--c365-tile-text-primary, #edf8fc);
    max-width: 100%;
    overflow: hidden;
    font-size: clamp(2.75rem, 14cqw, 4rem);
    font-weight: 400;
    font-variant-numeric: tabular-nums lining-nums;
    letter-spacing: -.03em;
    line-height: 1;
    text-overflow: clip;
    white-space: nowrap;
}

.c365-clock-tile span {
    color: var(--c365-tile-text-secondary, #9fb4c3);
}

.c365-clock-tile span {
    font-size: clamp(.75rem, 3.2cqw, .9rem);
    line-height: 1.25;
    white-space: nowrap;
}

.c365-robot-interaction-surface {
    grid-area: interaction;
    display: grid;
    grid-template: minmax(0, 1fr) auto / minmax(0, 1fr);
    grid-template-areas: "hero" "conversation";
    gap: clamp(.25rem, 1.2cqh, .65rem);
    min-width: 0;
    min-height: 0;
    border-radius: 1rem;
    cursor: pointer;
    transition: background 180ms ease, box-shadow 180ms ease;
}

.c365-robot-interaction-surface:hover {
    background: rgba(var(--c365-robot-accent-rgb), .045);
}

.c365-robot-interaction-surface:focus-visible {
    outline: 2px solid var(--c365-robot-accent);
    outline-offset: -2px;
    box-shadow: 0 0 24px rgba(var(--c365-robot-accent-rgb), .22);
}

.c365-robot-hero {
    grid-area: hero;
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(2.7rem, 9cqw, 4.2rem);
    align-items: center;
    min-width: 0;
    min-height: 0;
}

.c365-robot-avatar-host {
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 0;
    height: 100%;
}

.c365-robot-voice-action {
    display: grid;
    place-items: center;
    align-content: center;
    gap: .35rem;
    width: 100%;
    z-index: 2;
}

.c365-robot-microphone {
    width: clamp(2.55rem, 8cqw, 3.8rem);
    height: clamp(2.55rem, 8cqw, 3.8rem);
    padding: 0 !important;
    display: grid;
    place-items: center;
    border-color: rgba(var(--c365-robot-accent-rgb), .62) !important;
    box-shadow: 0 0 18px rgba(var(--c365-robot-accent-rgb), .15);
}

.c365-robot-tile-content.is-avatar-focused {
    grid-template: minmax(0, 1fr) auto / minmax(0, 1fr);
    grid-template-areas: "interaction" "composer";
}

.c365-robot-tile-content.is-avatar-focused .c365-robot-interaction-surface {
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    grid-template-areas: "hero";
}

.c365-robot-tile-content.is-avatar-focused .c365-robot-avatar-host {
    overflow: hidden;
}

.c365-robot-tile-content.is-avatar-focused .c365-robot-avatar {
    width: 100%;
    height: 100%;
    max-height: 100%;
}

.c365-robot-tile-content.is-avatar-focused .c365-robot-avatar svg {
    transform: none;
}

.c365-robot-tile-content.is-avatar-focused .c365-robot-torso,
.c365-robot-tile-content.is-avatar-focused .c365-robot-neck,
.c365-robot-tile-content.is-avatar-focused .c365-robot-conversation {
    display: none;
}

.c365-robot-tile-content.is-avatar-focused .c365-robot-composer {
    position: absolute;
    z-index: 2;
    right: 6%;
    bottom: .5rem;
    left: 6%;
}

.c365-robot-tile-content.is-avatar-focused[data-operational="false"] .c365-robot-composer {
    display: none;
}

.c365-robot-avatar {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 360 / 320;
    filter: drop-shadow(0 0 20px rgba(var(--c365-robot-accent-rgb), .27));
    transition: filter 320ms ease;
}

.c365-robot-avatar svg {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
}

.c365-robot-pupil {
    transform: translate(var(--c365-robot-gaze-x), var(--c365-robot-gaze-y));
    transform-box: fill-box;
    transform-origin: center;
    filter: drop-shadow(0 0 4px rgba(var(--c365-robot-accent-rgb), .65));
    will-change: transform;
}

.c365-robot-mouth {
    transform: scaleY(var(--c365-robot-mouth-open));
    transform-origin: center;
    transition: transform 100ms ease, fill 280ms ease, rx 180ms ease;
    filter: drop-shadow(0 1px 1px rgba(255, 255, 255, .35));
}

.c365-robot-eyelid {
    transform-origin: center top;
    transform: scaleY(0);
}

.c365-robot-tile-content.is-blinking .c365-robot-eyelid {
    animation: c365-robot-blink 150ms ease-in-out;
}

.c365-robot-glow,
.c365-robot-status-light {
    transition: fill 320ms ease, opacity 320ms ease;
}

.c365-robot-head {
    transform-box: view-box;
    transform-origin: 180px 251px;
    transform: translate(var(--c365-robot-head-x), var(--c365-robot-head-y)) rotate(var(--c365-robot-head-angle));
    will-change: transform;
}

.c365-robot-head-shell,
.c365-robot-antenna {
    transition: filter 240ms ease;
}

.c365-robot-tile-content[data-visual-state="Responding"] .c365-robot-brow--left {
    transform: translateY(3px) rotate(-5deg);
}

.c365-robot-tile-content[data-visual-state="Responding"] .c365-robot-brow--right {
    transform: translateY(-2px) rotate(4deg);
}

.c365-robot-tile-content[data-visual-state="Responding"] .c365-robot-mouth {
    transform: translateY(1px) rotate(-4deg) scaleX(.72);
}

.c365-robot-tile-content[data-visual-state="Speaking"] .c365-robot-mouth {
    rx: 8px;
}

.c365-robot-tile-content:is(
    [data-visual-state="PermissionDenied"],
    [data-visual-state="InputUnavailable"],
    [data-visual-state="ResponseFailed"],
    [data-visual-state="SpeechUnavailable"]
) .c365-robot-eye {
    transform-box: fill-box;
    transform-origin: center;
    transform: scaleY(.88);
}

.c365-robot-tile-content:is(
    [data-visual-state="PermissionDenied"],
    [data-visual-state="InputUnavailable"],
    [data-visual-state="SpeechUnavailable"]
) .c365-robot-pupil {
    opacity: .52;
}

.c365-robot-conversation {
    grid-area: conversation;
    display: flex;
    flex-direction: column;
    justify-content: start;
    gap: .28rem;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    text-align: center;
    padding-inline: clamp(.2rem, 4cqw, 2rem);
}

.c365-robot-interaction-state {
    display: inline-flex;
    align-items: center;
    color: var(--c365-tile-text-secondary, #9fb4c3);
    font-size: clamp(.72rem, 2.2cqw, .9rem);
    font-weight: 800;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.c365-robot-message,
.c365-robot-response {
    margin: 0;
    color: var(--c365-tile-text-primary, #f2f8fc);
    font-size: clamp(.85rem, 2.8cqw, 1.05rem);
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.c365-robot-turn-label {
    color: var(--c365-robot-accent);
    font-size: clamp(.64rem, 1.7cqw, .76rem);
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.c365-robot-operation-status {
    min-height: 1.1em;
    margin: 0;
    color: var(--c365-tile-text-muted, #91a9ba);
    font-size: clamp(.7rem, 1.8cqw, .82rem);
}

.c365-robot-tile-content:is(
    [data-visual-state="PermissionDenied"],
    [data-visual-state="InputUnavailable"],
    [data-visual-state="ResponseFailed"],
    [data-visual-state="SpeechUnavailable"]
) .c365-robot-operation-status {
    color: var(--c365-robot-alert);
}

.c365-robot-message {
    font-family: "Sora", "Manrope", sans-serif;
    font-size: clamp(1rem, 3.4cqw, 1.45rem);
    font-weight: 650;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.c365-robot-response {
    display: -webkit-box;
    overflow: hidden;
    color: var(--c365-tile-text-secondary, #a9bfcc);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--robot-response-lines, 4);
}

.c365-robot-context-title {
    color: var(--c365-robot-accent);
}

.c365-robot-context-panel {
    display: grid;
    gap: .4rem;
    padding: .58rem .7rem;
    border: 1px solid rgba(var(--c365-robot-accent-rgb), .26);
    border-radius: .7rem;
    color: var(--c365-tile-text-secondary, #a9bfcc);
    background: rgba(4, 16, 25, .58);
}

.c365-robot-suggestions,
.c365-robot-actions {
    display: flex;
    gap: .4rem;
    min-width: 0;
    flex-wrap: wrap;
}

.c365-robot-suggestions button,
.c365-robot-actions button,
.c365-robot-composer button {
    border: 1px solid rgba(var(--c365-robot-accent-rgb), .38);
    border-radius: 999px;
    color: #e7f9ff;
    background: rgba(var(--c365-robot-accent-rgb), .09);
}

.c365-robot-suggestions button,
.c365-robot-actions button {
    padding: .28rem .62rem;
    font-size: .75rem;
}

.c365-robot-composer {
    grid-area: composer;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: .4rem;
    min-width: 0;
}

.c365-robot-composer input {
    min-width: 0;
    min-height: var(--c365-control-height, 44px);
    border: 1px solid var(--c365-control-border, rgba(72, 119, 170, .42));
    border-radius: var(--c365-control-radius, 11px);
    padding: .62rem .85rem;
    color: var(--c365-control-text, #f7f5ff);
    background: var(--c365-control-background, rgba(6, 6, 24, .72));
    font-family: var(--c365-font-body, "Manrope", sans-serif);
    font-size: .9rem;
}

.c365-robot-composer button {
    min-height: 2.2rem;
    padding: .35rem .68rem;
}

.c365-robot-composer button:focus-visible,
.c365-robot-suggestions button:focus-visible,
.c365-robot-actions button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.c365-robot-icon-button svg {
    display: block;
    width: 1.15rem;
    height: 1.15rem;
    fill: currentColor;
}

.c365-robot-icon-button svg[hidden] {
    display: none !important;
}

.c365-robot-icon-button.is-pending svg {
    opacity: .45;
}

.c365-robot-listening-indicator {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 1.7rem;
}

.c365-robot-listening-indicator i {
    width: 2px;
    height: .45rem;
    border-radius: 999px;
    background: var(--c365-robot-listening-wave);
    animation: c365-robot-listening-wave .72s ease-in-out infinite alternate;
}

.c365-robot-listening-indicator i:nth-child(2) { animation-delay: -.46s; }
.c365-robot-listening-indicator i:nth-child(3) { animation-delay: -.2s; }
.c365-robot-listening-indicator i:nth-child(4) { animation-delay: -.58s; }

.c365-robot-tile-content.is-listening {
    --c365-robot-accent: var(--c365-robot-listening);
    --c365-robot-accent-rgb: var(--c365-robot-listening-rgb);
    background: linear-gradient(145deg, var(--c365-robot-listening-surface), transparent 64%);
}

.c365-robot-tile-content.is-transcribing {
    --c365-robot-accent: #49afe9;
    --c365-robot-accent-rgb: 73, 175, 233;
    background: linear-gradient(145deg, rgba(73, 175, 233, .1), transparent 64%);
}

.c365-robot-tile-content.is-listening .c365-robot-listening-indicator { display: inline-flex; }
.c365-robot-tile-content.is-listening [data-robot-microphone] {
    border-color: var(--c365-robot-listening-border);
    background: var(--c365-robot-listening-control);
    box-shadow: 0 0 18px rgba(var(--c365-robot-listening-rgb), .38);
}
.c365-robot-tile-content.is-listening .c365-robot-pupil-highlights {
    color: var(--c365-robot-listening-eye);
    filter: drop-shadow(0 0 5px var(--c365-robot-listening-eye));
}
.c365-robot-tile-content.is-listening .c365-robot-pupil-highlights ellipse:last-child {
    fill: var(--c365-robot-listening-eye);
}
.c365-robot-tile-content.is-listening .c365-robot-head-shell,
.c365-robot-tile-content.is-listening .c365-robot-antenna,
.c365-robot-tile-content.is-listening .c365-robot-torso {
    filter: drop-shadow(0 0 8px rgba(var(--c365-robot-listening-rgb), .42)) saturate(1.12);
}

.c365-tile-shell.c365-tile-shell--robot-listening {
    border-color: var(--c365-robot-listening-border);
    background: linear-gradient(145deg, var(--c365-tile-surface-raised), var(--c365-tile-surface));
}

.c365-tile-shell.c365-tile-shell--robot-listening .c365-tile-header {
    border-color: rgba(var(--c365-robot-listening-rgb), .42);
}

.c365-robot-tile-content[data-visual-state="Responding"] .c365-robot-status-light,
.c365-robot-tile-content[data-visual-state="Transcribing"] .c365-robot-status-light,
.c365-robot-tile-content[data-visual-state="Listening"] .c365-robot-status-light {
    animation: c365-robot-status-breathe 1.6s ease-in-out infinite;
}

.c365-robot-tile-content[data-visual-state="Responding"] .c365-robot-antenna {
    animation: c365-robot-antenna-think 2.2s ease-in-out infinite;
}

@container (max-width: 430px), (max-height: 360px) {
    .c365-robot-tile-content {
        grid-template: minmax(0, 1fr) auto / 1fr;
        grid-template-areas: "interaction" "composer";
        gap: .25rem;
    }
    .c365-robot-interaction-surface {
        grid-template: minmax(0, 1fr) auto / 1fr;
        grid-template-areas: "hero" "conversation";
    }
    .c365-robot-avatar { width: 100%; height: 100%; }
    .c365-robot-torso, .c365-robot-neck, .c365-robot-detail, .c365-robot-highlight { display: none; }
    .c365-robot-conversation { justify-content: end; text-align: center; }
    .c365-robot-interaction-state { justify-content: center; }
    .c365-robot-context-panel, .c365-robot-suggestions { display: none; }
    .c365-robot-message, .c365-robot-response { font-size: .78rem; -webkit-line-clamp: 1; }
    .c365-robot-composer {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: .25rem;
    }
    .c365-robot-composer input { padding: .35rem .55rem; }
    .c365-robot-composer button { min-height: 2rem; padding: .28rem .55rem; }
    .c365-robot-mute { display: none; }
}

@container (max-width: 430px) and (min-height: 500px) {
    .c365-robot-tile-content {
        grid-template: minmax(0, 1fr) auto / 1fr;
        grid-template-areas: "interaction" "composer";
    }
    .c365-robot-interaction-surface {
        grid-template: minmax(0, 1fr) auto / 1fr;
        grid-template-areas: "hero" "conversation";
    }
    .c365-robot-avatar { width: 100%; height: 100%; }
    .c365-robot-tile-content.is-avatar-focused .c365-robot-avatar {
        width: 100%;
        max-height: 78%;
    }
    .c365-robot-composer { grid-template-columns: minmax(0, 1fr) auto; }
}

@keyframes c365-robot-listening-wave {
    from { transform: scaleY(.55); opacity: .66; }
    to { transform: scaleY(1.45); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .c365-robot-listening-indicator i { animation: none; }
}

@container (min-width: 760px) and (min-height: 520px) {
    .c365-robot-avatar { width: 100%; }
}

.c365-robot-tile-content[data-tile-size-mode="compact-tall"] {
    grid-template: minmax(0, 1fr) auto / minmax(0, 1fr);
    grid-template-areas: "interaction" "composer";
}

.c365-robot-tile-content[data-tile-size-mode="compact-tall"] .c365-robot-conversation {
    max-height: 7.5rem;
}

.c365-robot-tile-content[data-tile-size-mode="compact-tall"] .c365-robot-suggestions,
@container (max-width: 430px), (max-height: 360px) {
    .c365-robot-tile-content.is-avatar-focused {
        grid-template: minmax(0, 1fr) / minmax(0, 1fr);
        grid-template-areas: "hero";
    }
    .c365-robot-tile-content.is-avatar-focused .c365-robot-avatar {
        width: 100%;
    }
}

@keyframes c365-robot-blink {
    0%, 100% { transform: scaleY(0); }
    45%, 55% { transform: scaleY(1); }
}

@keyframes c365-robot-status-breathe {
    50% { opacity: .45; transform: scale(.84); }
}

@keyframes c365-robot-antenna-think {
    50% { transform: translateY(-2px); }
}

@media (prefers-reduced-motion: reduce) {
    .c365-robot-tile-content *, .c365-robot-tile-content *::before, .c365-robot-tile-content *::after {
        animation: none !important;
        transition-duration: .01ms !important;
    }
}
