/* ============================================
   COMPONENT STYLES
   Reusable UI components: buttons, inputs,
   modals, sheets, credit packs, etc.
   ============================================ */

/* ============================================
   BODY SCROLL LOCK
   Applied when modals/sheets are open
   ============================================ */
body.modal-open {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  /* height set dynamically via JS for iOS Safari */
}

/* Prevent touch scroll passthrough on iOS */
body.modal-open .sheet-overlay,
body.modal-open .modal-overlay {
  touch-action: none;
  -webkit-overflow-scrolling: auto;
}

/* Hide GDPR consent banner when modals/sheets are open */
body.modal-open #gdpr-banner,
body.modal-open [id*="gdpr"],
body.modal-open [class*="gdpr"],
body.modal-open [class*="consent-banner"] {
  display: none !important;
}

/* ============================================
   BUTTONS - General
   ============================================ */
.btn {
  flex: 1;
  padding: 14px 20px;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:active {
  background: var(--primary-hover);
  transform: scale(0.96);
  opacity: 0.9;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--text-dimmed);
}

.btn-secondary:active {
  background: var(--border);
  transform: scale(0.96);
}

/* ============================================
   DRAG & DROP OVERLAY
   Full-viewport overlay when dragging files
   ============================================ */
.drag-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(139, 124, 246, 0.08);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.drag-overlay.visible {
  display: flex;
  animation: drag-overlay-in 0.15s ease-out;
}

@keyframes drag-overlay-in {
  from {
    opacity: 0;
    backdrop-filter: blur(0px);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(2px);
  }
}

.drag-overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 48px 64px;
  background: var(--bg);
  border: 3px dashed var(--primary);
  border-radius: 24px;
  box-shadow:
    0 0 0 8px rgba(139, 124, 246, 0.1),
    0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: drag-content-pulse 1.5s ease-in-out infinite;
}

@keyframes drag-content-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow:
      0 0 0 8px rgba(139, 124, 246, 0.1),
      0 25px 50px -12px rgba(0, 0, 0, 0.25);
  }
  50% {
    transform: scale(1.02);
    box-shadow:
      0 0 0 12px rgba(139, 124, 246, 0.15),
      0 30px 60px -12px rgba(0, 0, 0, 0.3);
  }
}

.drag-overlay-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glow);
  border-radius: 20px;
  color: var(--primary);
}

.drag-overlay-icon svg {
  width: 40px;
  height: 40px;
}

.drag-overlay-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.drag-overlay-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Hide hint when no photo loaded yet */
body:not(.has-image) .drag-overlay-hint {
  display: none;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .drag-overlay {
    background: rgba(139, 124, 246, 0.12);
  }

  .drag-overlay-content {
    background: var(--bg-secondary);
    border-color: var(--primary);
  }
}

/* Mobile */
@media (max-width: 768px) {
  .drag-overlay-content {
    padding: 32px 40px;
    margin: 16px;
  }

  .drag-overlay-icon {
    width: 64px;
    height: 64px;
  }

  .drag-overlay-icon svg {
    width: 32px;
    height: 32px;
  }

  .drag-overlay-text {
    font-size: 1.25rem;
  }
}

/* ============================================
   EDIT CARD - Premium unified input
   ============================================ */
.edit-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

.edit-card:focus-within {
  border-color: var(--primary);
  box-shadow:
    0 0 0 3px var(--glow),
    0 4px 16px rgba(0, 0, 0, 0.06);
}

/* Post-upload attention animation - draws user to prompt input */
.edit-card.attention {
  animation: edit-card-attention 1.5s ease-in-out;
}

@keyframes edit-card-attention {
  0% {
    border-color: var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
  }
  25% {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(139, 124, 246, 0.2), 0 4px 20px rgba(139, 124, 246, 0.15);
    transform: scale(1.01);
  }
  50% {
    border-color: var(--primary);
    box-shadow: 0 0 0 6px rgba(139, 124, 246, 0.15), 0 4px 24px rgba(139, 124, 246, 0.2);
    transform: scale(1.01);
  }
  75% {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(139, 124, 246, 0.1), 0 4px 16px rgba(139, 124, 246, 0.1);
    transform: scale(1.005);
  }
  100% {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--glow), 0 4px 16px rgba(0, 0, 0, 0.06);
    transform: scale(1);
  }
}

/* ============================================
   PROMPT SUGGESTIONS - Post-upload guidance
   Shows clickable example prompts to help users
   understand what to type
   ============================================ */
.prompt-suggestions {
  display: none;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  animation: prompt-suggestions-appear 0.3s ease-out;
}

.prompt-suggestions.visible {
  display: block;
}

@keyframes prompt-suggestions-appear {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.prompt-suggestions-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.prompt-suggestions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prompt-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  background: rgba(139, 124, 246, 0.08);
  border: 1px solid rgba(139, 124, 246, 0.2);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.prompt-chip:hover {
  background: rgba(139, 124, 246, 0.15);
  border-color: rgba(139, 124, 246, 0.4);
  transform: translateY(-1px);
}

.prompt-chip:active {
  transform: translateY(0);
  background: rgba(139, 124, 246, 0.2);
}

/* Mobile: smaller chips, allow wrapping */
@media (max-width: 480px) {
  .prompt-chip {
    padding: 5px 10px;
    font-size: 12px;
  }

  .prompt-suggestions-list {
    gap: 6px;
  }
}

/* ============================================
   TASK-SPECIFIC PROMPT CHIPS
   Shown when ?task= parameter is present
   ============================================ */
.task-prompts-section {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  animation: task-prompts-appear 0.3s ease-out;
}

@keyframes task-prompts-appear {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.task-prompts-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.task-prompts-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.task-prompt-chip {
  /* Reset button defaults */
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  /* Chip styles */
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  background: rgba(139, 124, 246, 0.08);
  border: 1px solid rgba(139, 124, 246, 0.2);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-prompt-chip:hover {
  background: rgba(139, 124, 246, 0.15);
  border-color: rgba(139, 124, 246, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(139, 124, 246, 0.2);
}

.task-prompt-chip:active {
  transform: translateY(0);
  background: rgba(139, 124, 246, 0.2);
}

.task-prompt-chip.popular {
  background: linear-gradient(135deg, rgba(139, 124, 246, 0.12) 0%, rgba(99, 102, 241, 0.12) 100%);
  border-color: rgba(139, 124, 246, 0.3);
}

.task-prompt-chip.popular::before {
  content: "\2605";
  font-size: 11px;
  margin-right: 2px;
}

/* Show more button */
.task-prompts-more {
  /* Reset button defaults */
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  /* Button styles */
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.task-prompts-more:hover {
  color: var(--primary);
  border-color: var(--primary);
  border-style: solid;
}

/* Reference image guidance banner for add-* tasks */
.task-prompts-guidance {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text);
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 10px;
}

.task-prompts-guidance .guidance-icon {
  flex-shrink: 0;
  font-size: 16px;
}

.task-prompts-guidance .guidance-text {
  line-height: 1.4;
}

/* Mobile: adjust chip sizing */
@media (max-width: 480px) {
  .task-prompt-chip {
    padding: 6px 12px;
    font-size: 12px;
  }

  .task-prompts-chips {
    gap: 6px;
  }
}

.edit-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============================================
   PROMPT INPUT - Clean textarea
   ============================================ */
.prompt-input {
  width: 100%;
  padding: 8px 4px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  resize: none;
  min-height: 24px;
  max-height: 120px;
  line-height: 1.5;
  cursor: text;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.prompt-input:hover {
  background: rgba(var(--primary-rgb, 79, 70, 229), 0.03);
}

.prompt-input:focus {
  outline: none;
  background: rgba(var(--primary-rgb, 79, 70, 229), 0.05);
  box-shadow: inset 0 0 0 2px var(--primary);
}

.prompt-input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
  transition: opacity 0.15s ease;
}

.prompt-input:focus::placeholder {
  opacity: 0.4;
}

.prompt-wrapper {
  position: relative;
  width: 100%;
  cursor: text;
}

.prompt-char-count {
  position: absolute;
  right: 4px;
  bottom: 0;
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.prompt-char-count.visible {
  opacity: 0.6;
}

.prompt-char-count.warning {
  color: #f59e0b;
  opacity: 1;
}

.prompt-char-count.danger {
  color: #ef4444;
  opacity: 1;
}

/* ============================================
   REFERENCE PHOTO SECTION
   Prominent add/preview for reference images
   ============================================ */
.reference-photo-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* Add Reference Button */
.add-reference-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-subtle);
  border: 1px dashed var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.add-reference-btn:hover {
  background: var(--glow);
  border-color: var(--primary);
  border-style: solid;
}

.add-reference-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 124, 246, 0.1);
  border-radius: 8px;
  color: var(--primary);
}

.add-reference-text {
  flex: 1;
  min-width: 0;
}

.add-reference-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.add-reference-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.add-reference-plus {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.add-reference-btn:hover .add-reference-plus {
  color: var(--primary);
}

/* Reference Preview (when photo added) */
.reference-preview {
  display: none;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.reference-preview.visible {
  display: block;
}

.reference-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(139, 124, 246, 0.05);
  border-bottom: 1px solid var(--border);
}

.reference-preview-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
}

.reference-remove-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.reference-remove-btn:hover {
  color: var(--error, #EF4444);
  border-color: var(--error, #EF4444);
  background: rgba(239, 68, 68, 0.1);
}

.reference-preview-content {
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.reference-preview-content img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--primary);
  background: var(--bg);
}

.reference-preview-hint {
  flex: 1;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Hide add button when preview is visible */
.reference-preview.visible ~ .add-reference-btn,
.reference-photo-section:has(.reference-preview.visible) .add-reference-btn {
  display: none;
}

/* When reference is added, also hide the photo strip add button */
body.has-two-photos .add-reference-btn {
  display: none;
}

/* Show reference preview when in two-photo mode */
body.has-two-photos .reference-preview {
  display: block;
}

/* Hide reference section when showing result (edit-card is hidden anyway) */
.has-result .reference-photo-section {
  display: none;
}

/* Mobile: more compact */
@media (max-width: 768px) {
  .reference-photo-section {
    margin-top: 10px;
    padding-top: 10px;
  }

  .add-reference-btn {
    padding: 10px 12px;
    gap: 10px;
  }

  .add-reference-icon {
    width: 36px;
    height: 36px;
  }

  .add-reference-icon svg {
    width: 18px;
    height: 18px;
  }

  .add-reference-label {
    font-size: 0.8rem;
  }

  .add-reference-hint {
    font-size: 0.7rem;
  }

  .reference-preview-content {
    padding: 10px;
    gap: 10px;
  }

  .reference-preview-content img {
    width: 56px;
    height: 56px;
  }

  .reference-preview-hint {
    font-size: 0.75rem;
  }
}

/* ============================================
   EDIT COST INDICATOR
   ============================================ */
.edit-cost-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 0;
  font-size: 12px;
  color: var(--text-muted);
}

.edit-cost-indicator .cost-text {
  display: flex;
  align-items: center;
  gap: 4px;
}

.edit-cost-indicator.free .cost-text {
  color: #10b981;
  font-weight: 500;
}

.edit-cost-indicator.pro .cost-text {
  color: var(--primary);
}

.edit-cost-indicator.insufficient .cost-text {
  color: #f59e0b;
  font-weight: 500;
}

/* Edit button needs-credits state */
.edit-btn.needs-credits {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.edit-btn.needs-credits:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

/* Countdown waiting state - greyed out, showing time until free edit */
.edit-btn.countdown-waiting {
  background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
  cursor: pointer;
}

.edit-btn.countdown-waiting:hover {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

/* Edit cost caption - subtle text below quality toggle */
.edit-cost-caption {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: center;
}

.edit-cost-caption.free {
  color: #10b981;
  font-weight: 500;
}

.edit-cost-caption.warning {
  color: #f59e0b;
}

/* ============================================
   QUALITY TOGGLE - iOS-style segmented control
   ============================================ */
.quality-toggle {
  display: flex;
}

.toggle-track {
  position: relative;
  display: flex;
  background: var(--bg-subtle);
  border-radius: 8px;
  padding: 2px;
}

.toggle-indicator {
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(50% - 2px);
  height: calc(100% - 4px);
  background: white;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.toggle-indicator.right {
  transform: translateX(100%);
}

.toggle-option {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 12px 16px;
  min-height: 44px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-option.active {
  color: var(--text);
}

.toggle-option#proOption.active {
  color: var(--primary);
}

/* Disabled state for Smart when insufficient credits */
.toggle-option#proOption.insufficient {
  opacity: 0.5;
}

/* ============================================
   QUALITY HELP TOOLTIP
   ============================================ */
.quality-toggle-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  position: relative;
  z-index: 20;
}

/* Smart mode inline upsell - appears when Smart selected but can't afford */
.smart-upsell {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: rgba(139, 124, 246, 0.1);
  border: 1px solid rgba(139, 124, 246, 0.3);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 4px;
}

.smart-upsell.visible {
  display: flex;
}

.smart-upsell:hover {
  background: rgba(139, 124, 246, 0.15);
  border-color: rgba(139, 124, 246, 0.5);
}

.smart-upsell-text {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 500;
}

.smart-upsell-arrow {
  font-size: 0.8rem;
  color: var(--primary);
}

.quality-help-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.quality-help-btn:hover {
  background: var(--bg);
  color: var(--text);
  border-color: var(--primary);
}

.quality-help-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  width: 320px;
  max-width: calc(100vw - 32px);
}

.quality-help-tooltip.visible {
  display: block;
}

.quality-help-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.quality-help-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.quality-help-close:hover {
  color: var(--text);
}

.quality-help-content {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quality-help-option {
  padding: 12px;
  background: var(--bg-subtle);
  border-radius: 10px;
}

.quality-help-option.smart {
  background: linear-gradient(135deg, rgba(139, 124, 246, 0.1) 0%, rgba(139, 124, 246, 0.05) 100%);
  border: 1px solid rgba(139, 124, 246, 0.2);
}

.quality-help-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.quality-help-cost {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 10px;
}

.quality-help-option.smart .quality-help-title {
  color: var(--primary);
}

.quality-help-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.quality-help-examples {
  margin: 0;
  padding-left: 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.quality-help-examples li {
  margin-bottom: 2px;
}

/* Mobile: position tooltip better */
@media (max-width: 480px) {
  .quality-help-tooltip {
    left: -10px;
    right: auto;
    width: calc(100vw - 32px);
  }
}

/* ============================================
   SMART RECOMMENDATION BANNER
   ============================================ */
.smart-recommend {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: #faf9ff;
  border-radius: 8px;
  margin-bottom: 8px;
}

.smart-recommend.visible {
  display: flex;
}

.smart-recommend-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.smart-recommend-text strong {
  color: var(--primary);
  font-weight: 600;
}

.smart-recommend-btn {
  padding: 5px 12px;
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.smart-recommend-btn:hover {
  background: var(--primary);
  color: white;
}

/* ============================================
   EDIT BUTTON - Primary action
   ============================================ */
.edit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 42px;
  box-shadow: 0 2px 8px rgba(139, 124, 246, 0.25);
  flex-shrink: 0;
}

.edit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 124, 246, 0.35);
}

.edit-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(139, 124, 246, 0.2);
}

.edit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Highlight animation for quick edit flow - draws attention to confirm */
.edit-btn.highlight {
  animation: editBtnHighlight 1.5s ease-out;
}

@keyframes editBtnHighlight {
  0% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(139, 124, 246, 0.25);
  }
  20% {
    transform: scale(1.05);
    box-shadow: 0 0 0 4px rgba(139, 124, 246, 0.3), 0 4px 16px rgba(139, 124, 246, 0.4);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(139, 124, 246, 0.25);
  }
}

.edit-btn-text {
  font-weight: 600;
}

.edit-btn-icon {
  transition: transform 0.2s ease;
}

.edit-btn:hover .edit-btn-icon {
  transform: translateX(2px);
}

/* Free edit button state - green accent */
.edit-btn.free-edit {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.edit-btn.free-edit:hover {
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* ============================================
   REFERENCE IMAGE BUTTON
   ============================================ */
/* ============================================
   REFERENCE IMAGE CARD
   Mobile: Compact thumbnail strip (60px)
   Desktop: Larger preview in sidebar
   ============================================ */
.reference-card {
  display: none;
  flex-direction: column;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}

.reference-card.visible {
  display: flex;
}

.reference-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.reference-card-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.reference-card-label svg {
  color: var(--primary);
}

.reference-card-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.reference-card-remove:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
}

.reference-card-image {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
  cursor: pointer;
}

.reference-card-image img {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  display: block;
}

.reference-card-hint {
  font-size: 0.75rem;
  color: var(--text-dimmed);
  margin-top: 8px;
  text-align: center;
}

/* Tap hint for mobile */
.reference-card-tap-hint {
  display: none;
  font-size: 0.7rem;
  color: var(--text-dimmed);
  text-align: center;
  margin-top: 4px;
}

/* ============================================
   MOBILE: Compact thumbnail strip
   ============================================ */
@media (max-width: 768px) {
  .reference-card {
    flex-direction: row;
    align-items: center;
    padding: 8px 10px;
    gap: 10px;
    margin-bottom: 8px;
  }

  .reference-card-header {
    display: none; /* Hide header on mobile, use inline layout */
  }

  .reference-card-image {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 8px;
  }

  .reference-card-image img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
  }

  /* Mobile inline content */
  .reference-card-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .reference-card-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .reference-card-title svg {
    width: 12px;
    height: 12px;
    color: var(--primary);
  }

  .reference-card-tap-hint {
    display: block;
    text-align: left;
    margin-top: 0;
  }

  .reference-card-hint {
    display: none; /* Hide verbose hint on mobile */
  }

  /* Remove button - inline on mobile */
  .reference-card-remove-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
  }

  .reference-card-remove-mobile:hover,
  .reference-card-remove-mobile:active {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
  }
}

