.acl-prompt-card {
  --acl-prompt-border: color-mix(in srgb, currentColor 24%, transparent);
  --acl-prompt-surface-soft: color-mix(in srgb, currentColor 7%, transparent);
  position: relative;
  box-sizing: border-box;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  min-width: 0;
  margin-block: clamp(1.5rem, 3vw, 2.5rem);
  padding: clamp(1.1rem, 2.5vw, 1.6rem);
  color: inherit;
  background: transparent;
  border: 1px solid var(--acl-prompt-border);
  border-inline-start: 4px solid currentColor;
  border-radius: 16px;
  box-shadow: 0 12px 34px color-mix(in srgb, currentColor 9%, transparent);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.acl-prompt-card *,
.acl-prompt-card *::before,
.acl-prompt-card *::after {
  box-sizing: border-box;
}

.acl-prompt-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(110deg, transparent 15%, color-mix(in srgb, currentColor 8%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.acl-prompt-card:hover,
.acl-prompt-card:focus-within {
  border-color: color-mix(in srgb, currentColor 48%, transparent);
  box-shadow: 0 16px 40px color-mix(in srgb, currentColor 14%, transparent);
  transform: translateY(-2px);
}

.acl-prompt-card:hover::before,
.acl-prompt-card:focus-within::before {
  opacity: 1;
}

.acl-prompt-card__header {
  margin-block-end: 1rem;
}

.acl-prompt-card__eyebrow {
  margin: 0 0 0.35rem;
  color: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.4;
  text-transform: uppercase;
  opacity: 0.76;
}

.acl-prompt-card__title {
  margin: 0;
  color: inherit;
  font: inherit;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 700;
  line-height: 1.3;
}

.acl-prompt-card__prompt-wrap {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
}

.acl-prompt-card__prompt {
  min-width: 0;
  max-width: 100%;
  max-height: 28rem;
  overflow: auto;
  margin: 0;
  padding: 1rem;
  color: inherit;
  background: var(--acl-prompt-surface-soft);
  border: 1px solid var(--acl-prompt-border);
  border-radius: 12px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: clamp(0.88rem, 1.5vw, 0.98rem);
  line-height: 1.65;
  overflow-wrap: anywhere;
  tab-size: 2;
  white-space: pre-wrap;
  user-select: text;
}

.acl-prompt-card__prompt:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 2px;
}

.acl-prompt-card__prompt code {
  padding: 0;
  color: inherit;
  background: transparent;
  font: inherit;
}

.acl-prompt-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  margin-block-start: 0.85rem;
}

.acl-prompt-card__ratio {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  min-height: 2.75rem;
  padding: 0.35rem 0.45rem 0.35rem 0.75rem;
  color: inherit;
  background: transparent;
  border: 1px solid var(--acl-prompt-border);
  border-radius: 999px;
  font: inherit;
  line-height: 1;
}

.acl-prompt-card__ratio-label {
  font-size: 0.82rem;
  font-weight: 650;
  opacity: 0.72;
}

.acl-prompt-card__ratio-select {
  min-width: 4.4rem;
  min-height: 2rem;
  margin: 0;
  padding: 0.2rem 0.3rem;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
}

.acl-prompt-card__ratio-select option {
  color: CanvasText;
  background: Canvas;
}

.acl-prompt-card__ratio-select:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 2px;
}

.acl-prompt-card__copy {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  color: inherit;
  background: transparent;
  border: 2px solid currentColor;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  transition: background-color 150ms ease, transform 150ms ease;
}

.acl-prompt-card__copy:hover {
  background: color-mix(in srgb, currentColor 12%, transparent);
}

.acl-prompt-card__copy:active {
  transform: translateY(1px);
}

.acl-prompt-card__copy:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

.acl-prompt-card__copy[data-copy-state="success"] {
  background: color-mix(in srgb, currentColor 18%, transparent);
}

.acl-prompt-card__copy[data-copy-state="error"] {
  border-style: double;
}

.acl-prompt-card__copy-icon {
  flex: 0 0 auto;
}

.acl-prompt-card__share {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-inline-start: auto;
}

.acl-prompt-card__share-button {
  display: inline-grid;
  flex: 0 0 2.75rem;
  place-items: center;
  width: 2.75rem;
  min-width: 2.75rem;
  height: 2.75rem;
  min-height: 2.75rem;
  margin: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 1px solid var(--acl-prompt-border);
  border-radius: 999px;
  cursor: pointer;
  opacity: 0.78;
  transition: background-color 150ms ease, border-color 150ms ease, opacity 150ms ease, transform 150ms ease;
}

.acl-prompt-card__share-button:hover {
  background: color-mix(in srgb, currentColor 10%, transparent);
  border-color: currentColor;
  opacity: 1;
}

.acl-prompt-card__share-button:active {
  transform: translateY(1px);
}

.acl-prompt-card__share-button:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
  opacity: 1;
}

.acl-prompt-card__share-button:disabled,
.acl-prompt-card__copy:disabled {
  cursor: wait;
  opacity: 0.55;
}

.acl-prompt-card__share-button svg {
  display: block;
  pointer-events: none;
}

.acl-prompt-card__context {
  margin: 0.9rem 0 0;
  color: inherit;
  font-size: 0.82rem;
  line-height: 1.5;
  opacity: 0.72;
}

.acl-prompt-toast {
  position: fixed;
  z-index: 100000;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  max-width: min(24rem, calc(100vw - 2rem));
  padding: 0.85rem 1rem;
  color: CanvasText;
  background: Canvas;
  border: 2px solid currentColor;
  border-inline-start-width: 5px;
  border-radius: 10px;
  box-shadow: 0 14px 34px color-mix(in srgb, currentColor 20%, transparent);
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translateY(1rem);
  transition: opacity 180ms ease, transform 180ms ease;
}

.acl-prompt-toast[data-tone="error"] {
  border-style: double;
}

.acl-prompt-toast[data-state="visible"] {
  opacity: 1;
  transform: translateY(0);
}

@supports not (color: color-mix(in srgb, currentColor, transparent)) {
  .acl-prompt-card {
    --acl-prompt-surface-soft: transparent;
    --acl-prompt-border: currentColor;
    box-shadow: none;
  }

  .acl-prompt-card__copy:hover,
  .acl-prompt-card__copy[data-copy-state="success"],
  .acl-prompt-card__share-button:hover {
    background: transparent;
    text-decoration: underline;
  }
}

@media (prefers-reduced-motion: reduce) {
  .acl-prompt-card,
  .acl-prompt-card::before,
  .acl-prompt-card__copy,
  .acl-prompt-card__share-button,
  .acl-prompt-toast {
    scroll-behavior: auto;
    transition-duration: 0.01ms;
  }

  .acl-prompt-card:hover,
  .acl-prompt-card:focus-within {
    transform: none;
  }
}

@media (max-width: 520px) {
  .acl-prompt-card__actions {
    gap: 0.55rem;
  }

  .acl-prompt-card__ratio,
  .acl-prompt-card__copy {
    flex: 1 1 auto;
    justify-content: center;
  }

  .acl-prompt-card__share {
    flex: 0 0 100%;
    justify-content: flex-end;
    margin-inline-start: 0;
  }
}
