.umkm-chat { position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 10000; font-family: system-ui, sans-serif; color: #10213a; font-size: 14px; line-height: 1.5; }
.umkm-chat *, .umkm-chat *::before, .umkm-chat *::after { box-sizing: border-box; }
.umkm-chat [hidden] { display: none !important; }
.umkm-chat button, .umkm-chat input { font: inherit; }
.umkm-chat button { cursor: pointer; }
.umkm-chat button:focus-visible, .umkm-chat input:focus-visible, .umkm-chat a:focus-visible { outline: 3px solid #00c6d7; outline-offset: 3px; }
.umkm-chat-toggle { display: flex; align-items: center; gap: 10px; padding: 15px 20px; border: 0; border-radius: 40px; background: linear-gradient(135deg,#0757c8,#0877ed); color: #fff; box-shadow: 0 8px 28px #061a3a40; font-weight: 700; }
.umkm-chat-panel { display: flex; flex-direction: column; position: absolute; bottom: 72px; right: 0; width: min(390px, calc(100vw - 32px)); height: min(580px, calc(100dvh - 120px)); min-height: 280px; background: #fff; border: 1px solid #dce4ee; border-radius: 22px; box-shadow: 0 18px 60px #061a3a40; overflow: hidden; }
.umkm-chat-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px; background: #061a3a; color: #fff; flex-shrink: 0; }
.umkm-chat-header strong { font-size: 16px; }
.umkm-chat-header small { display: block; color: #c5d8ee; font-size: 12px; margin-top: 3px; }
.umkm-chat-close { border: 0; background: transparent; color: #fff; font-size: 28px !important; padding: 0 8px; }
.umkm-chat-messages { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px; background: #f7f9fc; }
.umkm-chat-message { padding: 12px 14px; border-radius: 15px; margin-bottom: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.umkm-chat-assistant { background: #fff; border: 1px solid #dce4ee; margin-right: 16px; }
.umkm-chat-user { background: #0757c8; color: #fff; margin-left: 28px; }
.umkm-chat-prompts { display: flex; gap: 8px; padding: 10px 14px; }
.umkm-chat-prompts button, .umkm-chat-retry { border: 1px solid #dce4ee; border-radius: 18px; background: #edf5ff; color: #0757c8; padding: 7px 10px; font-size: 12px; }
.umkm-chat-retry { display: block; margin-top: 10px; }
.umkm-chat-notice { font-size: 10px; color: #65758b; padding: 0 16px; margin: 8px 0; }
.umkm-chat-form { display: flex; gap: 8px; padding: 10px 14px; }
.umkm-chat-form input { min-width: 0; flex: 1; border: 1px solid #dce4ee; border-radius: 12px; padding: 11px; font-size: 16px; background: #fff; color: #10213a; }
.umkm-chat-form button { border: 0; border-radius: 12px; background: #0757c8; color: #fff; padding: 10px 14px; }
.umkm-chat button:disabled { opacity: .55; cursor: wait; }
.umkm-chat-contact { display: block; text-align: center; color: #0757c8; font-size: 12px; padding: 0 10px 12px; text-decoration: none; }
.umkm-chat-sources { border-top: 1px solid #dce4ee; margin-top: 12px; padding-top: 8px; white-space: normal; }
.umkm-chat-sources a { display: block; color: #0757c8; margin-top: 5px; font-size: 12px; }
.umkm-chat-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 480px) { .umkm-chat { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); } .umkm-chat-toggle { padding: 12px 16px; } }
/* V1.1: the entire content area scrolls, leaving compose controls reachable. */
.umkm-chat-panel { height: min(720px, calc(100dvh - 110px)); min-height: 0; }
.umkm-chat-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.umkm-chat-messages { overflow: visible; }
.umkm-chat-prompts { flex-wrap: wrap; }
.umkm-chat-interview, .umkm-chat-resume, .umkm-chat-utilities { padding: 8px 14px; }
.umkm-chat-interview button, .umkm-chat-resume button, .umkm-chat-utilities button { border: 1px solid #dce4ee; border-radius: 12px; background: #edf5ff; color: #0757c8; padding: 9px 11px; min-height: 40px; }
.umkm-chat-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.umkm-chat-progress { margin: 4px 0; }
.umkm-chat progress { width: 100%; accent-color: #0757c8; }
.umkm-chat-edit-label { display: block; font-size: 12px; }
.umkm-chat select { display: block; max-width: 100%; width: 100%; margin: 5px 0; padding: 8px; border: 1px solid #dce4ee; border-radius: 8px; font: inherit; background: white; color: #10213a; }
.umkm-chat-catalog { margin-top: 10px; }
.umkm-chat summary { cursor: pointer; padding: 6px 0; }
.umkm-chat-status { margin: 0; padding: 0 14px; font-size: 12px; min-height: 18px; }
.umkm-chat-form textarea { font: inherit; font-size: 16px; flex: 1; min-width: 0; resize: none; border: 1px solid #dce4ee; border-radius: 12px; padding: 10px; color: #10213a; background: #fff; }
.umkm-chat-form textarea:focus-visible, .umkm-chat select:focus-visible, .umkm-chat summary:focus-visible { outline: 3px solid #00c6d7; outline-offset: 2px; }
.umkm-chat-ask { font-size: 12px; padding: 0 14px 8px; }
.umkm-chat-ask input { margin-right: 7px; }
@media (max-width: 480px) {
  .umkm-chat-panel { width: calc(100vw - 24px); right: -4px; bottom: 62px; height: min(720px, calc(100dvh - 95px)); }
  .umkm-chat-header { padding: 12px; }
  .umkm-chat-header strong { font-size: 15px; }
  .umkm-chat-messages { padding: 12px; }
  .umkm-chat-prompts { gap: 6px; }
}
@media (max-height: 500px) { .umkm-chat-panel { position: fixed; inset: 6px; width: auto; height: calc(100dvh - 12px); } }

.umkm-chat .umkm-chat-panel { padding: 0; margin: 0; text-align: left; }
.umkm-chat .umkm-chat-interview { flex-shrink: 0; max-height: 175px; overflow-y: auto; border-top: 1px solid #dce4ee; background: #fff; }
.umkm-chat .umkm-chat-header { position: static; min-height: 0; }
.umkm-chat .umkm-chat-edit-details summary { padding: 3px 0; font-size: 12px; }
.umkm-chat .umkm-chat-actions { margin: 4px 0; }
.umkm-chat .umkm-chat-actions button { padding: 6px 9px; min-height: 36px; font-size: 12px; }
@media (max-height:500px) { .umkm-chat .umkm-chat-interview { max-height: 100px; } }
.umkm-chat .umkm-chat-status:empty { display: none; }
@media (max-height:500px) {
  .umkm-chat .umkm-chat-header { padding: 6px 12px; }
  .umkm-chat .umkm-chat-header small { display: none; }
  .umkm-chat .umkm-chat-header strong { font-size: 14px; }
  .umkm-chat .umkm-chat-interview { max-height: 80px; padding: 4px 10px; }
  .umkm-chat .umkm-chat-progress { font-size: 10px; margin: 0; }
  .umkm-chat .umkm-chat-actions button { min-height: 26px; padding: 3px 8px; }
  .umkm-chat .umkm-chat-form { padding: 4px 10px; }
  .umkm-chat .umkm-chat-form textarea { height: 42px; padding: 6px; }
  .umkm-chat .umkm-chat-contact { padding: 0 10px 3px; font-size: 10px; }
  .umkm-chat .umkm-chat-ask { padding: 0 10px 3px; font-size: 10px; }
}

/* Interview controls scroll with the conversation, keeping the composer reachable. */
.umkm-chat .umkm-chat-scroll > .umkm-chat-interview { max-height: none; overflow: visible; }
.umkm-chat .umkm-chat-form textarea { height: 64px; }
