/* Floating Quick Chat launcher and compose flow. Loaded after the shared theme layers. */
:root {
  --quick-chat-accent-color: #4aa7e8;
  --quick-chat-glow-color: #4aa7e8;
}

html body#strongholdApp.login-active #headerChatButton.quick-chat-fab,
html body#strongholdApp.auth-pending #headerChatButton.quick-chat-fab,
html body#strongholdApp #headerChatButton.quick-chat-fab[hidden] {
  display: none !important;
}

html body#strongholdApp:not(.login-active) #headerChatButton.quick-chat-fab {
  position: fixed !important;
  right: 24px !important;
  bottom: max(24px, env(safe-area-inset-bottom)) !important;
  left: auto !important;
  top: auto !important;
  z-index: 2460 !important;
  display: grid !important;
  place-items: center !important;
  width: 60px !important;
  min-width: 60px !important;
  height: 60px !important;
  min-height: 60px !important;
  margin: 0 !important;
  border: 2px solid color-mix(in srgb, var(--quick-chat-accent-color) 76%, #ffffff) !important;
  border-radius: 50% !important;
  padding: 0 !important;
  background: linear-gradient(145deg, #315866 0%, #173743 100%) !important;
  color: #ffffff !important;
  box-shadow: none !important;
  transform: none !important;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease !important;
  isolation: isolate;
}

html body#strongholdApp:not(.login-active) #headerChatButton.quick-chat-fab:hover,
html body#strongholdApp:not(.login-active) #headerChatButton.quick-chat-fab:focus-visible,
html body#strongholdApp:not(.login-active) #headerChatButton.quick-chat-fab.is-open {
  border-color: #ffffff !important;
  background: linear-gradient(145deg, #3b6979 0%, #1d4655 100%) !important;
  box-shadow: none !important;
  transform: translateY(-2px) scale(1.04) !important;
}

html body#strongholdApp:not(.login-active) #headerChatButton.quick-chat-fab.has-alert,
html body#strongholdApp:not(.login-active) #headerChatButton.quick-chat-fab.has-alert:hover,
html body#strongholdApp:not(.login-active) #headerChatButton.quick-chat-fab.has-alert:focus-visible,
html body#strongholdApp:not(.login-active) #headerChatButton.quick-chat-fab.has-alert.is-open {
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--quick-chat-glow-color) 24%, transparent),
    0 0 16px color-mix(in srgb, var(--quick-chat-glow-color) 88%, transparent),
    0 0 34px color-mix(in srgb, var(--quick-chat-glow-color) 58%, transparent) !important;
}

html body#strongholdApp:not(.login-active) #headerChatButton.quick-chat-fab:focus-visible {
  outline: 3px solid #ffffff !important;
  outline-offset: 4px !important;
}

.quick-chat-fab-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
}

html body#strongholdApp:not(.login-active) #headerChatButton.quick-chat-fab .quick-chat-fab-icon svg {
  width: 30px !important;
  height: 30px !important;
  overflow: visible;
  fill: currentColor !important;
  stroke: none !important;
  filter: none !important;
}

html body#strongholdApp:not(.login-active) #headerChatButton.quick-chat-fab.has-alert .quick-chat-fab-icon svg {
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--quick-chat-glow-color) 86%, transparent)) !important;
}

.quick-chat-fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  padding: 0 6px;
  background: #c53c37;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(91, 24, 21, 0.34);
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1;
}

.quick-chat-fab-badge[hidden] {
  display: none !important;
}

html body#strongholdApp:not(.login-active) .chat-launcher-root [data-chat-search-text][hidden] {
  display: none !important;
}

html body#strongholdApp:not(.login-active) .chat-launcher-root {
  top: auto !important;
  right: 24px !important;
  bottom: max(98px, calc(env(safe-area-inset-bottom) + 98px)) !important;
  left: auto !important;
}

html body#strongholdApp:not(.login-active) .chat-launcher-panel {
  max-height: min(680px, calc(100dvh - 126px)) !important;
}