/* Desktop: Show full card layout */
@media (min-width: 769px) {
  .reference-card-content {
    display: none;
  }

  .reference-card-remove-mobile {
    display: none;
  }
}

/* ============================================
   REFERENCE IMAGE OVERLAY (Mobile expand)
   Full-screen view when tapping thumbnail
   ============================================ */
.reference-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.reference-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.reference-overlay-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
}

.reference-overlay-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
  display: flex;
  align-items: center;
  gap: 8px;
}

.reference-overlay-title svg {
  color: var(--primary);
}

.reference-overlay-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  font-size: 1.5rem;
  transition: all 0.15s ease;
}

.reference-overlay-close:hover,
.reference-overlay-close:active {
  background: rgba(255, 255, 255, 0.2);
}

.reference-overlay-image {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  max-height: calc(100dvh - 140px);
  object-fit: contain;
  border-radius: 12px;
}

.reference-overlay-hint {
  position: absolute;
  bottom: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}

/* Add Reference Button */
.reference-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  min-height: 44px; /* Touch target */
}

.reference-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--glow);
}

.reference-btn:active {
  transform: scale(0.98);
}

.reference-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.reference-btn-text {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Hide button when reference is visible */
.reference-card.visible ~ .edit-card .reference-btn {
  display: none;
}

/* ============================================
   PHOTO STRIP (Equal Photos Architecture)
   Horizontal strip of numbered photo thumbnails
   Positioned inside image-area, below the image-container
   ============================================ */
.photo-strip {
  display: none; /* Hidden until photo loaded */
  align-items: center;
  justify-content: center;
  padding: 12px 0;
  flex-shrink: 0;
}

.photo-strip.visible {
  display: flex;
}

.photo-strip-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 0;
}

/* Extra bottom padding for labels in two-photo mode */
.photo-strip.two-photos .photo-strip-scroll {
  padding-bottom: 20px;
}

.photo-strip-scroll::-webkit-scrollbar {
  display: none;
}

.photo-strip-item {
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  border-radius: 10px;
  border: 2px solid transparent;
  background: var(--bg-secondary);
  padding: 4px;
  transition: all 0.15s ease;
}

.photo-strip-item:hover {
  border-color: var(--border);
}

.photo-strip-item.active {
  border-color: var(--primary);
  background: var(--glow);
}

/* Number badge */
.photo-strip-badge {
  position: absolute;
  top: -4px;
  left: -4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.photo-strip-item.active .photo-strip-badge {
  background: var(--primary);
}

/* Reference badge - different color */
.photo-strip-badge-ref {
  font-size: 0.55rem;
  padding: 0 2px;
  width: auto;
  min-width: 20px;
  background: var(--orange, #F97316);
}

.photo-strip-item.active .photo-strip-badge-ref {
  background: var(--orange, #F97316);
}

/* Photo strip label (shown below thumbnail in two-photo mode) */
.photo-strip-label {
  display: none;
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.photo-strip.two-photos .photo-strip-label {
  display: block;
}

/* Thumbnail wrapper */
.photo-thumb-wrapper {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg);
}

.photo-thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Markers badge (shows marker count) */
.photo-markers-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: var(--orange, #F97316);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  display: none;
}

.photo-markers-badge:not(:empty) {
  display: block;
}

/* Remove button (on hover) */
.photo-remove-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid white;
  background: var(--error, #EF4444);
  color: white;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  z-index: 3;
  transition: transform 0.1s ease;
}

.photo-strip-item:hover .photo-remove-btn {
  display: flex;
}

.photo-remove-btn:hover {
  transform: scale(1.1);
}

/* ============================================
   PHOTO STRIP - Result Showing State
   When showing edit result, strip is view-only
   ============================================ */

/* Disable interaction styling when result is showing */
.has-result .photo-strip-item {
  cursor: default;
  opacity: 0.7;
}

.has-result .photo-strip-item:hover {
  border-color: transparent;
}

.has-result .photo-strip-item.active {
  opacity: 1;
  border-color: var(--primary);
}

/* Hide remove buttons when result is showing */
.has-result .photo-remove-btn {
  display: none !important;
}

/* Hide add button when result is showing */
.has-result .photo-strip-add {
  display: none !important;
}

/* View-only label on strip when result showing */
.photo-strip-view-label {
  display: none;
  font-size: 0.7rem;
  color: var(--text-muted);
  padding: 4px 8px;
  background: var(--bg-secondary);
  border-radius: 6px;
  white-space: nowrap;
}

.has-result .photo-strip.two-photos .photo-strip-view-label {
  display: block;
}

/* Shake animation for blocked interactions */
.photo-strip.shake,
.photo-strip-item.shake {
  animation: photo-strip-shake 0.4s ease-out;
}

@keyframes photo-strip-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

/* Add photo button */
.photo-strip-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  border: 2px dashed var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  gap: 4px;
  transition: all 0.15s ease;
}

.photo-strip-add:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--glow);
}

.photo-strip-add span {
  font-size: 0.7rem;
  font-weight: 500;
}

.photo-strip-add svg {
  width: 18px;
  height: 18px;
}

/* Hide add button when both photos loaded */
.photo-strip.two-photos .photo-strip-add {
  display: none;
}

/* Hide photo strip when showing result - UNLESS user has 2 photos */
.has-result .photo-strip:not(.two-photos) {
  display: none !important;
}

/* When 2 photos, show strip even with result (so user can switch) */
.has-result .photo-strip.two-photos {
  display: flex !important;
}

/* ============================================
   PHOTO STRIP MOBILE RESPONSIVENESS
   ============================================ */
@media (max-width: 768px) {
  /* Show photo strip on mobile when visible (image loaded) */
  .photo-strip.visible {
    display: flex !important;
    justify-content: center;
    padding: 8px 16px;
  }

  .photo-thumb-wrapper {
    width: 48px;
    height: 48px;
  }

  .photo-strip-add {
    width: 56px;
    height: 56px;
  }

  .photo-strip-badge {
    width: 18px;
    height: 18px;
    font-size: 0.65rem;
  }

  /* Remove button always visible on mobile (no hover state) */
  .photo-strip-item .photo-remove-btn {
    display: flex;
    width: 32px;
    height: 32px;
    top: -10px;
    right: -10px;
    font-size: 16px;
  }

  /* Hide strip when keyboard is open to prevent layout jumps */
  .keyboard-open .photo-strip {
    display: none !important;
  }
}

/* ============================================
   DONE EDITING BUTTON
   ============================================ */
.done-editing-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 8px 0;
  margin-top: 4px;
  transition: color 0.15s ease;
}

.done-editing-btn:hover {
  color: var(--text);
}

.done-editing-btn.hidden {
  display: none;
}

/* Legacy support */
.quality-chip {
  display: none;
}

.quality-row {
  display: none;
}

.quality-row.hidden {
  display: none;
}

.quality-btn {
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 40px;
}

.quality-btn:hover {
  border-color: var(--text-dimmed);
}

.quality-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.quality-btn .cost {
  opacity: 0.7;
  font-size: 0.8rem;
}

/* ============================================
   BOTTOM SHEET (default for buySheet etc)
   ============================================ */
.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 10001; /* Above GDPR banner (9999) and interstitial (1000) */
  opacity: 0;
  visibility: hidden;
  /* Closing animation */
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.sheet-overlay.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  /* Opening: faster appearance */
  transition: opacity 0.1s ease, visibility 0.1s ease;
  /* Prevent iOS touch scroll passthrough */
  touch-action: none;
  -webkit-overflow-scrolling: auto;
  overscroll-behavior: contain;
}

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  padding: 20px;
  padding-bottom: calc(20px + var(--safe-bottom));
  z-index: 10002; /* Above GDPR banner (9999) and sheet-overlay (10001) */
  transform: translateY(100%);
  /* Closing animation */
  transition: transform 0.25s ease;
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  max-height: calc(85dvh - var(--safe-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.bottom-sheet.visible {
  transform: translateY(0);
  /* Opening: faster slide-up for snappier feel */
  transition: transform 0.15s ease-out;
}

.sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 20px;
  /* Larger touch area without changing visual size */
  padding: 12px 32px;
  margin-top: -12px;
  background-clip: content-box;
  cursor: grab;
  touch-action: pan-y;
}

/* ============================================
   USER SHEET - Centered modal on desktop
   ============================================ */
#userSheetOverlay {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#userSheet {
  position: fixed;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) scale(0.95) !important;
  width: 90%;
  max-width: 380px;
  border-radius: 16px !important;
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.05),
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 20px 40px -4px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#userSheet.visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1) !important;
}

#userSheet .sheet-handle {
  display: none;
}

/* Mobile: userSheet becomes bottom sheet */
@media (max-width: 640px) {
  #userSheet {
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    transform: translateY(100%) !important;
    width: 100%;
    max-width: none;
    border-radius: 20px 20px 0 0 !important;
    padding: 20px;
    padding-bottom: calc(20px + var(--safe-bottom));
    border: none;
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    opacity: 1;
  }

  #userSheet.visible {
    transform: translateY(0) !important;
  }

  #userSheet .sheet-handle {
    display: block;
  }
}

/* Close button for user sheet */
.sheet-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: none;
  background: var(--bg-subtle);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background 0.1s ease, color 0.1s ease, transform 0.1s ease;
  z-index: 1;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.sheet-close-btn:hover {
  background: var(--border);
  color: var(--text);
}

.sheet-close-btn:active {
  transform: scale(0.9);
  background: var(--border);
}

@media (max-width: 640px) {
  .sheet-close-btn {
    top: 16px;
    right: 16px;
  }
}

.sheet-title {
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 8px;
}

.sheet-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 16px;
}

.sheet-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.sheet-btn-primary {
  background: var(--primary);
  color: white;
}

.sheet-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.sheet-btn-secondary {
  background: var(--bg);
  color: var(--text-muted);
}

.sheet-btn-secondary:hover {
  background: var(--border);
  color: var(--text);
}

/* Magic link button loading state */
.sheet-btn.loading {
  opacity: 0.7;
  cursor: not-allowed;
}

.sheet-btn.loading:hover {
  transform: none;
  box-shadow: none;
}

.magic-link-spinner {
  animation: none;
}

.magic-link-spinner.spinning {
  animation: spin 1s linear infinite;
}

/* ============================================
   CREDIT PACKS
   ============================================ */
.credit-pack {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--bg-subtle);
  border: 2px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.credit-pack:hover {
  border-color: var(--text-dimmed);
}

.credit-pack.selected {
  border-color: var(--primary);
  background: rgba(124, 58, 237, 0.08);
}

.pack-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pack-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
}

.pack-edits {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.pack-detail {
  font-size: 0.75rem;
  color: var(--text-dimmed);
}

.pack-per-edit {
  font-size: 0.75rem;
  color: var(--success);
  font-weight: 600;
  margin-top: 2px;
}

.pack-tagline {
  font-size: 0.75rem;
  color: var(--text-dimmed);
  font-style: normal;
  font-weight: 500;
}

.credit-pack.selected .pack-tagline {
  color: var(--success);
  font-weight: 600;
}

.pack-badge {
  position: absolute;
  top: -10px;
  right: 12px;
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.credit-pack.selected .pack-badge {
  background: linear-gradient(135deg, #10b981, #059669);
  animation: pulse-badge 2s ease-in-out infinite;
}

.pack-badge-best {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.pack-badge-new {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.credit-pack.first-time-discount {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}

.pack-price-original {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 6px;
}

.pack-trust {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.pack-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--success);
}

.pack-credits {
  font-size: 0.9rem;
}

.pack-bonus {
  font-size: 0.7rem;
}

/* ============================================
   BUY SHEET V9 - SUBSCRIPTION FIRST (Premium)
   Credits-first visual hierarchy with brand accent
   ============================================ */

.buy-sheet-v9 {
  max-height: 85dvh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding: 0; /* Remove base padding, children handle it */
}

.buy-sheet-v9 .sheet-handle {
  flex-shrink: 0;
  margin: 12px auto 0;
}

.buy-sheet-v9 .buy-sheet-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 20px 16px;
  -webkit-overflow-scrolling: touch;
}

/* Close button styling */
.buy-sheet-v9 .buy-sheet-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s ease;
  z-index: 10;
}

.buy-sheet-v9 .buy-sheet-close:hover {
  background: var(--card-hover);
  color: var(--text);
  border-color: var(--text-dimmed);
}

.buy-sheet-v9 .buy-sheet-close:active {
  transform: scale(0.95);
}

.sheet-headline-v9 {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 6px;
  color: var(--text);
  letter-spacing: -0.02em;
}

/* PPP Badge */
.buy-sheet-v9 .buy-ppp-badge {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--success);
  background: rgba(52, 211, 153, 0.1);
  padding: 6px 12px;
  border-radius: 20px;
  margin: 0 auto 12px;
  width: fit-content;
}

/* Annual Toggle - Repositioned */
.annual-toggle-v9 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 12px 0 20px;
  cursor: pointer;
  padding: 10px 16px;
  background: var(--bg-subtle);
  border-radius: 10px;
  border: 1px solid var(--border);
  transition: all 0.15s;
}

.annual-toggle-v9:hover {
  border-color: var(--primary-light);
}

.annual-toggle-v9 input {
  display: none;
}

/* iOS-style checkbox toggle for annual/monthly switch */
.annual-toggle-v9 .toggle-track {
  width: 40px;
  height: 22px;
  background: var(--border);
  border-radius: 11px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}

.annual-toggle-v9 .toggle-track::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.annual-toggle-v9 input:checked + .toggle-track {
  background: var(--primary);
}

.annual-toggle-v9 input:checked + .toggle-track::after {
  transform: translateX(18px);
}

.toggle-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.toggle-badge {
  font-size: 0.7rem;
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.15), rgba(52, 211, 153, 0.08));
  color: var(--success);
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Subscription Tier Cards - Credits First Design */
.sub-tiers-v9 {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.sub-tier-v9 {
  display: flex;
  align-items: center;
  padding: 16px 18px;
  background: var(--bg-subtle);
  border: 2px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  gap: 16px;
}

.sub-tier-v9:hover {
  border-color: var(--border);
  transform: translateY(-1px);
}

.sub-tier-v9--selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(139, 124, 246, 0.08), rgba(139, 124, 246, 0.03));
  box-shadow: 0 0 0 3px rgba(139, 124, 246, 0.1);
}

.sub-tier-v9--popular {
  padding-top: 24px;
}

.sub-tier-badge {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  padding: 4px 12px;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 2px 8px rgba(139, 124, 246, 0.3);
}

/* Credits - Hero Metric */
.sub-tier-credits-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
}

.sub-tier-credits-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  letter-spacing: -0.02em;
}

.sub-tier-v9--selected .sub-tier-credits-num {
  color: var(--primary);
}

