.kx-aiimg {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.kx-aiimg__frame {
  position: relative;
  border: var(--border-card);
  border-left: var(--accent-ai);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-ai-surface);
  aspect-ratio: 4 / 3;
}
.kx-aiimg__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.kx-aiimg__state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  color: var(--color-neutral-500);
  font-size: var(--fs-caption);
}
.kx-aiimg__skeleton {
  background: linear-gradient(100deg, var(--ai-skeleton-a) 30%, var(--ai-skeleton-b) 50%, var(--ai-skeleton-a) 70%);
  background-size: 200% 100%;
  animation: kx-shimmer 1.4s infinite;
}
@keyframes kx-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}
.kx-aiimg__spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--color-primary-100);
  border-top-color: var(--color-ai-accent);
  border-radius: 50%;
  animation: kx-spin 0.8s linear infinite;
}
@keyframes kx-spin {
  to { transform: rotate(360deg); }
}
.kx-aiimg__state--failed {
  color: var(--color-error);
  background: var(--color-error-bg);
}
.kx-aiimg__retry {
  border: 1px solid var(--color-error);
  color: var(--color-error);
  background: var(--color-white);
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  font-size: var(--fs-caption);
}
.kx-aiimg__watermark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-24deg);
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.kx-aiimg__topbar {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  right: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.kx-aiimg__shot,
.kx-aiimg__ver {
  background: rgba(16, 24, 40, 0.72);
  color: var(--color-on-accent);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  font-size: var(--fs-micro);
  font-weight: var(--fw-semibold);
}
.kx-aiimg__sample {
  background: rgba(109, 74, 255, 0.9);
  color: var(--color-on-accent);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  font-size: var(--fs-micro);
  font-weight: var(--fw-bold);
}
.kx-aiimg__gen {
  position: absolute;
  bottom: var(--space-2);
  right: var(--space-2);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--color-ai-accent);
  color: var(--color-on-accent);
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  cursor: pointer;
  box-shadow: var(--shadow-level2);
}
.kx-aiimg__gen:hover {
  background: var(--color-ai-accent-strong);
}
.kx-aiimg__notice {
  font-size: var(--fs-micro);
  line-height: 15px;
  color: var(--color-neutral-500);
}