/* Keep all message content inside its bubble, including long links and file names. */
html body#strongholdApp:not(.login-active) .chat-launcher-root .chat-thread-message {
  min-width: 0 !important;
  max-width: min(86%, 340px) !important;
  box-sizing: border-box !important;
}

html body#strongholdApp:not(.login-active) .chat-launcher-root .chat-thread-message-body {
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: visible !important;
}

html body#strongholdApp:not(.login-active) .chat-launcher-root .chat-thread-message-body :is(p, a, span, strong, small, code) {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

html body#strongholdApp:not(.login-active) .chat-launcher-root .chat-thread-message-body p {
  white-space: pre-wrap !important;
}

html body#strongholdApp:not(.login-active) .chat-launcher-root .chat-message-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 3px;
}

html body#strongholdApp:not(.login-active) .chat-launcher-root .chat-read-receipt {
  color: #376d66;
  font-weight: 700;
}

html body#strongholdApp:not(.login-active) .chat-launcher-root .chat-thread-attachment,
html body#strongholdApp:not(.login-active) .chat-launcher-root .comment-attachment {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

html body#strongholdApp:not(.login-active) .chat-launcher-root button.chat-new-message-action {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  min-height: 62px !important;
  margin: 0 0 10px !important;
  border: 1px solid #2d6f80 !important;
  border-radius: 9px !important;
  padding: 9px 11px !important;
  background: linear-gradient(135deg, #2b6879 0%, #173d4a 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 7px 18px rgba(24, 73, 87, 0.22) !important;
  text-align: left !important;
}

html body#strongholdApp:not(.login-active) .chat-launcher-root button.chat-new-message-action:hover,
html body#strongholdApp:not(.login-active) .chat-launcher-root button.chat-new-message-action:focus-visible {
  border-color: #5bb2c7 !important;
  background: linear-gradient(135deg, #347d90 0%, #1c4c5c 100%) !important;
  transform: translateY(-1px) !important;
}

.chat-new-message-action-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #245c6d;
  color: #ffffff;
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1;
}

.chat-new-message-action-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

html body#strongholdApp:not(.login-active) .chat-launcher-root .chat-new-message-action-copy strong {
  color: #ffffff !important;
  font-size: 0.86rem !important;
}

html body#strongholdApp:not(.login-active) .chat-launcher-root .chat-new-message-action-copy small {
  color: #d8ebf0 !important;
  font-size: 0.69rem !important;
  font-weight: 650 !important;
}

.chat-new-message-action-arrow {
  color: #e8f5f7;
  font-size: 1.35rem;
}

.chat-new-message-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 9px;
  color: #647982;
  font-size: 0.72rem;
  font-weight: 700;
}

.chat-new-message-intro button {
  min-height: 32px !important;
  border: 1px solid #bccbd1 !important;
  border-radius: 7px !important;
  padding: 5px 9px !important;
  background: #ffffff !important;
  color: #294b58 !important;
  box-shadow: none !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
}

