/* Writing Studio interaction recovery.
 * Decorative layers must never intercept mouse, touch, or keyboard activation.
 */
.writing-route-entry,
.writing-emotional-shell,
.writing-emotional-entry,
.writing-emotional-options {
  position: relative !important;
  isolation: isolate;
  pointer-events: auto !important;
}

.writing-route-entry,
.writing-emotional-entry {
  z-index: 50 !important;
}

.writing-route-entry::before,
.writing-route-entry::after,
.writing-emotional-shell::before,
.writing-emotional-shell::after,
.writing-emotional-entry::before,
.writing-emotional-entry::after,
.writing-emotional-options::before,
.writing-emotional-options::after {
  pointer-events: none !important;
}

.writing-route-entry .writing-emotional-options {
  z-index: 60 !important;
}

.writing-route-entry .writing-emotional-option,
.writing-emotional-entry .writing-emotional-option {
  position: relative !important;
  z-index: 70 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  touch-action: manipulation;
  user-select: none;
}

.writing-route-entry .writing-emotional-option::before,
.writing-route-entry .writing-emotional-option::after,
.writing-emotional-entry .writing-emotional-option::before,
.writing-emotional-entry .writing-emotional-option::after,
.writing-route-entry .writing-emotional-option > *,
.writing-emotional-entry .writing-emotional-option > * {
  pointer-events: none !important;
}

.writing-route-entry .assessment-flow-toolbar,
.writing-emotional-shell .assessment-flow-toolbar,
.writing-route-entry .assessment-flow-toolbar button,
.writing-emotional-shell .assessment-flow-toolbar button {
  position: relative !important;
  z-index: 80 !important;
  pointer-events: auto !important;
}

.writing-route-entry button:focus-visible,
.writing-emotional-shell button:focus-visible {
  outline: 3px solid var(--discovery-focus, #7f6cf2) !important;
  outline-offset: 3px;
}

/* Last-resort guard against full-page decorative overlays inside the writing route. */
.writing-route-entry [aria-hidden="true"],
.writing-emotional-shell [aria-hidden="true"] {
  pointer-events: none !important;
}
