.hidden { display: none !important; }
.ea-fab { position: fixed; right: 1rem; bottom: 1rem; z-index: 50; background: var(--accent, #1b5e9b); color: #fff; border: 0; border-radius: 999px; padding: .8rem 1.2rem; font: 600 1rem/1 system-ui, sans-serif; box-shadow: 0 4px 14px rgba(0,0,0,.28); cursor: pointer; }
.ea-fab:focus-visible, .ea-send:focus-visible, .ea-x:focus-visible, .ea-link:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; }
.ea-panel { position: fixed; right: 1rem; bottom: 1rem; z-index: 50; width: min(24rem, calc(100vw - 2rem)); max-height: min(36rem, calc(100vh - 2rem)); display: flex; flex-direction: column; background: var(--paper, #fff); color: var(--ink, #1c2430); border: 1px solid var(--line, #c9d1dc); border-radius: 14px; box-shadow: 0 10px 34px rgba(0,0,0,.32); overflow: hidden; font: 400 .95rem/1.45 system-ui, sans-serif; }
.ea-head { display: flex; justify-content: space-between; align-items: center; padding: .7rem .9rem; background: var(--accent, #1b5e9b); color: #fff; }
.ea-x { background: transparent; border: 0; color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0 .3rem; }
.ea-note { margin: 0; padding: .55rem .9rem; font-size: .8rem; color: var(--muted, #55606f); border-bottom: 1px solid var(--line, #c9d1dc); }
.ea-log { flex: 1; min-height: 8rem; overflow-y: auto; padding: .7rem .9rem; display: flex; flex-direction: column; gap: .5rem; }
.ea-msg { max-width: 92%; padding: .55rem .75rem; border-radius: 12px; overflow-wrap: anywhere; }
.ea-msg p { margin: 0 0 .4rem; } .ea-msg p:last-child { margin: 0; }
.ea-msg ul { margin: .2rem 0 0; padding-left: 1.1rem; }
.ea-msg.bot { align-self: flex-start; background: var(--soft, #eef2f7); }
.ea-msg.user { align-self: flex-end; background: var(--accent, #1b5e9b); color: #fff; white-space: pre-wrap; }
.ea-wait { opacity: .7; font-style: italic; }
.ea-form, .ea-contact { display: flex; gap: .5rem; padding: .6rem .9rem; border-top: 1px solid var(--line, #c9d1dc); }
.ea-contact { flex-direction: column; overflow-y: auto; border-top: 0; }
.ea-input, .ea-contact input, .ea-contact textarea { flex: 1; font: inherit; color: inherit; background: var(--paper, #fff); border: 1px solid var(--line, #8793a3); border-radius: 8px; padding: .5rem .6rem; resize: none; }
.ea-send { background: var(--accent, #1b5e9b); color: #fff; border: 0; border-radius: 8px; padding: .5rem .9rem; font: 600 .95rem system-ui, sans-serif; cursor: pointer; }
.ea-send:disabled { opacity: .5; cursor: default; }
.ea-link { background: none; border: 0; border-top: 1px solid var(--line, #c9d1dc); color: var(--accent, #1b5e9b); padding: .55rem .9rem; font: .85rem system-ui, sans-serif; text-align: left; cursor: pointer; text-decoration: underline; }
@media (prefers-color-scheme: dark) {
  .ea-panel { --paper: #171c24; --ink: #e8edf4; --line: #36404f; --muted: #a2adbc; --soft: #232b37; }
  .ea-msg.bot { background: #232b37; }
}