.chat-assistant-item {
  margin-bottom: 10px !important;
  border: 1px solid #8bbecb !important;
  background:
    radial-gradient(circle at 15% 20%, rgba(92, 183, 212, 0.22), transparent 34%),
    linear-gradient(135deg, #f7fcfd 0%, #e8f4f7 100%) !important;
  box-shadow: 0 6px 16px rgba(24, 87, 105, 0.12) !important;
}

.chat-assistant-item:hover,
.chat-assistant-item:focus-visible {
  border-color: #4e98aa !important;
  background:
    radial-gradient(circle at 15% 20%, rgba(92, 183, 212, 0.3), transparent 36%),
    linear-gradient(135deg, #ffffff 0%, #deeff3 100%) !important;
}

.chat-assistant-avatar {
  border-color: #4d91a3 !important;
  background: linear-gradient(145deg, #2d7182, #173f4d) !important;
  color: #ffffff !important;
  box-shadow:
    0 0 0 3px rgba(74, 167, 232, 0.14),
    0 0 12px rgba(74, 167, 232, 0.42) !important;
  font-size: 1.08rem !important;
}

.todd-avatar {
  display: block;
  box-sizing: border-box;
  object-fit: cover;
  object-position: 50% 24%;
  background: #dcecf3;
}

html body#strongholdApp:not(.login-active) .chat-launcher-root .chat-assistant-avatar.todd-avatar {
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  border: 2px solid #4d91a3 !important;
  border-radius: 50% !important;
  padding: 0 !important;
  background: #dcecf3 !important;
  box-shadow: 0 0 0 3px rgba(74, 167, 232, 0.14), 0 3px 10px rgba(34, 82, 96, 0.2) !important;
}

html body#strongholdApp:not(.login-active) .chat-launcher-root .chat-launcher-head.todd-chat-head {
  grid-template-columns: 36px 42px minmax(0, 1fr) 36px !important;
}

.todd-avatar-head {
  width: 42px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(7, 27, 36, 0.32);
}

.assistant-welcome-mark.todd-avatar-welcome,
.assistant-setup-icon.todd-avatar-welcome {
  width: 64px;
  height: 64px;
  border: 3px solid #ffffff;
  padding: 0;
  background: #dcecf3;
  box-shadow: 0 0 0 3px rgba(74, 167, 232, 0.18), 0 8px 18px rgba(31, 77, 91, 0.24);
}

.assistant-message-identity {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
}

.todd-avatar-message {
  width: 28px;
  height: 28px;
  border: 1px solid #7caab6;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(27, 67, 79, 0.16);
}

.lion-heart-report-head .todd-avatar-report {
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(7, 27, 36, 0.3);
}

.assistant-thread-panel {
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: min(560px, calc(100dvh - 185px)) !important;
  overflow: hidden !important;
}

.assistant-thread-messages {
  gap: 10px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(87, 170, 196, 0.1), transparent 38%),
    #f2f5f6 !important;
}

html body#strongholdApp:not(.login-active) .assistant-thread-message {
  min-width: 0 !important;
  max-width: 88% !important;
  box-sizing: border-box !important;
}

html body#strongholdApp:not(.login-active) .assistant-thread-message.incoming {
  width: 88% !important;
}

.assistant-thread-message .chat-thread-message-body {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

.assistant-thread-message .chat-thread-message-body p {
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
}

.assistant-message-label {
  color: #2b6575;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.assistant-welcome,
.assistant-setup-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: auto 0;
  border: 1px solid #b6ccd3;
  border-radius: 12px;
  padding: 20px 16px;
  background: rgba(255, 255, 255, 0.94);
  color: #294b58;
  box-shadow: 0 10px 24px rgba(24, 65, 78, 0.09);
  text-align: center;
}

.assistant-welcome-mark,
.assistant-setup-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(145deg, #2f788a, #173f4d);
  color: #ffffff;
  box-shadow:
    0 0 0 4px rgba(74, 167, 232, 0.15),
    0 0 17px rgba(74, 167, 232, 0.42);
  font-size: 1.35rem;
}

.assistant-welcome > strong,
.assistant-setup-state > strong {
  font-size: 0.9rem;
  font-weight: 900;
}

.assistant-welcome p,
.assistant-setup-state p {
  max-width: 320px;
  margin: 0;
  color: #607680;
  font-size: 0.73rem;
  line-height: 1.45;
}

.assistant-setup-state > small {
  color: #758891;
  font-size: 0.64rem;
  line-height: 1.35;
}

html body#strongholdApp:not(.login-active) button.assistant-configure-button {
  min-height: 38px !important;
  margin-top: 4px !important;
  border: 1px solid #286c7d !important;
  border-radius: 8px !important;
  padding: 7px 13px !important;
  background: linear-gradient(145deg, #2f788a, #1a4a59) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 14px rgba(24, 78, 94, 0.18) !important;
  font-size: 0.7rem !important;
  font-weight: 850 !important;
}

html body#strongholdApp:not(.login-active) button.assistant-configure-button:hover,
html body#strongholdApp:not(.login-active) button.assistant-configure-button:focus-visible {
  border-color: #62b2c4 !important;
  background: linear-gradient(145deg, #39899c, #205a6b) !important;
}

.assistant-setup-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

html body#strongholdApp:not(.login-active) button.assistant-report-button {
  min-height: 38px !important;
  margin-top: 4px !important;
  border: 1px solid #9cb5be !important;
  border-radius: 8px !important;
  padding: 7px 13px !important;
  background: #ffffff !important;
  color: #315d6b !important;
  box-shadow: none !important;
  font-size: 0.7rem !important;
  font-weight: 850 !important;
}