.sub-tier-credits-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Tier Info */
.sub-tier-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 2px;
}

.sub-tier-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.sub-tier-credits {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Price - Secondary */
.sub-tier-price {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-align: right;
  white-space: nowrap;
}

.sub-tier-price-annual {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Subscription Benefits */
.sub-benefits-v9 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: linear-gradient(135deg, var(--bg-subtle), transparent);
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
}

.sub-benefit {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sub-benefit svg {
  width: 13px;
  height: 13px;
  stroke: var(--success);
}

/* One-time Pack Section */
.onetime-section-v9 {
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
  margin-top: 4px;
}

.onetime-divider-v9 {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

.onetime-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
  width: 100%;
  text-align: center;
  transition: color 0.15s;
}

.onetime-toggle:hover {
  color: var(--text);
}

.onetime-toggle-link {
  color: var(--primary);
  font-weight: 600;
}

.onetime-pack-v9 {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-top: 10px;
}

.onetime-section-v9.expanded .onetime-toggle {
  margin-bottom: 0;
}

.onetime-section-v9.expanded .onetime-pack-v9 {
  display: flex;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.onetime-pack-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.onetime-credits {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.onetime-price {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.onetime-buy-btn {
  background: var(--bg);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
}

.onetime-buy-btn:hover {
  background: var(--bg-subtle);
  border-color: var(--primary);
  color: var(--primary);
}

/* Subscriber: promoted one-time pack */
.onetime-section-v9.subscriber-primary .onetime-divider-v9 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

/* Upgrade CTA (green instead of purple) */
.cta-primary-v9.cta-upgrade {
  background: linear-gradient(135deg, var(--success), #2cc084);
  box-shadow: 0 4px 14px rgba(52, 211, 153, 0.3);
}

/* Footer V9 - Sticky at bottom */
.buy-sheet-footer-v9 {
  flex-shrink: 0;
  padding: 14px 20px 20px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--border-subtle);
  /* Ensure footer is always visible */
  position: sticky;
  bottom: 0;
  z-index: 5;
}

.cta-primary-v9 {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  font-size: 1rem;
  font-weight: 700;
  padding: 16px 20px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 14px rgba(139, 124, 246, 0.3);
  letter-spacing: 0.01em;
}

.cta-primary-v9:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 124, 246, 0.4);
}

.cta-primary-v9:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(139, 124, 246, 0.3);
}

/* Footer Trust Line */
.footer-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-trust svg {
  width: 12px;
  height: 12px;
  stroke: var(--text-dimmed);
}

.footer-dot {
  opacity: 0.5;
}

.footer-signin {
  background: none;
  border: none;
  color: var(--primary);
  font-size: inherit;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}

.footer-signin:hover {
  text-decoration: underline;
}

.footer-signin.hidden {
  display: none;
}

/* Price strikethrough for PPP discounts */
.price-original {
  text-decoration: line-through;
  opacity: 0.5;
  font-weight: 400;
  margin-right: 4px;
}

/* Desktop: Lightbox modal with breathing room */
@media (min-width: 900px) {
  .buy-sheet-v9 {
    max-width: 720px;
    max-height: 85vh;
  }

  .buy-sheet-v9 .buy-sheet-scroll {
    padding: 32px 40px 24px;
  }

  .sheet-headline-v9 {
    font-size: 1.85rem;
    margin-bottom: 8px;
  }

  /* Horizontal 3-column tier layout on desktop */
  .sub-tiers-v9 {
    flex-direction: row;
    gap: 16px;
    margin-bottom: 20px;
  }

  .sub-tier-v9 {
    flex: 1;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 20px;
    gap: 10px;
  }

  .sub-tier-v9--popular {
    padding-top: 32px;
  }

  .sub-tier-credits-hero {
    min-width: auto;
  }

  .sub-tier-credits-num {
    font-size: 2.5rem;
  }

  .sub-tier-main {
    align-items: center;
    gap: 4px;
  }

  .sub-tier-name {
    font-size: 1.15rem;
  }

  .sub-tier-desc {
    font-size: 0.85rem;
  }

  .sub-tier-credits {
    font-size: 0.8rem;
  }

  .sub-tier-price {
    font-size: 1.1rem;
    text-align: center;
    margin-top: 4px;
  }

  .sub-tier-price-annual {
    text-align: center;
  }

  /* Benefits row with breathing room */
  .sub-benefits-v9 {
    margin-bottom: 16px;
    padding: 12px 16px;
  }

  /* Annual toggle with breathing room */
  .annual-toggle-v9 {
    margin: 12px 0 20px;
    padding: 12px 18px;
  }

  .cta-primary-v9 {
    padding: 18px 28px;
    font-size: 1.1rem;
  }

  .buy-sheet-footer-v9 {
    padding: 16px 40px 28px;
  }

  .footer-trust {
    margin-top: 12px;
  }
}

/* ============================================
   MODAL OVERLAY
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
  padding: 20px;
}

.modal-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bg);
  border-radius: 16px;
  padding: 32px 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.25s;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.modal-overlay.visible .modal-content {
  transform: scale(1);
}

.modal-icon {
  width: 56px;
  height: 56px;
  background: rgba(139, 124, 246, 0.1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 3rem;
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.modal-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.subscription-success-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--bg-subtle);
  border-radius: 10px;
}

/* Subscription success variant - blue accent */
.subscription-success .modal-icon {
  background: rgba(56, 189, 248, 0.1);
}

.subscription-success .modal-stat-value {
  color: var(--accent);
}

.subscription-success .modal-value .value-item {
  color: var(--accent);
}

.success-detail {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.modal-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--bg-subtle);
  border-radius: 12px;
}

.modal-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.modal-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--success);
}

.modal-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.modal-value {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--bg-subtle);
  border-radius: 12px;
}

.modal-value .value-item {
  color: var(--success);
  font-size: 0.9rem;
  font-weight: 500;
}

.modal-btn {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 10px;
}

.modal-btn:last-child {
  margin-bottom: 0;
}

.modal-btn-primary {
  background: var(--primary);
  color: white;
}

.modal-btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.modal-btn-secondary {
  background: transparent;
  color: var(--text-muted);
}

.modal-btn-secondary:hover {
  color: var(--text);
}

/* ============================================
   SHARE MODAL
   ============================================ */
.share-modal {
  max-width: 340px;
}

.share-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.share-option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px 20px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}

.share-option-btn:hover {
  background: var(--card-hover);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.share-option-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.share-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.share-label {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
}

.share-link-result {
  text-align: center;
  padding: 16px 0;
}

.share-success-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px auto;
  background: var(--success);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
}

.share-success-text {
  color: var(--text);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.share-link-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text);
  text-align: center;
  cursor: pointer;
}

.share-link-input:focus {
  outline: none;
  border-color: var(--primary);
}

/* ============================================
   AD BLOCKER MODAL
   Pre-flight detection modal with two options
   ============================================ */
.adblocker-modal {
  max-width: 380px;
  padding: 32px 24px 24px;
  text-align: center;
  position: relative;
}

/* Entrance animation */
#adBlockerModal.visible .adblocker-modal {
  animation: adBlockerReveal 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes adBlockerReveal {
  0% {
    opacity: 0;
    transform: scale(0.95) translateY(16px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Dismiss button */
.adblocker-dismiss {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  background: var(--bg-subtle);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  opacity: 0.7;
  transition: opacity 0.2s, background 0.2s;
}

.adblocker-dismiss:hover {
  opacity: 1;
  background: var(--border);
}

/* Icon - red circle with slash */
.adblocker-icon {
  width: 64px;
  height: 64px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: #ef4444;
}

.adblocker-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.adblocker-message {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 24px;
}

/* Two option buttons */
.adblocker-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.adblocker-option {
  width: 100%;
  padding: 16px 20px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.adblocker-option:hover {
  background: var(--card-hover);
  border-color: var(--text-dimmed);
  transform: translateY(-1px);
}

.adblocker-option:active {
  transform: translateY(0);
}

/* Primary option - Get Credits */
.adblocker-option.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.adblocker-option.primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.adblocker-option.primary .adblocker-option-title,
.adblocker-option.primary .adblocker-option-subtitle {
  color: white;
}

.adblocker-option.primary .adblocker-option-subtitle {
  opacity: 0.85;
}

.adblocker-option-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.adblocker-option-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Trust note at bottom */
.adblocker-note {
  font-size: 0.8rem;
  color: var(--text-dimmed);
  margin: 0;
}

/* Mobile: Full-width treatment */
@media (max-width: 599px) {
  .adblocker-modal {
    max-width: calc(100vw - 32px);
    padding: 28px 20px 20px;
  }

  .adblocker-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
  }

  .adblocker-icon svg {
    width: 28px;
    height: 28px;
  }

  .adblocker-title {
    font-size: 1.2rem;
  }

  .adblocker-message {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }

  .adblocker-option {
    padding: 14px 16px;
  }
}

/* Small screens (iPhone SE) */
@media (max-width: 375px) {
  .adblocker-modal {
    padding: 24px 16px 16px;
  }

  .adblocker-options {
    gap: 10px;
  }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
  .adblocker-icon {
    background: rgba(239, 68, 68, 0.15);
  }

  .adblocker-dismiss {
    background: var(--bg-secondary);
  }
}

/* ============================================
   ONBOARDING MODAL
   ============================================ */
.onboarding-modal {
  max-width: 420px;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  text-align: center;
}

/* Mobile: Compact onboarding to fit small screens */
@media (max-height: 700px) {
  .onboarding-modal {
    padding: 20px 16px;
    max-height: 95vh;
    max-height: 95dvh;
  }

  .onboarding-header h2 {
    font-size: 1.2rem;
    margin-bottom: 2px;
  }

  .onboarding-subtitle {
    font-size: 0.85rem;
    margin-bottom: 12px;
  }

  .onboarding-steps {
    gap: 8px;
    margin-bottom: 12px;
  }

  .onboarding-step {
    gap: 8px;
  }

  .step-number {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
  }

  .step-text {
    font-size: 0.85rem;
  }

  .onboarding-comparison {
    padding: 12px;
    margin-bottom: 12px;
  }

  .onboarding-comparison h3 {
    font-size: 0.8rem;
    margin-bottom: 4px;
  }

  .comparison-prompt {
    font-size: 0.75rem;
    margin-bottom: 8px;
  }

  .compare-img {
    border-radius: 6px;
  }

  .compare-label,
  .compare-verdict {
    font-size: 0.65rem;
  }

  .compare-mode-label {
    font-size: 0.65rem;
    padding: 2px 6px;
  }

  .onboarding-btn {
    padding: 12px 20px;
    font-size: 0.9rem;
  }
}

/* Very small screens - hide comparison to ensure modal fits */
@media (max-height: 550px) {
  .onboarding-comparison {
    display: none;
  }
}

.onboarding-header h2 {
  margin: 0 0 4px 0;
  font-size: 1.4rem;
  color: var(--text);
}

.onboarding-subtitle {
  margin: 0 0 20px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.onboarding-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  text-align: left;
}

.onboarding-step {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-number {
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  flex-shrink: 0;
}

.step-text {
  font-size: 0.95rem;
  color: var(--text);
}

.onboarding-comparison {
  background: var(--bg-subtle);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.onboarding-comparison h3 {
  margin: 0 0 8px 0;
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 600;
}

.comparison-prompt {
  margin: 0 0 14px 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.onboarding-compare-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.compare-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.compare-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.compare-column.smart .compare-img {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(139, 124, 246, 0.2);
}

.compare-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.compare-mode-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 4px;
}

.compare-mode-label.smart {
  color: var(--primary);
}

.compare-mode-label .mode-cost {
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg);
  padding: 2px 5px;
  border-radius: 6px;
}

.compare-verdict {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
}

.compare-column.smart .compare-verdict {
  color: var(--primary);
  font-weight: 500;
}

.onboarding-btn {
  width: 100%;
  padding: 14px 24px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.onboarding-btn:hover {
  background: var(--primary-hover);
}

/* ============================================
   CONVERSION MODAL V2 - Cinematic Celebration
   ============================================ */

.conversion-modal-v2 {
  max-width: 400px;
  width: 100%;
  padding: 0;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  max-height: 90dvh;
  overflow: hidden;
  position: relative;
  border-radius: 20px;
  background: var(--bg);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.04),
    0 24px 80px rgba(0, 0, 0, 0.18),
    0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Entrance animation */
#conversionModal.visible .conversion-modal-v2 {
  animation: conversionReveal 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes conversionReveal {
  0% {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Subtle X dismiss - delayed visibility */
.conversion-dismiss {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  opacity: 0;
  transition: opacity 0.3s ease 0.8s, background 0.2s;
}

#conversionModal.visible .conversion-dismiss {
  opacity: 0.6;
}

.conversion-dismiss:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.6);
}

/* Hero image - cinematic dark frame */
.conversion-preview-v2 {
  width: 100%;
  flex: 1;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
  overflow: hidden;
  padding: 24px;
}

/* Ambient glow behind image */
.conversion-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 60% at 50% 50%,
    rgba(139, 124, 246, 0.15) 0%,
    transparent 70%
  );
  pointer-events: none;
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.conversion-preview-v2 img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 1px rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
  animation: imageReveal 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

@keyframes imageReveal {
  0% {
    opacity: 0;
    transform: scale(0.96);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Save badge - cleaner, more intentional */
.conversion-save-badge {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  color: #1a1a1a;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  z-index: 2;
  animation: badgeReveal 0.4s ease 0.6s both;
}

@keyframes badgeReveal {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.conversion-save-badge svg {
  opacity: 0.7;
}

/* Legacy save hint - hidden, replaced by badge */
.conversion-save-hint {
  display: none;
}

/* Content area */
.conversion-content {
  padding: 24px 24px 28px;
  text-align: center;
  background: var(--bg);
}

/* Header with staggered reveal */
.conversion-header {
  margin-bottom: 20px;
}

.conversion-celebration {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
  animation: textReveal 0.4s ease 0.2s both;
}

@keyframes textReveal {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.conversion-message {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
  animation: textReveal 0.4s ease 0.3s both;
}

/* Primary CTA - prominent, confident */
.conversion-cta {
  width: 100%;
  background: var(--primary);
  border: none;
  border-radius: 14px;
  padding: 18px 24px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  animation: ctaReveal 0.4s ease 0.4s both;
  position: relative;
  overflow: hidden;
}

@keyframes ctaReveal {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Shimmer effect on CTA */
.conversion-cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 60%
  );
  transform: translateX(-100%);
  animation: ctaShimmer 2.5s ease-in-out 1s infinite;
}

@keyframes ctaShimmer {
  0% { transform: translateX(-100%); }
  50%, 100% { transform: translateX(100%); }
}

.conversion-cta:hover {
  transform: translateY(-2px);
  background: var(--primary-hover);
  box-shadow:
    0 8px 24px rgba(var(--primary-rgb), 0.35),
    0 4px 12px rgba(var(--primary-rgb), 0.2);
}

.conversion-cta:active {
  transform: translateY(0);
}

.conversion-cta-value {
  font-size: 1.15rem;
  font-weight: 600;
  color: white;
  position: relative;
  z-index: 1;
}

.conversion-cta-subtext {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
}

.conversion-cta-price {
  font-weight: 600;
}

.conversion-cta-unit {
  opacity: 0.9;
}

/* Trust signals - subtle, credible */
.conversion-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--text-dimmed);
  animation: textReveal 0.4s ease 0.5s both;
}

.conversion-trust-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.conversion-trust-item svg {
  color: #f59e0b;
}

.conversion-trust-sep {
  opacity: 0.4;
}

/* One-time CTA - for users who don't want a subscription */
.conversion-onetime-cta {
  width: 100%;
  background: transparent;
  border: none;
  padding: 10px 20px;
  margin-top: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--primary);
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  animation: textReveal 0.4s ease 0.5s both;
  text-decoration: underline;
  text-decoration-color: rgba(139, 124, 246, 0.3);
  text-underline-offset: 3px;
}

.conversion-onetime-cta:hover {
  text-decoration-color: var(--primary);
}

.conversion-onetime-cta:active {
  transform: scale(0.98);
}

/* Secondary CTA */
.conversion-secondary-cta {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 20px;
  margin-top: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  animation: textReveal 0.4s ease 0.55s both;
}

.conversion-secondary-cta:hover {
  background: var(--glow);
  border-color: var(--primary-light);
  color: var(--text);
}

.conversion-secondary-cta:active {
  transform: scale(0.98);
}

/* Legacy elements - hidden in new design */
.conversion-value-anchor,
.conversion-features-inline,
.conversion-social-proof {
  display: none;
}

/* Legacy intro offer styles (kept for backward compatibility) */
.conversion-intro-offer {
  width: 100%;
}

.conversion-cta-intro {
  width: 100%;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: none;
  border-radius: 12px;
  padding: 16px 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.conversion-cta-intro:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
}

.conversion-cta-intro:active {
  transform: translateY(0);
}

.conversion-cta-intro-main {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.conversion-cta-intro-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
}

.conversion-cta-intro-period {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.conversion-cta-intro-details {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
}

.conversion-cta-intro-credits {
  font-weight: 600;
}

.conversion-cta-intro-renewal {
  opacity: 0.9;
}

.conversion-intro-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.conversion-intro-badge {
  background: #dc2626;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.conversion-intro-cancel {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================
   MOBILE: Full-screen cinematic mode
   ============================================ */
@media (max-width: 599px) {
  .conversion-modal-v2 {
    position: fixed;
    inset: 0;
    z-index: 10002;
    max-width: none;
    width: 100%;
    height: 100%;
    max-height: 100dvh;
    border-radius: 0;
    background: var(--bg);
  }

  .conversion-preview-v2 {
    min-height: min(40dvh, 240px);
    max-height: 45dvh;
    flex: 0 1 auto;
    padding: 20px;
  }

  .conversion-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px 24px;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }

  .conversion-header {
    margin-bottom: 16px;
  }

  .conversion-celebration {
    font-size: 1.5rem;
  }

  .conversion-message {
    font-size: 0.9rem;
  }

  .conversion-cta {
    padding: 16px 24px;
  }

  .conversion-trust {
    margin-top: 12px;
  }
}

/* Very small height screens */
@media (max-width: 599px) and (max-height: 600px) {
  .conversion-preview-v2 {
    min-height: 120px;
    max-height: 140px;
    padding: 16px;
  }

  .conversion-content {
    padding: 16px 20px;
  }

  .conversion-header {
    margin-bottom: 12px;
  }

  .conversion-celebration {
    font-size: 1.25rem;
    margin-bottom: 4px;
  }

  .conversion-message {
    font-size: 0.85rem;
  }

  .conversion-cta {
    padding: 14px 20px;
  }

  .conversion-cta-value {
    font-size: 1rem;
  }

  .conversion-trust {
    margin-top: 10px;
  }

  .conversion-secondary-cta {
    padding: 12px 16px;
    margin-top: 10px;
  }
}

.conversion-signup-box {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.05) 100%);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}

.conversion-signup-offer {
  margin-bottom: 16px;
  text-align: center;
}

.conversion-signup-badge {
  display: inline-block;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.conversion-signup-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.conversion-email-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
  margin-bottom: 12px;
  box-sizing: border-box;
}

.conversion-email-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.modal-btn-signup {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
  width: 100%;
  margin-bottom: 0;
}

.modal-btn-signup:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.modal-btn-signup:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.conversion-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.conversion-divider::before,
.conversion-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.conversion-divider span {
  padding: 0 16px;
}

/* ============================================
   LOGIN FORM
   ============================================ */
.login-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-subtle);
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 12px;
}

