.prompt-copy-page {
  align-items: stretch;
}

.prompt-copy-shell {
  width: 100%;
}

.back-link {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 13px;
}

.prompt-detail {
  display: grid;
  gap: 14px;
}

.prompt-copy-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.94);
}

.prompt-copy-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.prompt-copy-header h2 {
  font-size: 17px;
}

.prompt-copy-header p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.copy-btn {
  flex: 0 0 auto;
  border: 1px solid rgba(0, 133, 124, 0.28);
  border-radius: 12px;
  background: rgba(0, 133, 124, 0.08);
  color: var(--brand);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 13px;
  transition:
    background 0.12s ease,
    transform 0.12s ease;
}

.copy-btn:hover {
  background: rgba(0, 133, 124, 0.14);
  transform: translateY(-1px);
}

.prompt-text {
  margin: 14px 0 0;
  max-height: 440px;
  overflow: auto;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(15, 23, 42, 0.03);
  color: var(--text);
  font: 13px/1.7 "Poppins", system-ui, sans-serif;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.result-card h2 {
  font-size: 17px;
  margin-bottom: 12px;
}

.example-pair-card {
  display: grid;
}

.example-carousel {
  min-width: 0;
  overflow: hidden;
}

.carousel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.carousel-top h2 {
  font-size: 17px;
}

.carousel-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.carousel-btn {
  border: 1px solid rgba(0, 133, 124, 0.28);
  border-radius: 12px;
  background: rgba(0, 133, 124, 0.08);
  color: var(--brand);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 11px;
}

.carousel-indicator {
  min-width: 42px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.carousel-viewport {
  display: flex;
  transition: transform 0.22s ease;
}

.carousel-slide {
  flex: 0 0 100%;
  min-width: 0;
}

.example-result-image {
  margin-top: 14px;
}

.result-image {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #fff;
  cursor: zoom-in;
  overflow: hidden;
}

.result-image img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  transition: transform 0.16s ease;
}

.result-image:hover img {
  transform: scale(1.015);
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 72px 18px 24px;
  background: rgba(15, 23, 42, 0.78);
}

.image-modal.is-open {
  display: flex;
}

.image-modal img {
  max-width: min(980px, 100%);
  max-height: 82vh;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.modal-close {
  position: fixed;
  top: 18px;
  right: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 12px;
}

.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 200;
  max-width: calc(100vw - 28px);
  transform: translate(-50%, 18px);
  opacity: 0;
  pointer-events: none;
  border-radius: 999px;
  background: var(--text);
  color: #fff;
  padding: 10px 14px;
  font-size: 13px;
  box-shadow: var(--shadow);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}

.copy-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 720px) {
  .prompt-copy-header {
    display: grid;
  }

  .prompt-copy-card {
    padding: 14px;
  }

  .copy-btn {
    width: 100%;
  }

  .prompt-text {
    max-height: 360px;
    padding: 12px;
    font-size: 12.5px;
  }

  .result-image img {
    aspect-ratio: 16 / 9;
  }

  .image-modal {
    padding: 64px 12px 18px;
  }

  .image-modal img {
    max-height: 78vh;
    border-radius: 12px;
  }

  .modal-close {
    top: 12px;
    right: 12px;
  }

  .carousel-top {
    display: grid;
  }

  .carousel-controls {
    justify-content: space-between;
  }
}