html body#strongholdApp:not(.login-active) button.assistant-report-button:hover,
html body#strongholdApp:not(.login-active) button.assistant-report-button:focus-visible {
  border-color: #4e98aa !important;
  background: #eef7f9 !important;
}

.assistant-suggestions {
  display: grid;
  gap: 7px;
  width: 100%;
  margin-top: 4px;
}

html body#strongholdApp:not(.login-active) .assistant-suggestions button {
  min-height: 38px !important;
  border: 1px solid #a9c5cd !important;
  border-radius: 8px !important;
  padding: 7px 10px !important;
  background: #f4fafb !important;
  color: #2c6170 !important;
  box-shadow: none !important;
  font-size: 0.69rem !important;
  font-weight: 800 !important;
  text-align: left !important;
}

html body#strongholdApp:not(.login-active) .assistant-suggestions button:hover,
html body#strongholdApp:not(.login-active) .assistant-suggestions button:focus-visible {
  border-color: #4e98aa !important;
  background: #e7f3f6 !important;
}

.assistant-error-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #d9a29e;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff5f4;
  color: #7d3530;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.35;
}

html body#strongholdApp:not(.login-active) .assistant-error-state button {
  flex: 0 0 auto;
  min-height: 30px !important;
  border: 1px solid #c37d77 !important;
  border-radius: 6px !important;
  padding: 5px 8px !important;
  background: #ffffff !important;
  color: #7d3530 !important;
  box-shadow: none !important;
  font-size: 0.64rem !important;
  font-weight: 850 !important;
}

.assistant-thinking {
  color: #57717c !important;
}

.assistant-thinking > span {
  font-size: 0.74rem;
  font-weight: 750;
}

html body#strongholdApp:not(.login-active) button.lion-heart-navigation-action {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  width: 100% !important;
  min-height: 38px !important;
  margin-top: 8px !important;
  border: 1px solid #65a8b8 !important;
  border-radius: 8px !important;
  padding: 7px 10px !important;
  background: linear-gradient(145deg, #eef9fb, #dff0f4) !important;
  color: #214f5d !important;
  box-shadow: 0 4px 12px rgba(35, 99, 115, 0.11) !important;
  font-size: 0.68rem !important;
  font-weight: 850 !important;
  line-height: 1.25 !important;
  text-align: left !important;
}

html body#strongholdApp:not(.login-active) button.lion-heart-navigation-action > span:first-child {
  display: grid;
  flex: 0 0 24px;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #2f788a;
  color: #ffffff;
  font-family: Arial, sans-serif;
  font-size: 0.8rem;
}

html body#strongholdApp:not(.login-active) button.lion-heart-navigation-action:hover,
html body#strongholdApp:not(.login-active) button.lion-heart-navigation-action:focus-visible {
  border-color: #2f788a !important;
  background: linear-gradient(145deg, #e0f3f7, #cde8ee) !important;
}