.login-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--glow);
}

.login-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.user-email {
  text-align: center;
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 20px;
  padding: 12px;
  background: var(--bg-subtle);
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* ============================================
   LOGIN FORM - Enhanced Styling
   ============================================ */
.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: white;
}

.login-form-group {
  margin-bottom: 16px;
}

.login-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.login-footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 16px;
}

/* Email Sent State */
.login-sent {
  text-align: center;
  padding: 20px 0;
}

.login-sent-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--success);
}

.login-sent-email {
  font-weight: 600;
  color: var(--text);
  font-size: 1rem;
  margin: 8px 0 16px;
}

/* ============================================
   ACCOUNT SHEET - Logged In View
   ============================================ */
.account-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.account-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
  flex-shrink: 0;
}

.account-details {
  flex: 1;
  min-width: 0;
}

.account-email {
  font-weight: 500;
  color: var(--text);
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-status {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.account-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.account-action-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s ease;
}

.account-action-card:hover {
  border-color: var(--primary);
  background: var(--glow);
  transform: translateY(-1px);
}

.account-action-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.account-action-text {
  flex: 1;
  min-width: 0;
}

.account-action-title {
  display: block;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
}

.account-action-desc {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.account-action-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
}

.account-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
}

.account-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.account-link:hover {
  color: var(--error);
  background: rgba(239, 68, 68, 0.1);
}

/* Account credits display */
.account-credits {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  margin-bottom: 12px;
}

.account-credits-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.account-credits-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

/* Sheet language section */
.sheet-lang-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.sheet-lang-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.sheet-lang-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ============================================
   FIRST-TIME OFFER BANNER
   ============================================ */
.first-offer-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 16px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 1500;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.first-offer-banner.visible {
  display: flex;
}

.first-offer-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.first-offer-text {
  font-weight: 600;
  font-size: 0.95rem;
}

.first-offer-countdown {
  font-family: monospace;
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 4px 8px;
  border-radius: 4px;
}

.first-offer-btn {
  background: white;
  color: #667eea;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 0.2s;
}

.first-offer-btn:hover {
  transform: scale(1.05);
}

.first-offer-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

/* ============================================
   LANGUAGE SWITCHER
   ============================================ */
.lang-switcher {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.lang-btn:hover {
  border-color: var(--primary);
  background: var(--glow);
  transform: translateY(-1px);
}

.lang-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  min-width: 160px;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  overflow: hidden;
}

.lang-menu.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: block;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
  transition: background 0.1s;
  cursor: pointer;
}

.lang-option:first-child {
  border-radius: 11px 11px 0 0;
}

.lang-option:last-child {
  border-radius: 0 0 11px 11px;
}

.lang-option:hover {
  background: var(--bg-subtle);
}

.lang-option.active {
  background: var(--primary);
  color: white;
}

/* ============================================
   MOBILE RESPONSIVE - Standard phones
   ============================================ */
@media (max-width: 599px) {
  .modal-content {
    padding: 24px 20px;
    max-width: calc(100vw - 40px);
  }

  .modal-stats {
    gap: 24px;
    padding: 14px;
  }

  .modal-stat-value {
    font-size: 1.3rem;
  }

  .bottom-sheet {
    padding: 16px;
    padding-bottom: calc(16px + var(--safe-bottom));
  }

  .pack-info {
    gap: 3px;
  }

  .pack-detail {
    font-size: 0.8rem;
  }
}

/* ============================================
   MOBILE RESPONSIVE - Small screens (iPhone SE)
   ============================================ */
@media (max-width: 375px) {
  .modal-content {
    padding: 20px 16px;
  }

  .credit-pack {
    padding: 14px 12px;
  }

  .quality-toggle {
    gap: 6px;
  }

  .quality-chip {
    padding: 8px 10px;
    font-size: 0.75rem;
  }

  /* Compact buy sheet for small screens (iPhone SE) */
  #buySheet .buy-sheet-title {
    font-size: 1.1rem;
  }

  #buySheet .plan-option {
    padding: 8px 10px;
    gap: 8px;
  }

  #buySheet .plan-radio {
    width: 16px;
    height: 16px;
  }

  #buySheet .plan-name {
    font-size: 0.8rem;
    min-width: 50px;
  }

  #buySheet .plan-credits {
    font-size: 0.7rem;
  }

  #buySheet .plan-price {
    font-size: 0.85rem;
  }

  #buySheet .benefit {
    font-size: 0.65rem;
    padding: 3px 8px;
  }

  .credit-pack {
    padding: 10px 10px;
    margin-bottom: 6px;
  }

  .pack-credits {
    font-size: 0.9rem;
  }

  .pack-detail, .pack-per-edit {
    font-size: 0.7rem;
  }

  .pack-bonus {
    font-size: 0.7rem;
  }

  .pack-price {
    font-size: 1rem;
  }

  .pack-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    top: -7px;
  }

  .pack-trust {
    font-size: 0.7rem; /* Smaller on mobile but still visible */
  }

  .sheet-btn {
    padding: 14px;
    font-size: 0.9rem;
    margin-top: 6px;
    min-height: 48px; /* Touch target minimum */
  }

  .sheet-btn-secondary {
    padding: 10px;
    font-size: 0.85rem;
    min-height: 44px;
  }
}

/* ============================================
   MOBILE RESPONSIVE - Edit card
   ============================================ */
@media (max-width: 480px) {
  .edit-card {
    padding: 10px;
    border-radius: 14px;
  }

  .edit-card-footer {
    flex-wrap: wrap;
    gap: 10px;
  }

  .footer-left {
    width: 100%;
    justify-content: space-between;
  }

  .quality-toggle {
    flex: 1;
    min-width: 0; /* Prevent overflow */
  }

  .toggle-option {
    padding: 10px 14px;
    min-height: 44px;
    font-size: 0.85rem;
  }

  .edit-btn {
    width: 100%;
    padding: 12px 20px;
    justify-content: center;
  }

  .reference-btn {
    padding: 8px 12px;
    min-height: 40px;
  }

  .reference-btn svg {
    width: 18px;
    height: 18px;
  }

  .reference-btn-text {
    font-size: 0.8rem;
  }

  /* Smart recommendation - stack on mobile */
  .smart-recommend {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px;
  }

  .smart-recommend-text {
    font-size: 0.75rem;
  }

  .smart-recommend-btn {
    width: 100%;
    padding: 10px 14px;
    text-align: center;
  }
}

/* ============================================
   MOBILE RESPONSIVE - First offer banner
   ============================================ */
@media (max-width: 600px) {
  .first-offer-banner {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
  }

  .first-offer-text {
    font-size: 0.85rem;
  }
}

/* ============================================
   DESKTOP RESPONSIVE
   ============================================ */
@media (min-width: 900px) {
  /* Bottom sheets - centered */
  .bottom-sheet {
    max-width: 440px;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    border-radius: 20px 20px 0 0;
  }

  .bottom-sheet.visible {
    transform: translateX(-50%) translateY(0);
  }

  /* Buy sheet V9 - Centered lightbox modal on desktop */
  .buy-sheet-v9 {
    max-width: 720px;
    bottom: auto;
    top: 50%;
    border-radius: 24px;
    transform: translateX(-50%) translateY(-50%) scale(0.95);
    opacity: 0;
    pointer-events: none; /* CRITICAL: Don't block clicks when hidden */
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
  }

  .buy-sheet-v9.visible {
    transform: translateX(-50%) translateY(-50%) scale(1);
    opacity: 1;
    pointer-events: auto;
  }

  /* Hover states */
  .btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--glow);
  }

  .btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
  }

  .btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
  }

  .quality-btn:hover:not(.active) {
    border-color: var(--primary);
    color: var(--text);
  }

  .text-link:hover {
    color: var(--primary) !important;
  }

  .credit-pack:hover:not(.selected) {
    border-color: var(--primary-light);
  }
}

/* ============================================
   HERO SHOWCASE - Text left, Video dominant right
   ============================================ */
.hero-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 20px 16px;
  gap: 12px;
}

/* On mobile, flatten the structure to allow reordering */
.hero-left {
  display: contents;
}

.hero-right {
  display: contents;
}

/* Mobile order: title → video → subtitle → button → etc */
.hero-title { order: 1; text-align: center; margin: 0; }
.hero-video { order: 2; width: 100%; margin: 8px 0; }
.hero-subtitle { order: 3; text-align: center; max-width: 360px; margin: 0 0 4px; }
.hero-upload-btn { order: 4; }
.hero-free-hint { order: 5; margin: 4px 0 0; }
.hero-proof { order: 6; margin-top: 8px; }
.hero-tags-waterfall { order: 7; display: none; } /* Hide on mobile for cleaner look */

.hero-video {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border);
}

/* Waterfall tags under video */
.hero-tags-waterfall {
  position: relative;
  height: 100px;
  margin-top: 12px;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, black 0%, black 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 40%, transparent 100%);
}

.waterfall-tag {
  position: absolute;
  top: -5px;
  padding: 5px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  animation: waterfallDrop var(--fall-duration, 1.8s) linear forwards;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

@keyframes waterfallDrop {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  5% {
    opacity: 0.9;
  }
  60% {
    opacity: 0.9;
  }
  100% {
    transform: translateY(110px);
    opacity: 0;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: rgba(139, 124, 246, 0.06);
  border: 1px solid rgba(139, 124, 246, 0.12);
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--primary);
  letter-spacing: 0.01em;
}

.hero-badge svg {
  width: 12px;
  height: 12px;
}

.hero-title {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
  max-width: 360px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 2px;
}

.hero-tag {
  padding: 5px 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.hero-upload-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  box-shadow: 0 4px 16px rgba(139, 124, 246, 0.3);
  margin-top: 8px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.hero-upload-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 124, 246, 0.4);
}

.hero-upload-btn:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 2px 8px rgba(139, 124, 246, 0.3);
}

.hero-upload-btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

