.ml-maker-chrome {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  pointer-events: none;
  isolation: isolate;
}

.ml-maker-toggle {
  position: fixed;
  z-index: 3;
  left: 12px;
  bottom: 12px;
  pointer-events: auto;
  font:
    600 11px/1.2 system-ui,
    -apple-system,
    sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 14px;
  border-radius: 4px;
  border: 1px solid rgba(15, 23, 42, 0.35);
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.ml-maker-toggle[aria-pressed='true'] {
  background: #0f172a;
  color: #50d9d1;
  border-color: #0f172a;
}

.ml-maker-layer-on [data-ml-block] {
  outline: 1px dashed rgba(80, 217, 209, 0.9);
  outline-offset: 2px;
}

.ml-maker-hover-target {
  outline: 2px solid #50d9d1 !important;
  outline-offset: 2px;
}

.ml-maker-locked {
  outline: 2px solid #0f172a !important;
  outline-offset: 2px;
}

/*
 * Visual/video wrappers: inset ::after ring above backgrounds and fades.
 * Standalone <img> blocks use outline (inset box-shadow was invisible on the
 * playbook screenshot with drop-shadow filter).
 */
.ml-maker-layer-on [data-ml-block][data-ml-kind='visual'],
.ml-maker-layer-on [data-ml-block][data-ml-kind='video'] {
  outline: none !important;
  position: relative;
  z-index: 2;
}

.ml-maker-layer-on [data-ml-block][data-ml-kind='visual']::after,
.ml-maker-layer-on [data-ml-block][data-ml-kind='video']::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  border: 2px dashed rgba(255, 159, 64, 0.95);
  border-radius: 2px;
}

.ml-maker-layer-on [data-ml-block][data-ml-kind='video']::after {
  border-color: rgba(167, 139, 250, 0.95);
}

/* <img> blocks (e.g. playbook screenshot): outline, not inset box-shadow or ::after */
.ml-maker-layer-on img[data-ml-block][data-ml-kind='image'] {
  outline: 2px dashed rgba(255, 159, 64, 0.95) !important;
  outline-offset: 2px;
}

.ml-maker-hover-target[data-ml-kind='visual']::after,
.ml-maker-hover-target[data-ml-kind='video']::after {
  border-width: 3px;
}

.ml-maker-hover-target[data-ml-kind='visual']::after {
  border-color: #ff9f40;
}

.ml-maker-hover-target[data-ml-kind='video']::after {
  border-color: #a78bfa;
}

.ml-maker-hover-target[data-ml-kind='image'] {
  outline: 3px solid #ff9f40 !important;
  outline-offset: 2px;
}

.ml-maker-locked[data-ml-kind='visual']::after {
  border-width: 3px;
  border-color: #e07b12;
}

.ml-maker-locked[data-ml-kind='video']::after {
  border-width: 3px;
  border-color: #7c3aed;
}

.ml-maker-locked[data-ml-kind='image'] {
  outline: 3px solid #e07b12 !important;
  outline-offset: 2px;
}

.ml-maker-tooltip {
  position: fixed;
  z-index: 1;
  max-width: min(360px, calc(100vw - 24px));
  pointer-events: none;
  padding: 8px 10px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.94);
  color: #fff;
  font: 500 13px/1.35 system-ui, -apple-system, sans-serif;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

.ml-maker-tooltip-preview {
  display: block;
  font-weight: 600;
}

.ml-maker-tooltip-path {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  opacity: 0.75;
}

.ml-maker-toast {
  position: fixed;
  z-index: 2;
  left: 50%;
  bottom: 56px;
  transform: translateX(-50%);
  padding: 10px 16px;
  border-radius: 4px;
  background: #0f172a;
  color: #50d9d1;
  font: 600 12px/1.3 system-ui, -apple-system, sans-serif;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ml-maker-toast.is-visible {
  opacity: 1;
}