.lion-heart-action-card {
  display: grid;
  gap: 9px;
  width: 100%;
  min-width: 0;
  margin-top: 9px;
  border: 1px solid #8eb8c3;
  border-radius: 10px;
  padding: 10px;
  background: linear-gradient(155deg, #f8fcfd, #e8f3f6);
  box-shadow: 0 7px 18px rgba(30, 88, 103, 0.12);
  color: #234c59;
}

.lion-heart-action-card.status-succeeded {
  border-color: #7db89b;
  background: linear-gradient(155deg, #f6fcf8, #e5f5eb);
}

.lion-heart-action-card.status-failed {
  border-color: #d29a94;
  background: #fff7f6;
}

.lion-heart-action-card.status-cancelled {
  border-color: #b8c2c7;
  background: #f3f5f6;
  opacity: 0.8;
}

.lion-heart-action-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lion-heart-action-heading > span:last-child {
  display: grid;
  min-width: 0;
}

.lion-heart-action-heading small {
  color: #61808b;
  font-size: 0.56rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lion-heart-action-heading strong {
  color: #204f5d;
  font-size: 0.76rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.lion-heart-action-mark {
  display: grid;
  flex: 0 0 30px;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #2f788a;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(61, 156, 180, 0.32);
}

.lion-heart-action-card > p {
  margin: 0;
  color: #486773;
  font-size: 0.67rem;
  line-height: 1.4;
}

.lion-heart-action-preview {
  display: grid;
  gap: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #c5d7dc;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
}

.lion-heart-action-preview > div {
  display: grid;
  grid-template-columns: minmax(72px, 0.35fr) minmax(0, 1fr);
  gap: 8px;
  padding: 7px 8px;
}

.lion-heart-action-preview > div + div {
  border-top: 1px solid #dce7ea;
}

.lion-heart-action-preview dt,
.lion-heart-action-preview dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.62rem;
  line-height: 1.35;
}

.lion-heart-action-preview dt {
  color: #6a8089;
  font-weight: 850;
}

.lion-heart-action-preview dd {
  color: #294b57;
  font-weight: 700;
  white-space: pre-wrap;
}

.lion-heart-action-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(84px, 0.42fr);
  gap: 7px;
}

html body#strongholdApp:not(.login-active) .lion-heart-action-controls button {
  min-height: 36px !important;
  border-radius: 7px !important;
  padding: 7px 10px !important;
  box-shadow: none !important;
  font-size: 0.65rem !important;
  font-weight: 900 !important;
}

html body#strongholdApp:not(.login-active) button.lion-heart-action-confirm {
  border: 1px solid #246b7c !important;
  background: linear-gradient(145deg, #337f91, #215b6b) !important;
  color: #ffffff !important;
}

html body#strongholdApp:not(.login-active) button.lion-heart-action-cancel {
  border: 1px solid #aebec4 !important;
  background: #ffffff !important;
  color: #5c7079 !important;
}

.lion-heart-action-result,
.lion-heart-action-working,
.lion-heart-action-error {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  border-radius: 7px;
  padding: 8px;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1.35;
}

.lion-heart-action-result {
  background: #e1f3e8;
  color: #286342;
}

.lion-heart-action-working {
  background: #e9f3f6;
  color: #315f6c;
}

.lion-heart-action-error {
  background: #fde9e7;
  color: #873d37;
}

.lion-heart-action-working > span {
  width: 12px;
  height: 12px;
  margin-top: 1px;
  border: 2px solid rgba(47, 120, 138, 0.25);
  border-top-color: #2f788a;
  border-radius: 50%;
  animation: lion-heart-report-spin 0.8s linear infinite;
}

.assistant-live-context {
  display: grid;
  grid-template-columns: 8px auto minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  min-width: 0;
  border: 1px solid #c6d9df;
  border-radius: 7px;
  padding: 6px 8px;
  background: #eff6f8;
  color: #526f79;
}

.assistant-live-context > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #24a266;
  box-shadow: 0 0 0 3px rgba(36, 162, 102, 0.12);
}

.assistant-live-context small {
  color: #70858d;
  font-size: 0.57rem;
  font-weight: 750;
  white-space: nowrap;
}

.assistant-live-context strong {
  min-width: 0;
  overflow: hidden;
  color: #2d5f6d !important;
  font-size: 0.62rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-thread-footer {
  display: grid;
  justify-items: center;
  gap: 5px;
  border-top: 1px solid #d7e0e4;
  padding: 10px 12px;
  background: #ffffff;
  color: #6c7e86;
  text-align: center;
}

.assistant-thread-footer small,
.assistant-disclaimer {
  color: #788991 !important;
  font-size: 0.6rem !important;
  line-height: 1.35 !important;
}

html body#strongholdApp:not(.login-active) button.assistant-clear-button {
  min-height: 34px !important;
  border: 0 !important;
  padding: 4px 2px !important;
  background: transparent !important;
  background-image: none !important;
  color: #657b85 !important;
  box-shadow: none !important;
  font-size: 0.64rem !important;
  font-weight: 800 !important;
}