.hero-upload-btn.loading .upload-icon {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-upload-btn .upload-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.hero-free-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.hero-proof {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.hero-avatars {
  display: flex;
}

.hero-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  margin-left: -6px;
  border: 2px solid var(--bg);
}

.hero-avatar:first-child {
  margin-left: 0;
}

.hero-proof-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Desktop hero - aligned with nav, video dominant */
@media (min-width: 900px) {
  .hero-showcase {
    flex-direction: row;
    align-items: flex-start;
    padding: 32px 24px;
    gap: 40px;
    max-width: none;
  }

  /* Restore container behavior on desktop */
  .hero-left {
    display: flex;
    flex-direction: column;
    flex: 0 0 280px;
    max-width: 280px;
    align-items: flex-start;
    text-align: left;
    gap: 14px;
    padding-top: 8px;
  }

  .hero-right {
    display: block;
    flex: 1;
  }

  /* Reset order and mobile styles on desktop */
  .hero-title,
  .hero-video,
  .hero-subtitle,
  .hero-upload-btn,
  .hero-free-hint,
  .hero-proof,
  .hero-tags-waterfall {
    order: unset;
    margin: 0;
  }

  .hero-title {
    font-size: 2rem;
    text-align: left;
  }

  .hero-subtitle {
    font-size: 0.95rem;
    max-width: none;
    text-align: left;
  }

  .hero-video {
    width: 100%;
    margin: 0;
  }

  .hero-tags-waterfall {
    display: block;
    margin-top: 20px;
  }

  .hero-proof {
    margin-top: 2px;
  }

  .hero-upload-btn {
    padding: 14px 28px;
    font-size: 1rem;
  }
}

/* Large desktop */
@media (min-width: 1100px) {
  .hero-showcase {
    padding: 40px 24px;
    gap: 56px;
  }

  .hero-left {
    flex: 0 0 320px;
    max-width: 320px;
  }

  .hero-title {
    font-size: 2.35rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }
}

/* Extra large desktop */
@media (min-width: 1400px) {
  .hero-showcase {
    padding: 48px 24px;
    gap: 72px;
  }

  .hero-left {
    flex: 0 0 380px;
    max-width: 380px;
  }

  .hero-title {
    font-size: 2.65rem;
  }
}

/* ============================================
   VIDEO SHOWCASE SECTION (legacy, below fold)
   ============================================ */
.showcase-section {
  margin: 32px 0;
  text-align: center;
}

.showcase-video {
  width: 100%;
  max-width: 720px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.showcase-tagline {
  margin-top: 20px;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

/* ============================================
   TRUST BAR
   ============================================ */
.trust-bar {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin: 32px 0;
  padding: 20px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.trust-item svg {
  color: var(--primary);
  flex-shrink: 0;
}

/* ============================================
   SOCIAL PROOF
   ============================================ */
.social-proof {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 24px 0 40px;
}

/* Mobile responsive */
@media (max-width: 600px) {
  .showcase-tagline {
    font-size: 1.1rem;
  }

  .trust-bar {
    gap: 16px;
    padding: 16px;
  }

  .trust-item {
    font-size: 0.8rem;
  }

  .trust-item svg {
    width: 18px;
    height: 18px;
  }
}

/* ============================================
   HERO - CLEAN MINIMAL
   ============================================ */
.hero-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* ============================================
   BELOW FOLD - PREMIUM
   ============================================ */

/* Value Strip */
.value-strip {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 24px 20px;
  flex-wrap: wrap;
}

.value-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.value-item svg {
  color: #22c55e;
  flex-shrink: 0;
}

/* Testimonial Card */
.testimonial-card {
  max-width: 480px;
  margin: 0 auto 48px;
  padding: 0 20px;
}

.testimonial-content {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.04);
}

.quote-icon {
  position: absolute;
  top: 16px;
  right: 20px;
  color: var(--primary);
}

.testimonial-content .testimonial-quote {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  margin: 0 0 16px 0;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, #7c6fe0 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.author-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.author-detail {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 32px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px 0;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}

/* Features Section */
.features-section {
  max-width: 800px;
  margin: 0 auto 56px;
  padding: 0 20px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 500px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 16px;
  text-align: center;
  transition: all 0.2s ease;
  position: relative;
}

.feature-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 124, 246, 0.1);
}

.feature-card.featured {
  border-color: var(--primary-light);
  background: linear-gradient(to bottom, rgba(139, 124, 246, 0.05), transparent);
}

.feature-icon-wrap {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  border-radius: 12px;
  color: var(--text-muted);
}

.feature-icon-wrap.quick {
  background: rgba(251, 191, 36, 0.1);
  color: #f59e0b;
}

.feature-icon-wrap.smart {
  background: rgba(139, 124, 246, 0.1);
  color: var(--primary);
}

.feature-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 6px 0;
}

.feature-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.feature-tag {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 100px;
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.feature-tag.smart {
  background: rgba(139, 124, 246, 0.1);
  color: var(--primary);
}

/* FAQ Section */
.faq-section {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.faq-item summary {
  padding: 16px 0;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--border);
}

.faq-item[open] summary {
  border-bottom-color: transparent;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary svg {
  flex-shrink: 0;
  opacity: 0.3;
  transition: transform 0.2s ease;
}

.faq-item[open] summary svg {
  transform: rotate(180deg);
}

.faq-item p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
  padding-bottom: 16px;
  line-height: 1.5;
  border-bottom: 1px solid var(--border);
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .value-strip {
    gap: 16px;
    padding: 20px 16px;
  }

  .value-item {
    font-size: 0.85rem;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .testimonial-content {
    padding: 20px;
  }

  .testimonial-content .testimonial-quote {
    font-size: 1rem;
  }
}

.faq-item-minimal p {
  margin: 12px 0 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================
   TESTIMONIALS
   ============================================ */
.testimonials-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 32px 0;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.testimonial {
  background: var(--bg-subtle);
  border-radius: 12px;
  padding: 20px;
  border-left: 3px solid var(--primary);
}

.testimonial-text {
  font-size: 0.95rem;
  color: var(--text);
  margin: 0 0 12px 0;
  font-style: italic;
  line-height: 1.5;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.testimonial-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
}

.testimonial-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .testimonials-section {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   TRUST SECTION
   ============================================ */
.trust-section {
  margin: 32px 0;
  text-align: center;
}

.trust-badges {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.trust-badge svg {
  color: var(--primary);
  flex-shrink: 0;
}

/* ============================================
   USE CASES UPGRADED
   ============================================ */
.use-case-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 4px;
}

/* ============================================
   FINAL CTA
   ============================================ */
.final-cta {
  text-align: center;
  margin: 40px 0 20px;
}

.final-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(139, 124, 246, 0.3);
}

.final-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(139, 124, 246, 0.4);
}

/* ============================================
   HOW IT WORKS SECTION
   ============================================ */
.how-it-works {
  text-align: center;
  margin: 40px 0 32px;
}

.how-it-works h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
}

.steps-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-text {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
}

.step-arrow {
  color: var(--text-muted);
  font-size: 1.5rem;
  opacity: 0.5;
}

/* ============================================
   USE CASES SECTION
   ============================================ */
.use-cases-section {
  text-align: center;
  margin: 32px 0;
}

.use-cases-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
}

.use-case {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-subtle);
  border-radius: 10px;
  text-align: left;
}

.use-case-icon {
  font-size: 1.2rem;
}

.use-case-text {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.3;
}

@media (max-width: 600px) {
  .use-cases-grid {
    grid-template-columns: 1fr 1fr;
  }

  .step-arrow {
    display: none;
  }

  .steps-row {
    gap: 12px;
  }
}

/* ============================================
   SOCIAL PROOF SECTION
   ============================================ */
.social-proof-section {
  text-align: center;
  margin: 32px 0;
  padding: 20px;
}

.social-proof-text {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ============================================
   LEGACY - QUICK VS SMART COMPARISON SECTION
   (keeping for backwards compat with pSEO pages)
   ============================================ */
.standard-vs-pro {
  margin: 48px 0;
  padding: 32px;
  background: var(--bg-subtle);
  border-radius: 20px;
  text-align: center;
}

.standard-vs-pro h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
}

/* Mode showcase - side by side cards */
.comparison-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 720px;
  margin: 0 auto;
}

.mode-showcase {
  background: var(--bg);
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid var(--border);
  transition: border-color 0.2s ease, transform 0.2s ease;
  text-align: left;
}

.mode-showcase:hover {
  transform: translateY(-2px);
}

.mode-showcase.smart {
  border-color: var(--primary);
}

.mode-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-subtle);
}

.mode-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.mode-showcase.smart .mode-name {
  color: var(--primary);
}

.mode-cost {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.mode-showcase img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.mode-prompt {
  padding: 14px 16px;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text);
  background: var(--bg);
  border-top: 1px solid var(--border);
  line-height: 1.4;
}

.mode-best-for {
  padding: 10px 16px 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.mode-showcase.smart .mode-best-for {
  color: var(--primary);
}

/* Mobile responsive */
@media (max-width: 600px) {
  .standard-vs-pro {
    margin: 32px 0;
    padding: 20px;
  }

  .standard-vs-pro h3 {
    font-size: 1.25rem;
  }

  .comparison-modes {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .mode-prompt {
    font-size: 0.85rem;
    padding: 12px 14px;
  }
}


/* ============================================
   PRICING SECTION - Homepage pricing cards
   ============================================ */
.pricing-section {
  padding: 80px 24px;
  background: linear-gradient(180deg, var(--bg) 0%, #f8f7ff 100%);
}

.pricing-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.pricing-header {
  text-align: center;
  margin-bottom: 48px;
}

.pricing-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 12px 0;
  letter-spacing: -0.03em;
}

.pricing-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0 0 16px 0;
}

.pricing-free-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 16px;
  background: rgba(139, 124, 246, 0.08);
  border-radius: 100px;
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
}

.free-note-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.free-note-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--primary);
  fill: rgba(139, 124, 246, 0.2);
}

.pricing-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.pricing-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.2s ease;
}

.pricing-card:hover {
  border-color: var(--text-dimmed);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.pricing-card-popular {
  border-color: var(--primary);
  background: linear-gradient(180deg, rgba(139, 124, 246, 0.04) 0%, #fff 100%);
  box-shadow: 0 4px 20px rgba(139, 124, 246, 0.15);
}

.pricing-card-popular:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 32px rgba(139, 124, 246, 0.25);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.pricing-card-free {
  background: #fafafa;
  border-style: dashed;
}

.pricing-card-header {
  text-align: center;
  margin-bottom: 16px;
}

.pricing-plan-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.pricing-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}

.pricing-amount {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.pricing-period {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.pricing-credits {
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.credits-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.02em;
}

.credits-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
}

.pricing-per-edit {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dimmed);
  font-weight: 500;
  margin-bottom: 16px;
}

.pricing-card-popular .pricing-per-edit {
  color: var(--primary);
  font-weight: 600;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  flex: 1;
}

.pricing-features li {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 4px 0;
}

.pricing-cta {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--primary);
  color: white;
}

.pricing-cta:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 124, 246, 0.3);
}

.pricing-cta-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.pricing-cta-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--text-dimmed);
  box-shadow: none;
}

.pricing-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  max-width: 600px;
  margin: 0 auto;
}

/* Pay As You Go Section */
.payg-section {
  margin-top: 40px;
  margin-bottom: 24px;
  text-align: center;
}

.payg-header {
  margin-bottom: 16px;
}

.payg-title {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.payg-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.payg-options {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.payg-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 24px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 120px;
}

.payg-option:hover {
  border-color: var(--text-dimmed);
  transform: translateY(-2px);
}

.payg-option-best {
  border-color: var(--primary);
  background: rgba(139, 124, 246, 0.05);
}

.payg-option-best:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(139, 124, 246, 0.2);
}

.payg-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  white-space: nowrap;
}

.payg-credits {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.payg-price {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

@media (max-width: 480px) {
  .payg-options {
    gap: 8px;
  }

  .payg-option {
    padding: 14px 16px;
    min-width: 100px;
  }

  .payg-credits {
    font-size: 0.9rem;
  }

  .payg-price {
    font-size: 0.8rem;
  }
}

/* Tablet: 2x2 grid */
@media (max-width: 1024px) {
  .pricing-cards {
    grid-template-columns: repeat(2, 1fr);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Mobile: Stack vertically, show popular first */
@media (max-width: 768px) {
  .pricing-section {
    padding: 60px 16px;
  }

  .pricing-title {
    font-size: 1.75rem;
  }

  .pricing-subtitle {
    font-size: 1rem;
  }

  .pricing-free-note {
    font-size: 0.85rem;
    padding: 6px 12px;
  }

  .pricing-cards {
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 400px;
    margin: 0 auto 24px;
  }

  /* Reorder: Popular first on mobile */
  .pricing-card-popular {
    order: -1;
  }

  .pricing-card {
    padding: 20px 16px;
  }

  .credits-number {
    font-size: 2rem;
  }

  .pricing-amount {
    font-size: 1.75rem;
  }

  .pricing-features li {
    font-size: 0.85rem;
    padding: 6px 0;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .pricing-section {
    padding: 48px 12px;
  }

  .pricing-header {
    margin-bottom: 32px;
  }

  .pricing-title {
    font-size: 1.5rem;
  }
}

/* ============================================
   POST-EDIT OVERLAY - Floating action buttons
   REMOVED: Redundant with bottom action bar (result-actions)
   The bottom bar provides Save/Share/Add Photo/New functionality
   ============================================ */
.post-edit-overlay {
  display: none !important; /* Hidden - use bottom action bar instead */
}

.post-edit-actions {
  display: flex;
  flex-direction: row;
  gap: 12px;
  padding: 16px;
  align-items: flex-end;
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
}

.post-edit-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-radius: 14px;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  color: #1f2937;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.post-edit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.post-edit-btn:active {
  transform: scale(0.95);
}

/* Primary button (Download) - prominent styling with pulse */
.post-edit-btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  color: white;
  padding: 14px 20px;
  box-shadow: 0 4px 20px rgba(139, 124, 246, 0.4);
  animation: post-edit-pulse 2s ease-in-out infinite;
}

.post-edit-btn-primary:hover {
  box-shadow: 0 6px 28px rgba(139, 124, 246, 0.5);
  animation: none;
}

.post-edit-btn-primary svg {
  stroke: white;
}

/* Pulse animation to draw attention */
@keyframes post-edit-pulse {
  0%, 100% {
    box-shadow: 0 4px 20px rgba(139, 124, 246, 0.4);
  }
  50% {
    box-shadow: 0 4px 30px rgba(139, 124, 246, 0.6), 0 0 0 8px rgba(139, 124, 246, 0.15);
  }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .post-edit-actions {
    bottom: 12px;
    gap: 10px;
    padding: 12px;
  }

  .post-edit-btn {
    padding: 10px 14px;
    font-size: 0.75rem;
    border-radius: 12px;
  }

  .post-edit-btn-primary {
    padding: 12px 18px;
  }

  .post-edit-btn span {
    display: none; /* Hide labels on mobile, show only icons */
  }

  .post-edit-btn {
    flex-direction: row;
    width: 48px;
    height: 48px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .post-edit-btn-primary {
    width: 56px;
    height: 56px;
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .post-edit-actions {
    bottom: 8px;
    gap: 8px;
  }

  .post-edit-btn {
    width: 44px;
    height: 44px;
  }

  .post-edit-btn svg {
    width: 18px;
    height: 18px;
  }

  .post-edit-btn-primary {
    width: 52px;
    height: 52px;
  }

  .post-edit-btn-primary svg {
    width: 20px;
    height: 20px;
  }
}

/* ============================================
   CELEBRATION CONFETTI - Post-edit dopamine hit
   ============================================ */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-10px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Edit complete success badge */
.edit-success-badge {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  color: white;
  padding: 16px 28px;
  border-radius: 16px;
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 8px 32px rgba(139, 124, 246, 0.4);
  z-index: 10000;
  pointer-events: none;
  animation: success-badge-pop 2s ease-out forwards;
  display: flex;
  align-items: center;
  gap: 10px;
}

.edit-success-badge svg {
  width: 24px;
  height: 24px;
}

@keyframes success-badge-pop {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  15% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
  }
  25% {
    transform: translate(-50%, -50%) scale(1);
  }
  80% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
  }
}
/* ============================================
   BUY SHEET V7 - Clean, High-Converting Design
   Mobile-first, vertical stack, clear hierarchy
   ============================================ */

.buy-sheet-v7 {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 95dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  padding: 12px 20px 0;
  transform: translateY(100%);
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s 0.3s;
  z-index: 10002; /* Above GDPR banner (9999) and sheet-overlay (10001) */
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.15);
  touch-action: pan-y;
}

/* Scrollable content area */
.buy-sheet-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}

/* Sticky footer with CTA */
.buy-sheet-footer {
  flex-shrink: 0;
  padding: 12px 0 calc(16px + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.buy-sheet-v7.visible {
  transform: translateY(0);
  visibility: visible;
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s 0s;
}

/* Sheet handle - larger touch target */
.buy-sheet-v7 .sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 16px;
  /* Larger touch area without changing visual size */
  padding: 12px 32px;
  margin-top: -12px;
  background-clip: content-box;
  cursor: grab;
  touch-action: pan-y;
}

/* Close button */
.buy-sheet-v7 .buy-sheet-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 0.1s, color 0.1s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.buy-sheet-v7 .buy-sheet-close:hover {
  background: var(--bg-secondary);
  color: var(--text);
}

.buy-sheet-v7 .buy-sheet-close:active {
  transform: scale(0.9);
  background: var(--bg-secondary);
}

/* Header */
.buy-header-v7 {
  text-align: center;
  margin-bottom: 12px;
  padding-left: 44px;
  padding-right: 44px; /* Balance for close button */
}

/* Header icon - lightning bolt style */
.header-icon {
  width: 48px;
  height: 48px;
  background: rgba(139, 124, 246, 0.1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  color: var(--primary);
}

.header-icon svg {
  width: 24px;
  height: 24px;
}

.buy-title-v7 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.buy-subtitle-v7 {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.buy-social-proof-v7 {
  font-size: 0.8rem;
  color: var(--text-dimmed);
  margin: 6px 0 0 0;
}

/* Image Preview - shown when user has an edit waiting */
.buy-preview-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 14px;
}

.buy-preview-img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.buy-preview-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

/* Benefits */
.buy-benefits {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.03) 100%);
  border-radius: 10px;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text);
}

.benefit-item svg {
  flex-shrink: 0;
  stroke: #10b981;
}

/* ============================================
   INTRO OFFER COMPONENT - Centralized styles
   Variants: card, banner, inline
   ============================================ */

/* Card variant (buy sheet, standalone) */
.intro-offer-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #f59e0b;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}

.intro-offer-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.3) 50%, transparent 60%);
  animation: shimmer 3s ease-in-out infinite;
}

.intro-offer-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.intro-offer-card.urgent {
  animation: pulse-urgent 1s ease-in-out infinite;
  border-color: #dc2626;
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.intro-offer-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: #f59e0b;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 6px;
  text-transform: uppercase;
  z-index: 1;
}

.intro-offer-card.urgent .intro-offer-badge {
  background: #dc2626;
}

.intro-offer-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  z-index: 1;
}

.intro-offer-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.intro-offer-price-amount {
  font-size: 1.25rem;
  font-weight: 800;
  color: #92400e;
}

.intro-offer-price-period {
  font-size: 0.9rem;
  font-weight: 600;
  color: #92400e;
}

.intro-offer-renewal {
  font-size: 0.8rem;
  color: #78716c;
}

