.property-ai-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    min-height: 3rem;
    padding: .7rem 1.15rem;
    border: 1px solid #172554;
    border-radius: .45rem;
    background: #172554;
    color: #fff;
    font-size: .82rem;
    font-weight: 750;
    line-height: 1;
    box-shadow: none;
    transition: border-color .15s ease, background .15s ease;
}
.property-ai-trigger:hover { border-color: var(--brand-gold-surface, #d49520); background: var(--brand-gold-surface, #d49520); }
.property-ai-trigger svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.property-ai-overlay { position: absolute; inset: 0; background: rgba(9, 18, 43, .48); }
.property-ai-panel { position: absolute; inset-block: 0; right: 0; display: flex; width: 32rem; max-width: 100vw; flex-direction: column; border-left: 1px solid #dce1ea; background: #fff; box-shadow: -18px 0 50px rgba(8, 20, 48, .16); }
.property-ai-panel,
.property-ai-panel * { box-sizing: border-box; }
.property-ai-header { flex: 0 0 auto; padding: 1.05rem 1.15rem; border-top: 3px solid var(--brand-gold-surface, #d49520); border-bottom: 1px solid #dce1ea; background: #fff; color: #141a28; }
.property-ai-header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.property-ai-title { display: grid; min-width: 0; gap: .12rem; }
.property-ai-title strong { font-family: "Plus Jakarta Sans", sans-serif; font-size: 1rem; font-weight: 800; }
.property-ai-title span { overflow: hidden; color: #68738a; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.property-ai-header-actions { display: flex; align-items: center; gap: .25rem; }
.property-ai-icon-button { display: grid; place-items: center; width: 2.15rem; height: 2.15rem; border-radius: .4rem; color: #68738a; transition: background .15s ease, color .15s ease; }
.property-ai-icon-button:hover { background: #eef0f4; color: #141a28; }
.property-ai-icon-button svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.property-ai-context { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .75rem; margin: 0; padding: .8rem 1.15rem; border-bottom: 1px solid #e5e8ee; background: #f7f8fa; }
.property-ai-context-copy { min-width: 0; }
.property-ai-context-copy strong { display: block; overflow: hidden; color: #172554; font-size: .76rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.property-ai-context-copy span { display: block; overflow: hidden; margin-top: .14rem; color: #56627a; font-size: .64rem; text-overflow: ellipsis; white-space: nowrap; }
.property-ai-context-price { color: var(--brand-gold-text, #d49520); font-family: "Plus Jakarta Sans", sans-serif; font-size: .8rem; font-weight: 800; white-space: nowrap; }

.property-ai-messages { flex: 1 1 auto; overflow-y: auto; padding: 1.05rem 1.15rem 1.25rem; background: #fff; scroll-behavior: smooth; }
.property-ai-message { display: flex; margin-top: .85rem; }
.property-ai-message:first-child { margin-top: 0; }
.property-ai-message.is-user { justify-content: flex-end; }
.property-ai-bubble-wrap { display: grid; max-width: 87%; gap: .25rem; }
.property-ai-bubble { border: 0; border-radius: .55rem .55rem .55rem .12rem; background: #f1f3f6; color: #263451; padding: .72rem .8rem; font-size: .78rem; line-height: 1.6; white-space: pre-wrap; box-shadow: none; }
.is-user .property-ai-bubble { border-radius: .55rem .55rem .12rem .55rem; background: #172554; color: #fff; }
.property-ai-bubble--markdown { overflow-wrap: anywhere; white-space: normal; }
.property-ai-bubble--markdown > :first-child { margin-top: 0; }
.property-ai-bubble--markdown > :last-child { margin-bottom: 0; }
.property-ai-bubble--markdown p { margin: 0 0 .55rem; }
.property-ai-bubble--markdown strong,
.property-ai-bubble--markdown b { color: #172554; font-weight: 800; }
.property-ai-bubble--markdown em,
.property-ai-bubble--markdown i { font-style: italic; }
.property-ai-bubble--markdown ul,
.property-ai-bubble--markdown ol { margin: .5rem 0 .6rem; padding-left: 1.2rem; }
.property-ai-bubble--markdown ul { list-style: disc; }
.property-ai-bubble--markdown ol { list-style: decimal; }
.property-ai-bubble--markdown li { padding-left: .08rem; }
.property-ai-bubble--markdown li + li { margin-top: .24rem; }
.property-ai-bubble--markdown li > p { margin-bottom: .25rem; }
.property-ai-bubble--markdown a { color: var(--brand-gold-text, #d49520); font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.property-ai-bubble--markdown a:hover { color: #172554; }
.property-ai-bubble--markdown h1,
.property-ai-bubble--markdown h2,
.property-ai-bubble--markdown h3 { margin: .72rem 0 .36rem; color: #172554; font-family: "Plus Jakarta Sans", sans-serif; font-weight: 800; line-height: 1.35; }
.property-ai-bubble--markdown h1 { font-size: .92rem; }
.property-ai-bubble--markdown h2 { font-size: .86rem; }
.property-ai-bubble--markdown h3 { font-size: .81rem; }
.property-ai-bubble--markdown blockquote { margin: .55rem 0; padding: .15rem 0 .15rem .65rem; border-left: 2px solid var(--brand-gold-surface, #d49520); color: #56627a; }
.property-ai-bubble--markdown code { border-radius: .22rem; background: #f0f2f6; padding: .08rem .24rem; color: #172554; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: .72rem; }
.property-ai-bubble--markdown pre { overflow-x: auto; margin: .55rem 0; border-radius: .4rem; background: #111d3e; padding: .62rem .68rem; color: #eef2ff; }
.property-ai-bubble--markdown pre code { background: transparent; padding: 0; color: inherit; }
.property-ai-bubble--markdown hr { margin: .7rem 0; border: 0; border-top: 1px solid #dfe3eb; }
.property-ai-message-tools { display: flex; min-height: 1.35rem; align-items: center; padding-left: .2rem; }
.property-ai-copy { display: inline-flex; align-items: center; gap: .3rem; color: #56627a; font-size: .61rem; font-weight: 650; }
.property-ai-copy:hover { color: #172554; }
.property-ai-copy svg { width: .75rem; height: .75rem; fill: none; stroke: currentColor; stroke-width: 1.7; }

.property-ai-suggestions { display: grid; margin-top: 1rem; border-top: 1px solid #e2e6ec; }
.property-ai-suggestion { display: flex; align-items: center; justify-content: space-between; gap: .65rem; width: 100%; padding: .7rem .15rem; border-bottom: 1px solid #e2e6ec; background: transparent; color: #263451; text-align: left; font-size: .72rem; font-weight: 650; transition: color .15s ease; }
.property-ai-suggestion:hover { color: var(--brand-gold-text, #d49520); }
.property-ai-suggestion svg { flex: 0 0 auto; width: .85rem; height: .85rem; fill: none; stroke: var(--brand-gold-text, #d49520); stroke-width: 1.8; }

.property-ai-thinking { display: inline-flex; align-items: center; gap: .28rem; padding: .72rem .8rem; border-radius: .55rem .55rem .55rem .12rem; background: #f1f3f6; }
.property-ai-thinking i { width: .36rem; height: .36rem; border-radius: 50%; background: var(--brand-gold-surface, #d49520); animation: property-ai-pulse 1s infinite ease-in-out; }
.property-ai-thinking i:nth-child(2) { animation-delay: .12s; }
.property-ai-thinking i:nth-child(3) { animation-delay: .24s; }
@keyframes property-ai-pulse { 0%, 70%, 100% { opacity: .25; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-2px); } }

.property-ai-error { margin-top: .85rem; padding: .72rem .8rem; border: 1px solid #ecc4c4; border-radius: .55rem; background: #fff5f5; color: #8d2628; font-size: .7rem; line-height: 1.45; }
.property-ai-error button { margin-left: .35rem; font-weight: 800; text-decoration: underline; }

.property-ai-footer { flex: 0 0 auto; padding: .85rem 1.15rem max(.85rem, env(safe-area-inset-bottom)); border-top: 1px solid #dce1ea; background: #fff; }
.property-ai-composer { display: grid; grid-template-columns: minmax(0, 1fr) 2.65rem; align-items: end; gap: .5rem; }
.property-ai-input-wrap { position: relative; }
.property-ai-input { display: block; width: 100%; min-height: 2.65rem; max-height: 8rem; padding: .65rem .72rem; border: 1px solid #cbd3e0; border-radius: .42rem; background: #fff; color: #172554; font-size: .78rem; line-height: 1.45; resize: none; outline: none; }
.property-ai-input:focus { border-color: var(--brand-gold-text, #d49520); box-shadow: 0 0 0 3px rgba(212,149,32,.18); }
.property-ai-send { display: grid; place-items: center; width: 2.65rem; height: 2.65rem; border-radius: .42rem; background: var(--brand-gold-surface, #d49520); color: #fff; transition: background .15s ease; }
.property-ai-send:hover:not(:disabled) { background: var(--brand-gold-surface, #d49520); }
.property-ai-send:disabled { background: #cbd3e0; cursor: not-allowed; }
.property-ai-send svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.property-ai-footer-meta { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .58rem; color: #56627a; font-size: .61rem; line-height: 1.35; }
.property-ai-advisor { flex: 0 0 auto; color: var(--brand-gold-text, #d49520); font-weight: 800; text-decoration: none; white-space: nowrap; }
.property-ai-advisor:hover { color: #172554; }

@media (max-width: 640px) {
    .property-ai-panel { width: 100vw; }
    .property-ai-header { padding: .85rem .9rem; }
    .property-ai-context { padding-inline: .9rem; }
    .property-ai-messages { padding-inline: .9rem; }
    .property-ai-footer { padding-inline: .9rem; }
    .property-ai-bubble-wrap { max-width: 92%; }
}

@media (prefers-reduced-motion: reduce) {
    .property-ai-trigger,
    .property-ai-thinking i { animation: none; transition: none; }
}