.assistant-secondary-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

html body#strongholdApp:not(.login-active) button.assistant-clear-button:hover:not(:disabled),
html body#strongholdApp:not(.login-active) button.assistant-clear-button:focus-visible:not(:disabled) {
  color: #8a3934 !important;
  text-decoration: underline;
}

html body#strongholdApp:not(.login-active) .assistant-thread-compose button:disabled,
html body#strongholdApp:not(.login-active) .assistant-thread-compose textarea:disabled {
  cursor: not-allowed !important;
  opacity: 0.58 !important;
}

dialog.lion-heart-report-dialog {
  width: min(1040px, calc(100vw - 32px));
  max-width: none;
  height: min(850px, calc(100dvh - 32px));
  max-height: none;
  margin: auto;
  overflow: hidden;
  border: 1px solid #8097a1;
  border-radius: 14px;
  padding: 0;
  background: #f4f7f8;
  color: #18313e;
  box-shadow: 0 34px 90px rgba(8, 28, 38, 0.4);
}

dialog.lion-heart-report-dialog::backdrop {
  background: rgba(9, 25, 33, 0.66);
  backdrop-filter: blur(3px);
}

.lion-heart-report-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}

.lion-heart-report-head {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #173f4d, #2c6e7e);
  color: #ffffff;
}

.lion-heart-report-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 16px rgba(86, 197, 226, 0.46);
  font-size: 1.25rem;
}

.lion-heart-report-head > span:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.lion-heart-report-head strong {
  color: #ffffff !important;
  font-size: 1.05rem;
  font-weight: 900;
}

.lion-heart-report-head small {
  color: #d7e9ee !important;
  font-size: 0.72rem;
  line-height: 1.3;
}

html body#strongholdApp button[data-close-lion-heart-report] {
  display: grid !important;
  place-items: center !important;
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 8px !important;
  padding: 0 !important;
  background: rgba(255, 255, 255, 0.08) !important;
  background-image: none !important;
  color: #ffffff !important;
  box-shadow: none !important;
  font-family: Arial, sans-serif !important;
  font-size: 1.45rem !important;
}

.lion-heart-report-filters {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  border-bottom: 1px solid #cbd8dd;
  padding: 9px 14px;
  background: #ffffff;
}

html body#strongholdApp .lion-heart-report-filters button {
  min-height: 34px !important;
  border: 1px solid #b7c7cd !important;
  border-radius: 999px !important;
  padding: 6px 12px !important;
  background: #f5f8f9 !important;
  background-image: none !important;
  color: #4e6671 !important;
  box-shadow: none !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  white-space: nowrap;
}

html body#strongholdApp .lion-heart-report-filters button.active {
  border-color: #2c7587 !important;
  background: #2c7587 !important;
  color: #ffffff !important;
}

.lion-heart-report-body {
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
}

.lion-heart-report-loading,
.lion-heart-report-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 300px;
  align-content: center;
  border: 1px dashed #b8c9d0;
  border-radius: 12px;
  padding: 24px;
  background: #ffffff;
  color: #536b76;
  text-align: center;
}

.lion-heart-report-empty > span {
  color: #2c7587;
  font-size: 2rem;
}

.lion-heart-report-empty strong,
.lion-heart-report-loading strong {
  color: #254856;
  font-size: 0.92rem;
  font-weight: 900;
}

.lion-heart-report-empty p,
.lion-heart-report-loading small {
  max-width: 460px;
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.45;
}

.lion-heart-report-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #c9d9de;
  border-top-color: #2c7587;
  border-radius: 50%;
  animation: lion-heart-report-spin 800ms linear infinite;
}

@keyframes lion-heart-report-spin {
  to { transform: rotate(360deg); }
}