.intro-offer-meta {
  font-size: 0.8rem;
  color: #78350f;
}

.intro-offer-meta .intro-offer-credits {
  font-weight: 600;
}

.intro-offer-meta .intro-offer-cancel {
  opacity: 0.7;
}

.intro-offer-meta .intro-offer-credits::after {
  content: ' · ';
}

.intro-offer-timer {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: rgba(120, 53, 15, 0.1);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #78350f;
  flex-shrink: 0;
  z-index: 1;
}

/* Banner variant (editor, compact) */
.intro-offer-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1.5px solid #f59e0b;
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}

.intro-offer-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.3) 50%, transparent 60%);
  animation: shimmer 3s ease-in-out infinite;
}

.intro-offer-banner:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.intro-offer-banner.urgent {
  animation: pulse-urgent 1s ease-in-out infinite;
  border-color: #dc2626;
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.intro-offer-banner-icon {
  font-size: 1.1rem;
  z-index: 1;
}

.intro-offer-banner-text {
  font-size: 0.9rem;
  color: #92400e;
  font-weight: 500;
  z-index: 1;
}

.intro-offer-banner-text strong {
  font-weight: 700;
  color: #78350f;
}

.intro-offer-banner-badge {
  padding: 2px 6px;
  background: #f59e0b;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 4px;
  z-index: 1;
}

.intro-offer-banner.urgent .intro-offer-banner-badge {
  background: #dc2626;
}

.intro-offer-banner-timer {
  padding: 4px 10px;
  background: rgba(120, 53, 15, 0.1);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #78350f;
  margin-left: auto;
  z-index: 1;
}

/* Inline CTA variant (conversion modal) */
.intro-offer-inline {
  width: 100%;
}

.intro-offer-cta {
  width: 100%;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: none;
  border-radius: 12px;
  padding: 16px 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.intro-offer-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
}

.intro-offer-cta-main {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.intro-offer-cta-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
}

.intro-offer-cta-period {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.intro-offer-cta-details {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
}

.intro-offer-cta-credits {
  font-weight: 600;
}

.intro-offer-cta-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.intro-offer-badge-discount {
  background: #dc2626;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.intro-offer-cta-cancel {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Dark mode for intro offer */
@media (prefers-color-scheme: dark) {
  .intro-offer-card,
  .intro-offer-banner {
    background: linear-gradient(135deg, #422006 0%, #78350f 100%);
    border-color: #f59e0b;
  }

  .intro-offer-price-amount,
  .intro-offer-price-period,
  .intro-offer-banner-text,
  .intro-offer-banner-text strong {
    color: #fcd34d;
  }

  .intro-offer-renewal {
    color: #d6d3d1;
  }

  .intro-offer-meta {
    color: #fef3c7;
  }

  .intro-offer-timer,
  .intro-offer-banner-timer {
    background: rgba(252, 211, 77, 0.15);
    color: #fcd34d;
  }

  .intro-offer-card.urgent,
  .intro-offer-banner.urgent {
    background: linear-gradient(135deg, #450a0a 0%, #7f1d1d 100%);
    border-color: #dc2626;
  }
}

/* ============================================
   Editor Exploding Offer - Compact banner in editor
   ============================================ */

.editor-exploding-offer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #f59e0b;
  border-radius: 10px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.editor-exploding-offer::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 70%
  );
  animation: shimmer 3s ease-in-out infinite;
}

.editor-exploding-offer:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.editor-exploding-offer.urgent {
  animation: pulse-urgent 1s ease-in-out infinite;
  border-color: #dc2626;
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.editor-offer-content {
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1;
}

.editor-offer-icon {
  font-size: 1.1rem;
}

.editor-offer-text {
  font-size: 0.9rem;
  color: #92400e;
  font-weight: 500;
}

.editor-offer-text strong {
  font-weight: 700;
  color: #78350f;
}

.editor-offer-badge {
  padding: 2px 6px;
  background: #f59e0b;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 4px;
}

.editor-exploding-offer.urgent .editor-offer-badge {
  background: #dc2626;
}

.editor-offer-timer {
  display: flex;
  align-items: center;
  padding: 4px 10px;
  background: rgba(245, 158, 11, 0.15);
  border-radius: 6px;
  font-family: var(--font-mono, monospace);
  font-size: 0.85rem;
  font-weight: 600;
  color: #b45309;
  z-index: 1;
}

.editor-exploding-offer.urgent .editor-offer-timer {
  background: rgba(220, 38, 38, 0.15);
  color: #dc2626;
}

/* Plan cards - vertical stack */
.buy-plans-v7,
.buy-packs-v7 {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

/* Pack expiry note */
.pack-expiry-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 8px 0 0;
  opacity: 0.8;
}

/* CTA Button */
.buy-cta-v7 {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  /* Direct text styling - JS may set innerHTML directly */
  color: white;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.buy-cta-v7:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.buy-cta-v7:active {
  transform: translateY(0);
}

.buy-cta-v7 .cta-text {
  font-size: 1rem;
  font-weight: 600;
  color: white;
}

.buy-cta-v7 .cta-price {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
}

/* Trust signals */
.buy-trust,
.buy-trust-v7 {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.buy-trust .trust-item {
  font-size: 0.75rem;
  gap: 4px;
}

.buy-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.buy-trust-item svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.buy-trust-sep {
  color: var(--text-dimmed);
}

/* Sign-in link for returning users */
.buy-signin-link {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  text-align: center;
}

.buy-signin-link:hover {
  color: var(--primary);
}

/* Hide sign-in link when logged in (populated by JS) */
.buy-signin-link.hidden {
  display: none;
}

/* Desktop: wider sheet, centered */
@media (min-width: 600px) {
  .buy-sheet-v7 {
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    max-width: 420px;
    border-radius: 20px;
    bottom: 20px;
    /* visibility inherited from base rule */
  }

  .buy-sheet-v7.visible {
    transform: translateX(-50%) translateY(0);
    /* visibility inherited from base .visible rule */
  }

  .buy-header-v7 {
    padding-left: 0;
    padding-right: 0;
  }
}

/* ============================================
   New Buy Sheet: Pack Cards + Subscription Row
   ============================================ */

/* Value Anchor Header */
.buy-value-anchor {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 4px;
  line-height: 1.4;
}

.buy-social-proof {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 4px 0 0;
}

.buy-ppp-badge {
  font-size: 0.75rem;
  color: #065f46;
  font-weight: 600;
  margin: 8px 0 0;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(52, 211, 153, 0.25));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 100px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.buy-ppp-badge::before {
  content: '🎉';
  font-size: 0.85rem;
}

/* Pack Cards Grid (2 columns) */
.buy-packs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.pack-card,
.option-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 14px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Default card - light purple tint */
.pack-card,
.option-card {
  background: rgba(139, 124, 246, 0.06);
  border-color: rgba(139, 124, 246, 0.2);
}

.pack-card:hover,
.option-card:hover {
  border-color: var(--primary);
  background: rgba(139, 124, 246, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 124, 246, 0.15);
}

.pack-card:active,
.option-card:active {
  transform: scale(0.98);
  border-color: var(--primary);
}

/* Best Value card - green tint (overrides purple) */
.pack-card-best {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.3);
}

.pack-card-best:hover {
  border-color: var(--success);
  background: rgba(52, 211, 153, 0.15);
  box-shadow: 0 4px 12px rgba(52, 211, 153, 0.2);
}

.pack-card-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  background: var(--success);
  color: #065f46;
  font-size: 9px;
  font-weight: 700;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.pack-card-header {
  margin-bottom: 8px;
}

.pack-card-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.pack-card-price {
  margin-bottom: 8px;
}

.pack-card-amount {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 2px;
}

.pack-card-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
}

.pack-card-per-edit {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pack-card-savings {
  font-size: 0.7rem;
  font-weight: 600;
  color: #059669;
}

.pack-card-best .pack-card-savings {
  color: #059669;
  font-weight: 600;
}

.pack-card-cta,
.card-cta {
  width: 100%;
  margin-top: 14px;
  padding: 10px 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.pack-card:hover .pack-card-cta,
.option-card:hover .card-cta {
  background: var(--primary-hover);
}

.pack-card-best .pack-card-cta,
.pack-card-best .card-cta {
  background: #059669;
}

.pack-card-best:hover .pack-card-cta,
.pack-card-best:hover .card-cta {
  background: #047857;
}

/* Card badge - absolute positioned pill */
.card-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--success);
  color: #065f46;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  white-space: nowrap;
  z-index: 1;
}

/* Alias for elevated design compatibility */
.card-best {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.3);
}

.card-best:hover {
  border-color: var(--success);
  background: rgba(52, 211, 153, 0.15);
  box-shadow: 0 4px 12px rgba(52, 211, 153, 0.2);
}

.card-best .card-cta,
.card-best .pack-card-cta {
  background: #059669;
}

.card-best:hover .card-cta,
.card-best:hover .pack-card-cta {
  background: #047857;
}

/* Subscription Divider */
.buy-sub-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.buy-sub-divider-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.buy-sub-divider-text {
  font-size: 0.8rem;
  color: var(--text-dimmed);
  white-space: nowrap;
}

/* Subscription Card - Matches pack card style */
.sub-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 20px 16px;
  background: rgba(56, 189, 248, 0.08);
  border: 2px solid rgba(56, 189, 248, 0.25);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 16px;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.sub-card:hover {
  border-color: var(--accent);
  background: rgba(56, 189, 248, 0.12);
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.2);
  transform: translateY(-2px);
}

.sub-card:active {
  transform: scale(0.98);
  border-color: var(--accent);
}

.sub-card .sub-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #0c4a6e;
  font-size: 9px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sub-quantity {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-top: 8px;
}

.sub-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 2px;
}

.sub-price-small {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 8px;
}

.sub-price-small span {
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.8;
}

.sub-unit {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.sub-cta {
  width: 100%;
  margin-top: 14px;
  padding: 10px 16px;
  background: #0ea5e9;
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 10px;
  transition: all 0.15s;
}

.sub-card:hover .sub-cta {
  background: #0284c7;
}

/* Legacy sub-row styles for backward compatibility */
.sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  background: rgba(56, 189, 248, 0.1);
  border: 2px solid rgba(56, 189, 248, 0.25);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 16px;
  text-align: left;
}

.sub-row:hover {
  border-color: var(--accent);
  background: rgba(56, 189, 248, 0.15);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.15);
}

.sub-row:active {
  transform: scale(0.98);
  border-color: var(--accent);
}

.sub-row-left,
.sub-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sub-row-icon,
.sub-icon {
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.sub-row-icon svg,
.sub-icon svg {
  width: 20px;
  height: 20px;
}

.sub-row-info,
.sub-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sub-row-name,
.sub-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.sub-row-badge,
.sub-badge {
  font-size: 9px;
  font-weight: 700;
  background: var(--accent);
  color: #0c4a6e;
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: 0.05em;
}

.sub-row-details,
.sub-details {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.sub-row-right,
.sub-right {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: right;
}

.sub-row-pricing,
.sub-pricing {
  display: flex;
  flex-direction: column;
}

.sub-row-price,
.sub-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.sub-row-period,
.sub-period {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.sub-row-arrow,
.sub-arrow {
  color: var(--text-dimmed);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.sub-row-arrow svg,
.sub-arrow svg {
  width: 16px;
  height: 16px;
}

.sub-row:hover .sub-row-arrow,
.sub-card:hover .sub-arrow {
  transform: translateX(2px);
  color: var(--accent);
}

/* Legacy sub-row classes for backward compatibility */
.sub-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.sub-row-edits {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.sub-row-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sub-row-per-edit {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.sub-row-cancel {
  font-size: 0.8rem;
  color: var(--text-dimmed);
}

/* Feature List - Horizontal pill layout */
.buy-features,
.features-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
  padding: 0 24px;
}

.buy-feature-item,
.feature-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.buy-feature-item svg,
.feature-pill svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  stroke: var(--primary);
}

.buy-smart-note {
  font-size: 0.8rem;
  color: var(--text-dimmed);
  margin: 8px 0 0;
  padding-left: 24px;
}

/* Premium Perks Section - Elevated design */
.premium-perks-section {
  margin: 16px 0 8px;
  padding: 16px 18px;
  background: linear-gradient(145deg, rgba(139, 124, 246, 0.06) 0%, rgba(99, 102, 241, 0.03) 100%);
  border: 1px solid rgba(139, 124, 246, 0.12);
  border-radius: 14px;
  position: relative;
}

.perks-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.perks-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: linear-gradient(135deg, #8B7CF6 0%, #7C3AED 100%);
  border-radius: 6px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: white;
  text-transform: uppercase;
  box-shadow: 0 2px 8px -2px rgba(139, 124, 246, 0.4);
}

.perks-title {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: -0.01em;
}

.perks-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  justify-content: flex-start;
}

.perk-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 8px;
  background: rgba(139, 124, 246, 0.08);
  border-radius: 8px;
  transition: background 0.2s ease;
}

.perk-item:hover {
  background: rgba(139, 124, 246, 0.12);
}

.perk-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.perk-icon svg {
  width: 14px;
  height: 14px;
  stroke: #A78BFA;
  stroke-width: 2.5;
}

.perk-text {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1;
  white-space: nowrap;
}

/* Highlight perk - "Credits never expire" */
.perk-item-highlight {
  background: linear-gradient(135deg, rgba(139, 124, 246, 0.15) 0%, rgba(167, 139, 250, 0.1) 100%);
  border: 1px solid rgba(139, 124, 246, 0.2);
}

.perk-item-highlight .perk-icon svg {
  stroke: #A78BFA;
}

.perk-item-highlight .perk-text {
  color: #C4B5FD;
  font-weight: 600;
}

/* Elevated Buysheet v4 - Header */
.buy-header-v7 .sheet-headline {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* Step 2 headline - slightly smaller */
#buySheetStep2 .sheet-headline {
  font-size: 1.15rem;
  margin-bottom: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.buy-header-v7 .sheet-subline {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* ============================================
   UNIFIED PRICING CARD ELEMENTS
   Consistent styling across buy sheet & homepage
   ============================================ */

/* Quantity - the big number (20, 60, 80) */
.pack-card .card-quantity,
.pricing-card .pricing-card-qty {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text);
}

/* Label - "edits" or "edits/mo" */
.pack-card .card-label,
.pricing-card .pricing-card-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

/* Price row - contains original + current price */
.pack-card .card-price-row,
.pricing-card .pricing-card-price-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 4px;
}

/* Original price - strikethrough (hidden by default, shown with PPP) */
.pack-card .card-price-original,
.pricing-card .pricing-card-original {
  display: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dimmed);
  text-decoration: line-through;
}

.pack-card .card-price-original.visible,
.pricing-card .pricing-card-original.visible {
  display: inline;
}

/* Current price */
.pack-card .card-price,
.pricing-card .pricing-card-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

/* Price suffix (/mo) */
.pack-card .card-price-suffix,
.pricing-card .pricing-card-suffix {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Per-edit unit price */
.pack-card .card-unit,
.pricing-card .pricing-card-unit {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* Best value card - green accent for unit */
.pack-card-best .card-unit,
.pricing-card--best .pricing-card-unit {
  color: #059669;
  font-weight: 600;
}

/* Subscription card styling - blue accent */
.pack-card-sub {
  background: rgba(14, 165, 233, 0.08) !important;
  border-color: rgba(14, 165, 233, 0.25) !important;
}

.pack-card-sub:hover {
  border-color: #0ea5e9 !important;
  background: rgba(14, 165, 233, 0.12) !important;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15) !important;
}

.pack-card-sub .card-cta {
  background: #0ea5e9;
}

.pack-card-sub:hover .card-cta {
  background: #0284c7;
}

/* Subscription badge - blue */
.card-badge-sub {
  background: #0ea5e9 !important;
  color: white !important;
}

/* Homepage subscription card */
.pricing-card--sub {
  background: rgba(14, 165, 233, 0.08);
  border-color: rgba(14, 165, 233, 0.25);
}

.pricing-card--sub:hover {
  border-color: #0ea5e9;
  background: rgba(14, 165, 233, 0.12);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
}

.pricing-card-badge--sub {
  background: #0ea5e9 !important;
  color: white !important;
}

/* PPP discount highlight - pulse the price when discounted */
.pack-card .card-price.ppp-discounted,
.pricing-card .pricing-card-price.ppp-discounted {
  color: #059669;
  animation: ppp-pulse 0.6s ease-out;
}

@keyframes ppp-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Elevated Buysheet v4 - Trust Row */
.buy-sheet-footer .trust-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 10px;
}

.buy-sheet-footer .trust-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
}

