#composer .reference-preparation-trigger {
  position: static;
  flex: 0 0 auto;
  min-height: 44px;
  max-width: 128px;
  padding: 6px 9px;
  border: 1px solid #626d2b;
  border-radius: 9px;
  color: #d0ff00;
  background: #262b20;
  font-size: 11px;
  line-height: 1.4;
  white-space: normal;
}
#composer .reference-preparation-trigger[hidden],
.reference-preparation-dialog [hidden] {
  display: none !important;
}
#composer .reference-preparation-trigger:focus-visible,
.reference-preparation-dialog :is(button, select):focus-visible {
  outline: 2px solid #d0ff00;
  outline-offset: 2px;
}
#composer .reference-item.has-prepared-reference {
  outline: 1px solid #d0ff00;
}
#composer .reference-item > .prepared-reference-badge {
  position: absolute;
  inset: 3px auto auto 3px;
  padding: 1px 4px;
  background: #253000;
  color: #d0ff00;
  font-size: 10px;
  pointer-events: none;
}
.reference-preparation-dialog {
  box-sizing: border-box;
  width: min(640px, calc(100vw - 24px));
  max-height: 90dvh;
  overflow: auto;
  padding: 28px;
  border: 1px solid #485051;
  border-radius: 20px;
  background: #1b2022;
  color: #f4f5f5;
  font: 14px/1.6 var(--vizurai-font-family, system-ui);
}
.reference-preparation-dialog::backdrop {
  background: #000a;
  backdrop-filter: blur(5px);
}
.reference-preparation-dialog h2 {
  margin-right: 44px;
  font-size: 25px;
}
.reference-preparation-dialog label {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}
.reference-preparation-dialog select {
  min-height: 44px;
  width: 100%;
  background: #111718;
  color: #fff;
  border: 1px solid #485051;
  border-radius: 8px;
  padding: 8px;
}
.reference-preparation-dialog figure {
  margin: 16px 0;
  padding: 12px;
  border: 1px solid #384143;
  border-radius: 12px;
  background: #111718;
}
.reference-preparation-dialog img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: contain;
}
.prep-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.prep-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.prep-actions button, .prep-close {
  min-height: 44px;
  border: 1px solid #536064;
  border-radius: 9px;
  padding: 8px 10px;
  background: #293135;
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.prep-actions [data-prep-run] {
  color: #172000;
  background: #d0ff00;
  border-color: #d0ff00;
}
.prep-actions button:disabled, .prep-close:disabled {
  opacity: .5;
  cursor: not-allowed;
}
.prep-close {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 44px;
  font-size: 22px;
}
.prep-crop-warning {
  color: #ffd089;
}
.prep-explanation {
  color: #c2c7c7;
}
@media (max-width: 500px) {
  .prep-fields {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .reference-preparation-dialog {
    padding: 22px 16px;
  }
  .prep-actions button {
    width: 100%;
  }
}


.prep-test-effects{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.prep-test-effects button{min-height:44px;padding:8px 12px;border:1px solid #546170;border-radius:9px;background:#202a34;color:#e4f1fa}
.prep-test-effects button[aria-pressed="true"]{border-color:#9be6ff;background:#254453}

.prep-previews.has-result {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.prep-previews.has-result figure {
  margin: 12px 0;
  padding: 8px;
}
.prep-previews figcaption {
  color: #c2c7c7;
  margin: 4px 0 0;
  text-align: center;
}
.prep-actions [data-pencil-apply] {
  background: #254453;
  border-color: #9be6ff;
}