.lion-heart-report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.lion-heart-report-summary article {
  display: grid;
  gap: 4px;
  border: 1px solid #bfd0d6;
  border-radius: 10px;
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 5px 14px rgba(20, 59, 73, 0.07);
}

.lion-heart-report-summary strong {
  color: #1d596a;
  font-size: 1.45rem;
  font-weight: 950;
}

.lion-heart-report-summary span {
  color: #657b85;
  font-size: 0.68rem;
  font-weight: 800;
}

.lion-heart-topic-section,
.lion-heart-pattern-section {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.lion-heart-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.lion-heart-section-heading strong {
  color: #213f4d;
  font-size: 0.86rem;
  font-weight: 900;
}

.lion-heart-section-heading small {
  color: #70838c;
  font-size: 0.65rem;
  font-weight: 750;
}

.lion-heart-topic-list {
  display: grid;
  gap: 7px;
  border: 1px solid #c5d3d9;
  border-radius: 10px;
  padding: 12px;
  background: #ffffff;
}

.lion-heart-topic-row {
  display: grid;
  grid-template-columns: minmax(130px, 220px) minmax(100px, 1fr) 34px;
  align-items: center;
  gap: 10px;
  color: #405d69;
  font-size: 0.68rem;
  font-weight: 800;
}

.lion-heart-topic-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5ecef;
}

.lion-heart-topic-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2d788a, #5eb1c2);
}

.lion-heart-topic-row > strong {
  color: #1f5969;
  text-align: right;
}

.lion-heart-pattern-list {
  display: grid;
  gap: 10px;
}

.lion-heart-pattern-card {
  display: grid;
  gap: 11px;
  border: 1px solid #c4d2d8;
  border-left: 5px solid #81969f;
  border-radius: 10px;
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 5px 15px rgba(20, 59, 73, 0.06);
}

.lion-heart-pattern-card.priority-high {
  border-left-color: #c44c43;
}

.lion-heart-pattern-card.priority-medium {
  border-left-color: #d18b2b;
}

.lion-heart-pattern-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.lion-heart-pattern-card > header > span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.lion-heart-pattern-card header small {
  color: #71858e;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: capitalize;
}

.lion-heart-pattern-card header strong {
  color: #223f4c;
  font-size: 0.84rem;
  line-height: 1.3;
}

.lion-heart-priority {
  flex: 0 0 auto;
  border: 1px solid #b8c6cc;
  border-radius: 999px;
  padding: 4px 8px;
  background: #f1f5f6;
  color: #536872;
  font-size: 0.61rem;
  font-weight: 900;
}

.priority-high .lion-heart-priority {
  border-color: #dda6a1;
  background: #fff1ef;
  color: #9a3c35;
}

.priority-medium .lion-heart-priority {
  border-color: #e6c594;
  background: #fff8eb;
  color: #94611c;
}

.lion-heart-pattern-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lion-heart-pattern-metrics span {
  border-radius: 7px;
  padding: 6px 8px;
  background: #edf3f5;
  color: #5c717b;
  font-size: 0.63rem;
  font-weight: 750;
}

.lion-heart-pattern-metrics strong {
  color: #295d6c;
}

.lion-heart-design-suggestion {
  border: 1px solid #b9d4dc;
  border-radius: 8px;
  padding: 10px 11px;
  background: #eff8fa;
}

.lion-heart-design-suggestion small,
.lion-heart-pattern-card footer small {
  display: block;
  margin-bottom: 3px;
  color: #3a7282;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lion-heart-design-suggestion p {
  margin: 0;
  color: #34515d;
  font-size: 0.7rem;
  line-height: 1.45;
}

.lion-heart-pattern-card details {
  color: #5b707a;
  font-size: 0.67rem;
}

.lion-heart-pattern-card summary {
  cursor: pointer;
  color: #3e6a78;
  font-weight: 850;
}

.lion-heart-pattern-card ul {
  display: grid;
  gap: 5px;
  margin: 8px 0 0;
  padding-left: 20px;
}