.buy-sheet-footer .trust-item svg {
  width: 13px;
  height: 13px;
  opacity: 0.7;
  stroke: var(--primary);
}

/* Mobile: smaller elevated buysheet */
@media (max-width: 380px) {
  .buy-header-v7 .sheet-headline {
    font-size: 1.25rem;
  }

  .pack-card .card-quantity {
    font-size: 1.85rem;
  }

  .buy-sheet-footer .trust-row {
    gap: 10px;
  }

  .buy-sheet-footer .trust-item {
    font-size: 0.62rem;
  }
}

/* Conversion Modal - Value Anchor */
.conversion-value-anchor {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  margin: 0 0 12px;
  line-height: 1.4;
}

.conversion-features-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Mobile: smaller pack card padding */
@media (max-width: 380px) {
  .buy-packs-grid {
    gap: 8px;
  }

  .pack-card {
    padding: 14px 10px;
  }

  .pack-card-amount {
    font-size: 1.85rem;
  }

  .buy-features,
  .features-row {
    gap: 4px;
    padding: 0 18px;
  }

  .buy-feature-item,
  .feature-pill {
    padding: 5px 8px;
    font-size: 0.65rem;
  }

  /* Premium perks - compact on small mobile */
  .premium-perks-section {
    margin: 0 12px 12px;
    padding: 12px 12px 14px;
  }

  .perks-grid {
    gap: 8px;
  }

  .perk-icon {
    width: 28px;
    height: 28px;
  }

  .perk-icon svg {
    width: 14px;
    height: 14px;
  }

  .perk-text {
    font-size: 0.7rem;
  }
}

/* Very small screens: stack cards vertically */
@media (max-width: 340px) {
  .buy-packs-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   FOCUSED DROPZONE HERO (Pre-upload)
   Clean, centered upload experience
   ============================================ */
.hero-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 24px 16px;
  gap: 20px;
}

.hero-dropzone-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  text-align: center;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.hero-dropzone-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-align: center;
  margin: -8px 0 0;
  line-height: 1.5;
}

.dropzone-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 400px;
  padding: 48px 32px 40px;
  background: rgba(var(--primary-rgb), 0.04);
  border: 2px dashed rgba(var(--primary-rgb), 0.2);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dropzone-box:hover {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), 0.08);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.15);
}

.dropzone-box:active {
  transform: translateY(0);
}

.dropzone-icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glow);
  border-radius: 18px;
  color: var(--primary);
}

.dropzone-icon svg {
  width: 36px;
  height: 36px;
}

.dropzone-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.dropzone-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ============================================
   FREE EDIT BADGE
   Stuck to bottom of dropzone, half on/half off
   ============================================ */
.free-badge {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--bg);
  border: 2px solid rgba(var(--primary-rgb), 0.2);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.free-badge-icon {
  font-size: 0.9rem;
}

/* ============================================
   ROTATING PROMPT HINT
   Fade-transitioning example prompts
   ============================================ */
.dropzone-prompt {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text-muted);
  opacity: 0.7;
  transition: opacity 0.4s ease;
  min-height: 1.4em;
  text-align: center;
}

.dropzone-prompt.fade-out {
  opacity: 0;
}


/* ============================================
   DROPZONE SUBTEXT
   Value prop under dropzone
   ============================================ */
.dropzone-subtext {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 340px;
  line-height: 1.5;
}

.dropzone-tasks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 4px;
  max-width: 400px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.dropzone-task {
  color: var(--text-secondary);
  font-weight: 500;
}

.dropzone-task-sep {
  color: var(--border);
}

.dropzone-free-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* Elevated chips */
.dropzone-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 440px;
}

.dropzone-chip {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 100px;
  transition: all 0.15s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.dropzone-chip:active {
  transform: scale(0.96);
  background: var(--glow);
}

.dropzone-chip:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  background: rgba(139, 124, 246, 0.04);
}

.dropzone-chip--more {
  color: var(--primary);
  border-color: transparent;
  background: rgba(139, 124, 246, 0.08);
}

.dropzone-chip--more:hover {
  background: rgba(139, 124, 246, 0.12);
}

/* Elevated free hint */
.dropzone-free {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.dropzone-free svg {
  color: var(--primary);
  fill: rgba(139, 124, 246, 0.15);
  flex-shrink: 0;
}

.dropzone-free-sep {
  color: var(--border);
}

@media (max-width: 400px) {
  .dropzone-chips {
    gap: 6px;
  }

  .dropzone-chip {
    font-size: 0.75rem;
    padding: 5px 12px;
  }

  .dropzone-free {
    font-size: 0.8rem;
    gap: 6px;
  }
}

/* Desktop dropzone */
@media (min-width: 900px) {
  .hero-dropzone {
    padding: 48px 24px;
    gap: 28px;
  }

  .hero-dropzone-title {
    font-size: 2.5rem;
  }

  .dropzone-box {
    max-width: 480px;
    padding: 64px 48px;
  }

  .dropzone-icon {
    width: 88px;
    height: 88px;
    border-radius: 22px;
  }

  .dropzone-icon svg {
    width: 44px;
    height: 44px;
  }

  .dropzone-text {
    font-size: 1.25rem;
  }

  .dropzone-tasks {
    max-width: 500px;
    gap: 8px 6px;
    font-size: 0.9rem;
  }
}

/* ============================================
   SHOWCASE STRIP - Transformation Theater
   ============================================ */
.showcase-strip {
  width: 100%;
  overflow: hidden;
  padding: 20px 0;
  position: relative;
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
}

/* Subtle grain overlay */
.showcase-strip::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  mix-blend-mode: overlay;
}

.showcase-track {
  display: flex;
  gap: 20px;
  animation: marquee 30s linear infinite;
  width: max-content;
}

.showcase-track:hover {
  animation-play-state: paused;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Individual card */
.showcase-card {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Backlight glow */
.showcase-card::before {
  content: '';
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: 20px;
  background: radial-gradient(
    ellipse at center,
    rgba(var(--primary-rgb), 0.12) 0%,
    transparent 70%
  );
  border-radius: 16px;
  filter: blur(8px);
  z-index: -1;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

/* Hover: spotlight effect */
.showcase-track:hover .showcase-card {
  opacity: 0.5;
}

.showcase-track:hover .showcase-card:hover {
  opacity: 1;
  transform: scale(1.05);
}

.showcase-track:hover .showcase-card:hover::before {
  opacity: 1;
}

/* Frame container */
.showcase-frame {
  position: relative;
  width: 140px;
  height: 105px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-subtle);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.06),
    0 4px 16px rgba(0, 0, 0, 0.04);
}

.showcase-before,
.showcase-after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.showcase-after {
  clip-path: inset(0 100% 0 0);
  animation: wipe-reveal 5.3s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes wipe-reveal {
  0%, 35% {
    clip-path: inset(0 100% 0 0);
  }
  45%, 85% {
    clip-path: inset(0 0 0 0);
  }
  95%, 100% {
    clip-path: inset(0 100% 0 0);
  }
}

/* Pause wipe animation on hover */
.showcase-track:hover .showcase-after {
  animation-play-state: paused;
}

/* Label */
.showcase-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Reference card (equation layout) - for future use with reference images */
.showcase-card--reference .showcase-frame {
  width: auto;
  height: auto;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.showcase-card--reference .showcase-base,
.showcase-card--reference .showcase-result {
  width: 90px;
  height: 68px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.06),
    0 4px 16px rgba(0, 0, 0, 0.04);
}

.showcase-card--reference .showcase-ref {
  width: 56px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid var(--primary-light);
  box-shadow: 0 0 12px rgba(var(--primary-rgb), 0.2);
}

.showcase-op {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  text-shadow: 0 0 8px rgba(var(--primary-rgb), 0.3);
}

/* Mobile sizing */
@media (max-width: 599px) {
  .showcase-strip {
    padding: 16px 0;
    touch-action: pan-x; /* Allow horizontal swipe on mobile */
    cursor: grab;
  }

  .showcase-strip:active {
    cursor: grabbing;
  }

  .showcase-track {
    gap: 16px;
  }

  .showcase-frame {
    width: 120px;
    height: 90px;
    border-radius: 8px;
  }

  .showcase-label {
    font-size: 0.65rem;
  }

  .showcase-card--reference .showcase-base,
  .showcase-card--reference .showcase-result {
    width: 72px;
    height: 54px;
  }

  .showcase-card--reference .showcase-ref {
    width: 44px;
    height: 33px;
  }

  .showcase-op {
    font-size: 0.85rem;
  }
}

/* Desktop sizing */
@media (min-width: 900px) {
  .showcase-strip {
    padding: 28px 0;
  }

  .showcase-track {
    gap: 28px;
  }

  .showcase-frame {
    width: 180px;
    height: 135px;
    border-radius: 12px;
  }

  .showcase-label {
    font-size: 0.75rem;
  }

  .showcase-card--reference .showcase-base,
  .showcase-card--reference .showcase-result {
    width: 120px;
    height: 90px;
  }

  .showcase-card--reference .showcase-ref {
    width: 72px;
    height: 54px;
  }
}

/* ============================================
   HERO V2 - Elevated Landing Experience
   ============================================ */
.hero-v2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 32px 20px;
  gap: 32px;
}

.hero-v2-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  max-width: 500px;
}

.hero-v2-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  margin: 0;
}

.hero-v2-accent {
  color: var(--primary);
}

.hero-v2-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.hero-v2-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(139, 124, 246, 0.35);
  margin-top: 8px;
}

.hero-v2-cta:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 124, 246, 0.45);
}

.hero-v2-cta:active {
  transform: scale(0.98);
}

.hero-v2-free {
  font-size: 0.85rem;
  color: var(--text-dimmed);
  margin: 0;
}

/* Preview card section */
.hero-v2-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  max-width: 480px;
}

