/* Shared assistant shell on every CHIVI product. */
#chat.assistant-dialog{background:var(--paper,#fffdf8);color:var(--ink,#163b43);border:1px solid #d8e4dd;display:none;padding:0;overflow:hidden;box-shadow:0 18px 65px #082e4b35;font-family:inherit}#chat.assistant-dialog[open]{display:flex;flex-direction:column}#chat::backdrop{background:#082e4b66}#chat .chat-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 20px;border-bottom:1px solid #d8e4dd;flex:none}#chat .chat-head h2{margin:0;font-size:21px}#chat .chat-head small{font-size:13px}#chat .chat-body{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}#chat button{cursor:pointer}#chat .integral-options{display:flex;gap:8px;flex-wrap:wrap}#chat [data-integral-question],#chat [data-integral-product]{padding:10px 14px;border:1px solid #ccdcd5;background:#f2f7f0;border-radius:18px;color:inherit;min-height:44px;font:inherit;font-size:14px;margin:3px 3px 3px 0}#chat .user-question{margin:14px 0 14px auto;padding:10px 14px;background:#e7f0e9;border-radius:16px;max-width:90%;width:fit-content}#chat .integral-history{white-space:pre-line}#chat .integral-product{display:flex;gap:12px;padding:14px 0;border-bottom:1px solid #d8e4dd}#chat .integral-product img{width:80px;height:80px;object-fit:contain;border-radius:10px}#chat .integral-product p{margin:5px 0}#chat .integral-wait{color:#476f61;font-size:14px}#chat .chivi-chat-answer{overflow-wrap:anywhere}#chat a{color:#246d5c}#chatForm{flex:none}#chat [hidden]{display:none!important}
/* Publishing is a tool inside the same conversation. */
#chat #classified-conversation{position:static;inset:auto;width:100%;max-width:none;height:auto;max-height:none;transform:none;border:0;box-shadow:none;padding:0;margin:16px 0;background:transparent;overflow:visible}#chat #classified-conversation .cc-head{position:static;border-radius:12px;background:#eef4eb;padding:12px;min-height:0}#chat #classified-conversation .cc-head strong{font-size:16px}#chat #classified-conversation .cc-timeline{padding:12px 0;overflow:visible;max-height:none}#chat #classified-conversation .cc-composer{position:sticky;bottom:-20px;background:var(--paper,#fffdf8);padding:10px 0}#chat #classified-conversation .cc-reassure{font-size:12px}#chat #classified-conversation .cc-preview{max-width:100%}#chat #classified-conversation .cc-quick{padding:8px 0}#chat #classified-conversation .cc-draft{padding:10px 0}

/* Keep each new answer at the reading edge while cards and images settle. */
#chat .chat-body{overflow-anchor:none;scroll-behavior:auto}
#chat .chivi-chat-answer{box-sizing:border-box;display:flow-root}

/* Separate previous step and close actions, with touch-sized targets. */
#chat .chat-head{gap:8px;position:relative}
#chat .chat-head>div{min-width:0;flex:1}
#chat .chat-head>button.integral-back,#chat .chat-head>button.integral-close{position:static!important;order:0!important;transform:none!important;display:flex!important;align-items:center;justify-content:center;gap:5px;flex:none;min-width:44px;min-height:44px;width:auto;height:44px;padding:8px;border:0;border-radius:14px;background:transparent;color:inherit;box-shadow:none;font:inherit;font-size:13px}
#chat .chat-head>button.integral-close{font-size:28px;margin-left:auto}
#chat .integral-back>span:first-child{font-size:24px}
#chat .chat-head>button:focus-visible{outline:2px solid currentColor;outline-offset:2px}
#chat .integral-recovery{margin:18px 0 0;padding-top:12px;border-top:1px solid #94aaa833}
#chat .integral-recovery>p{font-size:14px;margin:0 0 8px}
#chat [data-integral-home]{min-height:44px;padding:10px 14px;border:1px solid currentColor;border-radius:18px;background:transparent;color:inherit;font:inherit;font-size:14px}
@media(max-width:400px){#chat .chat-head{padding:12px}#chat .chat-head small{font-size:11px}#chat .chat-head h2{font-size:19px}}
body dialog#chat .chat-head.modal-city-header.section-graphic-header{padding:14px 16px!important;justify-content:space-between!important;align-items:center!important;gap:8px!important;min-height:88px!important}
body dialog#chat .chat-head>div{width:auto!important;flex:1}
body dialog#chat .chat-head>.section-topic-art{display:none!important}
body dialog#chat .chat-head>button.integral-back,body dialog#chat .chat-head>button.integral-close{color:var(--ink,#163b43)!important;background:transparent!important;border:0!important;z-index:2}
html[data-theme=dark] #chat .integral-recovery button{background:var(--soft)!important;color:var(--ink)!important;border-color:var(--line)!important}

/* One compact header for every assistant context and publishing flow. */
body dialog#chat.assistant-dialog .chat-head{
 box-sizing:border-box;position:relative;isolation:isolate;display:flex;align-items:center!important;
 gap:8px!important;min-height:80px!important;padding:12px 14px!important;
 background:var(--paper,#fffdf8)!important;background-image:none!important;color:var(--ink,#163b43)!important;
 border:0;border-bottom:1px solid var(--line,#d8e4dd)!important;border-radius:0!important;overflow:visible;flex:none;
}
body dialog#chat.assistant-dialog .chat-head::before,body dialog#chat.assistant-dialog .chat-head::after{display:none!important}
body dialog#chat.assistant-dialog .chat-head>div{flex:1;min-width:0;width:auto!important;padding:0!important;margin:0!important;text-align:left}
body dialog#chat.assistant-dialog .chat-head h2#assistant-title{font-family:inherit;font-size:19px!important;font-weight:700;line-height:1.25!important;letter-spacing:-.025em;margin:0 0 4px!important;color:inherit!important;overflow-wrap:normal;text-wrap:balance}
body dialog#chat.assistant-dialog .chat-head small{display:block;font-size:12px!important;font-weight:400;line-height:1.4!important;letter-spacing:0;margin:0!important;color:var(--muted,#597174)!important}
body dialog#chat.assistant-dialog .chat-head>button.integral-back,body dialog#chat.assistant-dialog .chat-head>button.integral-close{box-sizing:border-box;width:44px;min-width:44px;height:44px;min-height:44px;margin:0!important;padding:10px!important;display:flex!important;align-items:center;justify-content:center;border:1px solid var(--line,#d8e4dd)!important;border-radius:50%;background:transparent!important;color:var(--ink,#163b43)!important;flex:none}
body dialog#chat.assistant-dialog .chat-head>button:hover{background:var(--soft,#eef4ef)!important}
body dialog#chat.assistant-dialog .chat-head>button:focus-visible{outline:2px solid var(--ink,#163b43);outline-offset:3px}
body dialog#chat.assistant-dialog .chat-head>.section-topic-art,body dialog#chat.assistant-dialog .chat-head>.section-back-arrow,body dialog#chat.assistant-dialog #classified-conversation .cc-head{display:none!important}
@media(max-width:400px){body dialog#chat.assistant-dialog .chat-head{padding:10px!important;gap:6px!important;min-height:76px!important}body dialog#chat.assistant-dialog .chat-head h2#assistant-title{font-size:17px!important}body dialog#chat.assistant-dialog .chat-head small{font-size:11px!important}}
@media(max-height:480px){body dialog#chat.assistant-dialog .chat-head{min-height:64px!important;padding-block:8px!important}body dialog#chat.assistant-dialog .chat-head small{display:none}}