.lion-heart-question-list {
  display: grid;
  gap: 8px;
}

.lion-heart-question-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(18, 68, 79, 0.16);
  border-radius: 10px;
  background: #fff;
}

.lion-heart-question-entry span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.lion-heart-question-entry small {
  color: #60747a;
}

@media (max-width: 600px) {
  .lion-heart-question-entry {
    align-items: stretch;
    flex-direction: column;
  }
}

.lion-heart-pattern-card > footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  border-top: 1px solid #e0e7ea;
  padding-top: 9px;
  color: #667b84;
  font-size: 0.63rem;
  line-height: 1.4;
}

.lion-heart-report-methodology {
  margin: 14px 2px 2px;
  color: #74868e;
  font-size: 0.61rem;
  line-height: 1.45;
}

@media (max-width: 640px) {
  html body#strongholdApp:not(.login-active) #headerChatButton.quick-chat-fab {
    right: 16px !important;
    bottom: max(16px, env(safe-area-inset-bottom)) !important;
    width: 56px !important;
    min-width: 56px !important;
    height: 56px !important;
    min-height: 56px !important;
  }

  html body#strongholdApp:not(.login-active) .chat-launcher-root {
    top: max(6px, env(safe-area-inset-top)) !important;
    right: 6px !important;
    bottom: max(6px, env(safe-area-inset-bottom)) !important;
    left: 6px !important;
    height: auto !important;
    max-height: none !important;
  }

  html body#strongholdApp:not(.login-active) .chat-launcher-panel {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    border-radius: 10px !important;
    overscroll-behavior: contain;
  }

  html body#strongholdApp:not(.login-active) .chat-launcher-head,
  html body#strongholdApp:not(.login-active) .chat-launcher-head.todd-chat-head {
    position: relative !important;
    z-index: 2 !important;
    flex: 0 0 auto !important;
    min-height: 64px !important;
    padding-top: 10px !important;
  }

  html body#strongholdApp:not(.login-active) .chat-launcher-root button.chat-head-back,
  html body#strongholdApp:not(.login-active) .chat-launcher-root button.chat-launcher-close {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    touch-action: manipulation;
  }

  .assistant-thread-panel {
    min-height: 0 !important;
    height: 100% !important;
  }

  html body#strongholdApp:not(.login-active) .assistant-thread-message {
    max-width: 90% !important;
  }

  html body#strongholdApp:not(.login-active) .chat-launcher-root .chat-thread-message {
    max-width: 90% !important;
  }

  .assistant-welcome,
  .assistant-setup-state {
    padding: 16px 12px;
  }

  .lion-heart-action-preview > div {
    grid-template-columns: minmax(66px, 0.3fr) minmax(0, 1fr);
    gap: 6px;
  }

  .lion-heart-action-controls {
    grid-template-columns: minmax(0, 1fr) 78px;
  }

  dialog.lion-heart-report-dialog {
    width: calc(100vw - 12px);
    height: calc(100dvh - 12px);
    border-radius: 10px;
  }

  .lion-heart-report-head {
    grid-template-columns: 42px minmax(0, 1fr) 36px;
    gap: 9px;
    min-height: 72px;
    padding: 10px;
  }

  .lion-heart-report-mark {
    width: 40px;
    height: 40px;
  }

  .lion-heart-report-head strong {
    font-size: 0.86rem;
  }

  .lion-heart-report-head small {
    font-size: 0.62rem;
  }

  .lion-heart-report-body {
    padding: 10px;
  }

  .lion-heart-report-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lion-heart-topic-row {
    grid-template-columns: minmax(100px, 145px) minmax(70px, 1fr) 28px;
    gap: 7px;
  }

  .lion-heart-pattern-card {
    padding: 11px;
  }

  .lion-heart-pattern-card > footer {
    grid-template-columns: 1fr;
  }

  .assistant-secondary-actions {
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body#strongholdApp:not(.login-active) #headerChatButton.quick-chat-fab {
    transition: none !important;
  }

  .lion-heart-report-spinner,
  .lion-heart-action-working > span {
    animation: none;
  }
}