.preview-card {
  position: relative;
  flex: 1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.preview-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.preview-label {
  position: absolute;
  bottom: 6px;
  left: 6px;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.preview-after {
  box-shadow: 0 4px 24px rgba(139, 124, 246, 0.25);
}

.preview-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.preview-prompt-icon {
  font-size: 1.2rem;
  color: var(--primary);
  font-weight: 600;
}

.preview-prompt code {
  font-family: 'SF Mono', 'Consolas', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

/* Mobile: stack preview vertically */
@media (max-width: 500px) {
  .hero-v2 {
    padding: 24px 16px;
    gap: 28px;
  }

  .hero-v2-title {
    font-size: 1.7rem;
  }

  .hero-v2-subtitle {
    font-size: 0.95rem;
  }

  .hero-v2-cta {
    padding: 14px 28px;
    font-size: 1rem;
  }

  .hero-v2-preview {
    flex-direction: row;
    gap: 12px;
    max-width: 320px;
  }

  .preview-prompt {
    display: none;
  }
}

/* Desktop: larger hero */
@media (min-width: 900px) {
  .hero-v2 {
    padding: 48px 32px;
    gap: 40px;
  }

  .hero-v2-title {
    font-size: 3rem;
  }

  .hero-v2-subtitle {
    font-size: 1.2rem;
  }

  .hero-v2-cta {
    padding: 18px 40px;
    font-size: 1.15rem;
    border-radius: 16px;
  }

  .hero-v2-preview {
    max-width: 560px;
    gap: 24px;
  }

  .preview-card {
    border-radius: 16px;
  }

  .preview-label {
    font-size: 0.65rem;
    padding: 4px 10px;
    bottom: 8px;
    left: 8px;
  }

  .preview-prompt code {
    font-size: 0.8rem;
    padding: 6px 12px;
  }
}

/* ============================================
   CREDIT BANNER (Editor)
   Shows credit status before choosing edit
   ============================================ */
.credit-banner {
  display: none;
  padding: 12px 16px;
  background: rgba(139, 124, 246, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text);
  margin-bottom: 12px;
}

.credit-banner.visible {
  display: block;
}

.credit-banner-text {
  font-weight: 500;
}

.credit-banner.free .credit-banner-text {
  color: #10b981;
}

.credit-banner.subscriber .credit-banner-text {
  color: var(--primary);
}

.credit-banner.no-credits .credit-banner-text {
  color: var(--text-muted);
}

.credit-banner a {
  color: var(--primary);
  text-decoration: underline;
  font-weight: 600;
}

/* ============================================
   QUICK EDIT SECTION (Editor)
   2x2 grid of one-click action buttons
   ============================================ */
.quick-edit-section {
  display: none;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.quick-edit-section.visible {
  display: block;
}

.quick-edit-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.quick-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quick-edit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  min-height: 52px;
}

.quick-edit-btn:hover {
  background: var(--glow);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.quick-edit-btn:active {
  transform: translateY(0) scale(0.98);
}

.quick-edit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Mobile quick edit - slightly smaller padding */
@media (max-width: 480px) {
  .quick-edit-grid {
    gap: 8px;
  }

  .quick-edit-btn {
    padding: 14px 10px;
    font-size: 0.8rem;
    min-height: 48px;
  }
}

/* ============================================
   CUSTOM PROMPT SECTION (Editor)
   Wrapper for textarea and related UI
   ============================================ */
.custom-prompt-section {
  margin-bottom: 0;
}

.custom-prompt-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* When quick edit section is visible, add top margin */
.quick-edit-section.visible + .custom-prompt-section {
  margin-top: 0;
}

/* ============================================
   MOBILE: Maximize image visibility
   Hide secondary UI, focus on image + prompt
   ============================================ */
@media (max-width: 768px) {
  /* Hide quick-edit section on mobile - saves ~120px, users type their prompt */
  .app.has-image .quick-edit-section {
    display: none !important;
  }

  /* Hide credit banner on mobile - saves ~40px */
  .app.has-image .credit-banner {
    display: none !important;
  }

  /* Hide "Or describe any edit:" label */
  .app.has-image .custom-prompt-label {
    display: none;
  }

  /* Photo strip on mobile - keep visible so users can add second photo */
  /* Only hide when keyboard is open (handled separately) */

  /* Photo strip - compact but functional */
  .app.has-image .photo-strip {
    padding: 6px 12px;
  }

  .app.has-image .photo-strip-item {
    padding: 2px;
  }

  .app.has-image .photo-thumb-wrapper {
    width: 40px;
    height: 40px;
  }

  .app.has-image .photo-strip-add {
    padding: 6px 10px;
    font-size: 0.7rem;
  }

  /* Compact credit banner */
  .app.has-image .credit-banner {
    padding: 6px 10px;
    margin-bottom: 6px;
  }

  .app.has-image .credit-banner-text {
    font-size: 0.75rem;
  }

  /* Compact edit card */
  .app.has-image .edit-card {
    padding: 8px;
    border-radius: 12px;
  }

  /* Compact edit card footer */
  .app.has-image .edit-card-footer {
    margin-top: 6px;
    gap: 8px;
  }

  /* Hide edit cost caption on mobile to save space */
  .app.has-image .edit-cost-caption {
    display: none;
  }

  /* Smart upsell more compact */
  .app.has-image .smart-upsell {
    padding: 4px 8px;
    font-size: 0.7rem;
  }
}

/* ============================================
   BUY SHEET V8 - Streamlined 2-Step Flow
   Clean, focused, conversion-optimized
   ============================================ */

/* Step container */
.buy-sheet-step {
  animation: stepFadeIn 0.25s ease-out;
}

@keyframes stepFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Step 1 Headline */
.sheet-headline-v8 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

/* Tier Cards V8 - Horizontal compact design */
.tier-cards-v8 {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tier-card-v8 {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.tier-card-v8:hover {
  border-color: rgba(139, 124, 246, 0.4);
  background: rgba(139, 124, 246, 0.03);
}

.tier-card-v8--selected,
.tier-card-v8:has(.tier-radio-v8:checked) {
  border-color: var(--primary);
  background: rgba(139, 124, 246, 0.06);
}

.tier-card-v8--popular {
  padding-top: 20px;
}

/* Radio button */
.tier-radio-v8 {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  flex-shrink: 0;
  transition: all 0.15s ease;
  position: relative;
}

.tier-radio-v8:checked {
  border-color: var(--primary);
  background: var(--primary);
}

.tier-radio-v8:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
}

.tier-card-v8:hover .tier-radio-v8:not(:checked) {
  border-color: var(--primary);
}

/* Tier content */
.tier-main {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.tier-credits-v8 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.tier-price-v8 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

/* Original price - strikethrough (hidden by default, shown with PPP) */
.tier-original-v8 {
  display: none;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dimmed);
  text-decoration: line-through;
  margin-right: 4px;
}

.tier-original-v8.visible {
  display: inline;
}

.tier-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.tier-unit {
  color: var(--text-dimmed);
}

/* Popular badge */
.tier-badge-v8 {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary) 0%, #7C3AED 100%);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  white-space: nowrap;
}

/* Inline perks */
.perks-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
  padding: 10px 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.perks-inline svg {
  width: 14px;
  height: 14px;
  stroke: #10b981;
  flex-shrink: 0;
}

.perks-dot {
  color: var(--text-dimmed);
}

/* ----------------------------------------
   STEP 2: Payment Options V8
   ---------------------------------------- */

.step-back-v8 {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.step-back-v8:hover {
  background: var(--bg-secondary);
  color: var(--text);
}

.step2-summary {
  text-align: center;
  margin-bottom: 20px;
  padding-top: 8px;
}

.step2-credits {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
}

.step2-label {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 6px;
}

/* Payment Options V8 */
.payment-options-v8 {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pay-option-v8 {
  display: grid;
  grid-template-columns: 20px 1fr;
  grid-template-rows: auto auto;
  gap: 2px 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.pay-option-v8:hover {
  border-color: rgba(139, 124, 246, 0.4);
}

.pay-option-v8:has(input:checked) {
  border-color: var(--primary);
  background: rgba(139, 124, 246, 0.06);
}

.pay-option-v8 input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  grid-row: 1 / 3;
  align-self: center;
  transition: all 0.15s ease;
  position: relative;
}

.pay-option-v8 input[type="radio"]:checked {
  border-color: var(--primary);
  background: var(--primary);
}

.pay-option-v8 input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
}

.pay-option-v8:hover input[type="radio"]:not(:checked) {
  border-color: var(--primary);
}

.pay-option-content {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.pay-option-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.pay-option-price {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.pay-option-note {
  grid-column: 2;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Bonus and save tags */
.pay-bonus-tag {
  display: inline-flex;
  align-items: center;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
}

.pay-save-tag {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 100px;
  white-space: nowrap;
}

/* Recommended styling */
.pay-option-v8--recommended::before {
  content: 'Recommended';
  position: absolute;
  top: -9px;
  right: 14px;
  background: linear-gradient(135deg, var(--primary) 0%, #7C3AED 100%);
  color: white;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
}

/* ----------------------------------------
   Sticky Footer V8
   ---------------------------------------- */

.buy-sheet-footer-v8 {
  flex-shrink: 0;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.cta-primary-v8 {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 24px;
  background: linear-gradient(135deg, var(--primary) 0%, #7C3AED 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px -4px rgba(139, 124, 246, 0.5);
}

.cta-primary-v8:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px -6px rgba(139, 124, 246, 0.6);
}

.cta-primary-v8:active {
  transform: translateY(0);
}

.cta-primary-v8 svg {
  flex-shrink: 0;
}

.footer-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.7rem;
  color: var(--text-dimmed);
}

.footer-trust svg {
  width: 12px;
  height: 12px;
  stroke: var(--text-dimmed);
}

.footer-dot {
  color: var(--text-dimmed);
}

.footer-signin {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}

.footer-signin:hover {
  text-decoration: underline;
}

/* ----------------------------------------
   V8 Responsive
   ---------------------------------------- */

@media (max-width: 380px) {
  .sheet-headline-v8 {
    font-size: 1.15rem;
    margin-bottom: 14px;
  }

  .tier-card-v8 {
    padding: 12px 14px;
    gap: 10px;
  }

  .tier-card-v8--popular {
    padding-top: 18px;
  }

  .tier-radio-v8 {
    width: 18px;
    height: 18px;
  }

  .tier-credits-v8 {
    font-size: 1rem;
  }

  .tier-price-v8 {
    font-size: 0.9rem;
  }

  .tier-original-v8 {
    font-size: 0.75rem;
  }

  .tier-meta {
    font-size: 0.72rem;
  }

  .tier-badge-v8 {
    font-size: 0.55rem;
    padding: 3px 10px;
    top: -9px;
  }

  .perks-inline {
    font-size: 0.68rem;
    gap: 5px;
    margin-top: 12px;
    padding: 8px 0;
  }

  .step2-credits {
    font-size: 2rem;
  }

  .pay-option-v8 {
    padding: 12px 14px;
    gap: 2px 10px;
  }

  .pay-option-v8 input[type="radio"] {
    width: 18px;
    height: 18px;
  }

  .pay-option-title {
    font-size: 0.88rem;
  }

  .pay-option-price {
    font-size: 0.88rem;
  }

  .pay-option-note {
    font-size: 0.7rem;
  }

  .pay-bonus-tag,
  .pay-save-tag {
    font-size: 0.52rem;
    padding: 2px 5px;
  }

  .pay-option-v8--recommended::before {
    font-size: 0.5rem;
    padding: 2px 8px;
    top: -8px;
    right: 12px;
  }

  .cta-primary-v8 {
    padding: 14px 20px;
    font-size: 0.95rem;
  }

  .footer-trust {
    font-size: 0.65rem;
  }
}

@media (max-width: 340px) {
  .tier-card-v8 {
    padding: 10px 12px;
  }

  .tier-credits-v8 {
    font-size: 0.92rem;
  }

  .tier-price-v8 {
    font-size: 0.85rem;
  }

  .tier-original-v8 {
    font-size: 0.7rem;
  }

  .perks-inline {
    font-size: 0.62rem;
  }

  .step2-credits {
    font-size: 1.75rem;
  }

  .pay-option-v8 {
    padding: 10px 12px;
  }

  .pay-option-title {
    font-size: 0.82rem;
  }

  .pay-option-price {
    font-size: 0.82rem;
  }

  .pay-bonus-tag,
  .pay-save-tag {
    font-size: 0.48rem;
    padding: 1px 4px;
  }
}

/* Legacy compatibility - hide old elements */
.step1-cta-area,
.premium-perks-section,
.subscription-note {
  display: none;
}

/* Keep old Continue button reference working */
#continueBtn {
  display: none;
}

/* ----------------------------------------
   STEP 1: Tier Cards (Radio selection style)
   ---------------------------------------- */
.tier-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  margin-bottom: 16px;
}

/* Individual Tier Card - now a label for radio */
.tier-card {
  position: relative;
  padding: 16px 18px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

/* Hide radio but keep it functional */
.tier-radio {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-radius: 50%;
  margin: 0;
  flex-shrink: 0;
  transition: all 0.2s ease;
  position: relative;
  background: var(--bg);
  margin-top: 2px;
}

.tier-radio:checked {
  border-color: var(--primary);
  background: var(--primary);
}

.tier-radio:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}

.tier-card-content {
  flex: 1;
  min-width: 0;
}

.tier-card:hover {
  border-color: rgba(139, 124, 246, 0.5);
  background: rgba(139, 124, 246, 0.03);
}

.tier-card:hover .tier-radio:not(:checked) {
  border-color: var(--primary);
}

/* Selected tier card state */
.tier-card:has(.tier-radio:checked),
.tier-card-selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(139, 124, 246, 0.08) 0%, rgba(139, 124, 246, 0.03) 100%);
  box-shadow: 0 4px 16px -4px rgba(139, 124, 246, 0.25);
}

/* Popular tier - extra prominence when selected */
.tier-card-popular {
  padding-top: 22px;
}

.tier-card-popular:has(.tier-radio:checked),
.tier-card-popular.tier-card-selected {
  background: linear-gradient(135deg, rgba(139, 124, 246, 0.12) 0%, rgba(139, 124, 246, 0.05) 100%);
  box-shadow: 0 8px 24px -6px rgba(139, 124, 246, 0.35);
}

/* Popular badge - floating pill */
.tier-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary) 0%, #6D5DD3 100%);
  color: white;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: 100px;
  white-space: nowrap;
  box-shadow: 0 4px 12px -2px rgba(139, 124, 246, 0.5);
}

/* Tier content */
.tier-credits {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 2px;
}

.tier-price {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.tier-price span[data-tier-price] {
  font-weight: 600;
  color: var(--text);
}

/* Subscription hint */
.tier-sub-hint {
  font-size: 0.78rem;
  color: var(--text-dimmed);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  line-height: 1.35;
}

.tier-sub-credits {
  font-weight: 600;
  color: var(--primary);
}

/* Step 1 sticky CTA area */
.step1-cta-area {
  padding-top: 8px;
}

/* ----------------------------------------
   STEP 2: Payment Choice
   ---------------------------------------- */

/* Back button - subtle but clear */
.step-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 0;
  cursor: pointer;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.step-back svg {
  transition: transform 0.2s ease;
}

.step-back:hover {
  color: var(--text);
}

.step-back:hover svg {
  transform: translateX(-3px);
}

/* Selected tier header - prominent with subtle glow */
.step2-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(139, 124, 246, 0.12) 0%, rgba(99, 102, 241, 0.08) 100%);
  border: 1px solid rgba(139, 124, 246, 0.2);
  border-radius: 10px;
  letter-spacing: -0.01em;
  box-shadow: 0 2px 12px -4px rgba(139, 124, 246, 0.2);
}

.step2-header span:first-child {
  color: var(--primary);
}

/* Payment Options */
.payment-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0;
}

.payment-option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.payment-option:hover {
  border-color: rgba(139, 124, 246, 0.5);
  background: rgba(139, 124, 246, 0.03);
}

.payment-option:has(input:checked) {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(139, 124, 246, 0.08) 0%, rgba(139, 124, 246, 0.03) 100%);
  box-shadow: 0 4px 16px -4px rgba(139, 124, 246, 0.25);
}

/* Custom radio button */
.payment-option input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 50%;
  margin-top: 2px;
  flex-shrink: 0;
  transition: all 0.2s ease;
  position: relative;
  background: var(--bg);
}

.payment-option input[type="radio"]:checked {
  border-color: var(--primary);
  background: var(--primary);
}

.payment-option input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}

.payment-option:hover input[type="radio"]:not(:checked) {
  border-color: var(--primary);
}

.option-content {
  flex: 1;
  min-width: 0;
}

.option-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.option-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.option-subdesc {
  font-size: 0.8rem;
  color: var(--text-dimmed);
  margin-top: 2px;
}

/* Bonus highlight - make it pop */
.option-bonus {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: #10b981;
  margin-top: 5px;
  font-weight: 600;
  padding: 4px 10px;
  background: rgba(16, 185, 129, 0.12);
  border-radius: 6px;
  width: fit-content;
}

.option-bonus::before {
  content: '+';
  font-weight: 700;
}

/* Save badge - vibrant green pill */
.option-save-badge {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 3px 9px;
  border-radius: 100px;
  box-shadow: 0 2px 8px -2px rgba(16, 185, 129, 0.4);
}

/* Monthly option - recommended styling */
.payment-option[data-option="monthly"] {
  position: relative;
}

.payment-option[data-option="monthly"]::before {
  content: 'Recommended';
  position: absolute;
  top: -9px;
  right: 16px;
  background: linear-gradient(135deg, var(--primary) 0%, #7C3AED 100%);
  color: white;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  box-shadow: 0 2px 8px -2px rgba(139, 124, 246, 0.4);
}

/* Subscription note - informational callout */
.subscription-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08) 0%, rgba(56, 189, 248, 0.03) 100%);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 10px;
  margin-bottom: 16px;
  line-height: 1.4;
}

.subscription-note::before {
  content: '↻';
  font-size: 1rem;
  color: var(--accent);
}

/* Continue CTA - primary action */
.continue-cta {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--primary) 0%, #7B6CE6 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 8px;
  box-shadow: 0 4px 16px -4px rgba(139, 124, 246, 0.5);
  letter-spacing: 0.01em;
}

.continue-cta:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, #6D5DD3 100%);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -6px rgba(139, 124, 246, 0.6);
}

.continue-cta:active {
  transform: translateY(0) scale(0.99);
  box-shadow: 0 2px 8px -2px rgba(139, 124, 246, 0.5);
}

/* ----------------------------------------
   Responsive Adjustments
   ---------------------------------------- */

/* Desktop */
@media (min-width: 600px) {
  .tier-cards {
    gap: 12px;
  }

  .tier-card {
    padding: 20px 24px;
  }

  .tier-card-popular {
    padding-top: 26px;
  }

  .tier-credits {
    font-size: 1.5rem;
  }

  .tier-cta {
    padding: 14px 24px;
    font-size: 0.95rem;
  }

  .payment-options {
    gap: 10px;
  }

  .payment-option {
    padding: 18px 20px;
  }
}

/* Small mobile - compact but readable */
@media (max-width: 380px) {
  .tier-card {
    padding: 14px 14px;
    gap: 12px;
  }

  .tier-card-popular {
    padding-top: 20px;
  }

  .tier-credits {
    font-size: 1.15rem;
  }

  .tier-price {
    font-size: 0.78rem;
  }

  .tier-radio {
    width: 20px;
    height: 20px;
  }

  .tier-radio:checked::after {
    width: 7px;
    height: 7px;
  }

  .tier-sub-hint {
    font-size: 0.7rem;
    margin-top: 6px;
    padding-top: 6px;
  }

  .tier-badge {
    font-size: 9px;
    padding: 4px 12px;
    top: -10px;
  }

  .payment-option {
    padding: 14px 14px;
    gap: 10px;
    margin-top: 0;
  }

  .payment-option[data-option="monthly"] {
    margin-top: 6px;
  }

  .payment-option[data-option="monthly"]::before {
    font-size: 0.52rem;
    padding: 2px 8px;
    top: -8px;
    right: 12px;
  }

  .payment-option input[type="radio"] {
    width: 18px;
    height: 18px;
  }

  .payment-option input[type="radio"]:checked::after {
    width: 7px;
    height: 7px;
  }

  .option-title {
    font-size: 0.88rem;
  }

  .option-desc {
    font-size: 0.8rem;
  }

  .option-bonus {
    font-size: 0.72rem;
    padding: 3px 8px;
    margin-top: 4px;
  }

  .option-save-badge {
    font-size: 0.58rem;
    padding: 2px 7px;
  }

  .step2-header {
    font-size: 1rem;
    padding: 5px 10px;
  }

  .subscription-note {
    font-size: 0.72rem;
    padding: 10px 12px;
  }

  .continue-cta {
    padding: 14px 20px;
    font-size: 0.95rem;
  }

  /* Premium perks - inline pills on small mobile */
  .premium-perks-section {
    margin: 12px 0 6px;
    padding: 12px 14px;
  }

  .perks-header {
    margin-bottom: 10px;
  }

  .perks-badge {
    padding: 3px 8px;
    font-size: 0.55rem;
  }

  .perks-title {
    font-size: 0.7rem;
  }

  .perks-grid {
    gap: 6px 8px;
  }

  .perk-item {
    padding: 5px 8px 5px 6px;
    gap: 5px;
  }

  .perk-icon {
    width: 16px;
    height: 16px;
  }

  .perk-icon svg {
    width: 12px;
    height: 12px;
  }

  .perk-text {
    font-size: 0.65rem;
  }
}

/* Extra small mobile (320px) - maximum compression */
@media (max-width: 340px) {
  .tier-card {
    padding: 12px 12px;
    gap: 10px;
  }

  .tier-credits {
    font-size: 1.05rem;
  }

  .tier-price {
    font-size: 0.72rem;
  }

  .tier-sub-hint {
    font-size: 0.65rem;
  }

  .payment-option {
    padding: 10px 12px;
    gap: 8px;
  }

  .option-title {
    font-size: 0.82rem;
  }

  .option-desc {
    font-size: 0.75rem;
  }

  .option-bonus {
    font-size: 0.68rem;
    padding: 2px 6px;
  }

  .step2-header {
    font-size: 0.92rem;
    padding: 4px 8px;
  }

  .premium-perks-section {
    padding: 10px 12px;
  }

  .perk-item {
    padding: 4px 6px 4px 5px;
  }

  .perk-text {
    font-size: 0.6rem;
  }
}
