/** Shopify CDN: Minification failed

Line 1154:10 Expected identifier but found whitespace
Line 1154:15 Unexpected ";"

**/
/* ========================================
     AI GENERATOR - MODERN UI REDESIGN
     ======================================== */
  
  .ai-generator-wrapper {
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-shadow: 0 10px 40px rgba(0,0,0,0.08);
    --card-hover-shadow: 0 20px 60px rgba(0,0,0,0.12);
    --ink: #111827;
    --muted: #6b7280;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --border: #e5e7eb;
    font-family: var(--font-body-family);
    /* Global type scale for the generator (store-like, easier to read) */
    font-size: 18px;
    line-height: 1.6;
    position: relative;
    z-index: 0;
  }

  /* Ensure form controls inherit the larger scale without impacting the rest of the theme */
  .ai-generator-wrapper p,
  .ai-generator-wrapper label,
  .ai-generator-wrapper input,
  .ai-generator-wrapper textarea,
  .ai-generator-wrapper select,
  .ai-generator-wrapper button {
    font-size: 1em;
  }

  /* Small helper text should still read comfortably */
  .ai-generator-wrapper .ai-field__hint,
  .ai-generator-wrapper .ai-file-upload__meta,
  .ai-generator-wrapper .ai-step__desc,
  .ai-generator-wrapper .section-header__subtitle {
    font-size: 1em;
  }
  
  /* Header */
  .ai-header {
    background: linear-gradient(135deg, #0b1220 0%, #111827 60%, #1f2937 100%);
    padding: 2.5rem 1.5rem;
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    color: #fff;
  }
  .ai-header__badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem .85rem;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.14);
    font-size: .9em;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1rem;
  }
  .ai-header__title {
    font-family: var(--font-heading-family);
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 700;
    margin: 0 0 .5rem;
    line-height: 1.15;
  }
  .ai-header__subtitle {
    margin: 0;
    color: rgba(255,255,255,.75);
    font-size: 1.15em;
  }
  .ai-header__meta {
    margin: .65rem 0 0;
    color: rgba(255,255,255,.88);
    font-size: .94rem;
    line-height: 1.45;
  }
  
  /* Main Content Area */
  .ai-content {
    background: transparent;
    padding: 2rem 1.5rem 3rem;
  }
  
  .ai-content__inner {
    max-width: 900px;
    margin: 0 auto;
  }
  
  /* Form Card */
  .ai-form-card {
    background: #fff;
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
    position: relative;
    z-index: 0;
  }

  /* Stepper */
  .ai-stepper {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    margin: 1.5rem 0;
  }
  .ai-step {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: .9rem 1rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    color: var(--muted);
  }
  .ai-step__num {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #eef2ff;
    color: #4338ca;
    font-weight: 800;
    font-size: .9rem;
  }
  .ai-step__label {
    font-weight: 700;
    font-size: 1.05em;
    color: var(--ink);
    margin: 0;
    line-height: 1.2;
  }
  .ai-step__desc {
    margin: 0;
    font-size: .95em;
    color: var(--muted);
  }
  .ai-step.is-active {
    border-color: rgba(102,126,234,.45);
    box-shadow: 0 10px 30px rgba(102,126,234,.10);
  }
  .ai-step.is-active .ai-step__num {
    background: var(--accent-gradient);
    color: #fff;
  }

  @media (max-width: 740px) {
    .ai-stepper { grid-template-columns: 1fr; }
  }
  
  .ai-form-card__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eef2f7;
  }
  
  .ai-form-card__icon {
    width: 48px;
    height: 48px;
    background: var(--accent-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
  }
  
  .ai-form-card__icon svg {
    width: 24px;
    height: 24px;
  }
  
  .ai-form-card__title {
    font-size: 1.55em;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
  }
  
  /* Form Fields */
  .ai-field {
    margin-bottom: 1.5rem;
  }
  
  .ai-field__label {
    display: block;
    font-size: 1.05em;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
  }
  
  .ai-field__hint {
    font-size: 0.9rem;
    color: #666;
    font-weight: 400;
  }
  
  .ai-textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem 1.25rem;
    border: 2px solid #eef2f7;
    border-radius: 12px;
    font-size: 1.1em;
    font-family: inherit;
    resize: vertical;
    transition: all 0.2s ease;
    background: #fff;
  }
  
  .ai-textarea:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  }
  
  .ai-textarea::placeholder {
    color: #a0a0a0;
  }
  
  /* File Upload */
  .ai-file-upload {
    border: 2px dashed #dde3ed;
    border-radius: 12px;
    padding: 1.2rem 1.25rem;
    text-align: left;
    background: #fafbfc;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
  }
  .ai-file-upload__body {
    display: flex;
    align-items: center;
    gap: 1rem;
  }
  .ai-file-upload__copy {
    min-width: 0;
    flex: 1 1 auto;
  }
  .ai-file-upload.has-preview {
    border-style: solid;
    background: #fff;
  }
  .ai-file-upload__preview {
    width: 100%;
    max-width: 520px;
    margin: 0 auto 1rem;
    display: none;
  }
  .ai-file-upload__preview img {
    width: 100%;
    height: auto;
    max-height: 260px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,.08);
    background: rgba(0,0,0,.02);
  }
  
  .ai-file-upload:hover {
    border-color: #667eea;
    background: #f5f7ff;
  }
  
  .ai-file-upload__icon {
    width: 48px;
    height: 48px;
    background: #eef2f7;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    color: #667eea;
    flex: 0 0 auto;
  }
  
  .ai-file-upload__text {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
  }
  
  .ai-file-upload__text strong {
    color: #667eea;
  }

  .ai-file-upload__meta {
    margin-top: .35rem;
    font-size: .9rem;
    color: var(--muted);
  }

  #ai-file-meta {
    margin-top: .85rem;
    padding: .6rem .75rem;
    border: 1px solid rgba(var(--color-foreground), .1);
    border-radius: 10px;
    background: rgba(var(--color-foreground), .03);
    font-weight: 600;
  }
  
  .ai-file-upload input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
  }
  
  /* Model Selector */
  .ai-quality-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.05rem;
    background: #fff;
    border: 2px solid #eef2f7;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .ai-quality-toggle:hover {
    border-color: #667eea;
  }

  .ai-quality-toggle:has(input:checked) {
    border-color: #667eea;
    background: #fff;
  }

  .ai-quality-toggle:has(input:focus-visible) {
    outline: 3px solid rgba(102, 126, 234, .24);
    outline-offset: 2px;
  }

  .ai-quality-toggle__copy {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    min-width: 0;
  }

  .ai-quality-toggle__title {
    color: #1a1a2e;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
  }

  .ai-quality-toggle__meta {
    color: rgba(var(--color-foreground), .62);
    font-size: 14px;
    font-weight: 700;
  }

  .ai-quality-toggle__switch {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    width: 52px;
    height: 30px;
  }

  .ai-quality-toggle__switch input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
  }

  .ai-quality-toggle__track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(var(--color-foreground), .16);
    transition: background .2s ease;
  }

  .ai-quality-toggle__thumb {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .18);
    transition: transform .2s ease;
  }

  .ai-quality-toggle__switch input:checked + .ai-quality-toggle__track {
    background: #667eea;
  }

  .ai-quality-toggle__switch input:checked + .ai-quality-toggle__track .ai-quality-toggle__thumb {
    transform: translateX(22px);
  }
  
  /* Generate Button */
  .ai-generate-btn {
    width: 100%;
    padding: 1.125rem 2rem;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
  }
  
  .ai-generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
  }
  
  .ai-generate-btn:active {
    transform: translateY(0);
  }
  
  .ai-generate-btn svg {
    width: 20px;
    height: 20px;
  }
  
  .ai-generate-btn.loading {
    pointer-events: none;
    opacity: 0.8;
  }
  
  /* Result Section */
  .ai-result-section {
    margin-top: 3rem;
    animation: fadeIn 0.5s ease;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  .ai-result-card {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
  }
  
  .ai-result-image-container {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
  }
  
  .ai-result-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  }
  
  .ai-result-actions {
    padding: 1.5rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    background: #fafbfc;
  }

  /* Step sections */
  .ai-step-section {
    margin-top: 1.25rem;
  }
  
  .ai-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 10px;
    font-size: 0.98rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
  }
  
  .ai-action-btn svg {
    width: 18px;
    height: 18px;
  }
  
  .ai-action-btn--secondary {
    background: #fff;
    border: 2px solid #eef2f7;
    color: #1a1a2e;
  }
  
  .ai-action-btn--secondary:hover {
    border-color: #667eea;
    color: #667eea;
  }
  
  .ai-action-btn--primary {
    background: var(--accent-gradient);
    border: none;
    color: #fff;
  }
  
  .ai-action-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
  }
  
  /* Loading State */
  .ai-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 3rem;
  }
  
  .ai-loading__spinner {
    width: 48px;
    height: 48px;
    border: 3px solid #eef2f7;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }
  .ai-loading__spinner--inline {
    width: 18px;
    height: 18px;
    border-width: 2px;
    display: inline-block;
    flex: 0 0 auto;
  }
  .ai-loading__spinner--on-dark {
    border-color: rgba(255, 255, 255, .3);
    border-top-color: #fff;
  }
  
  @keyframes spin {
    to { transform: rotate(360deg); }
  }
  
  .ai-loading__text {
    font-size: 1rem;
    color: #666;
  }
  
  /* Error State */
  .ai-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: #dc2626;
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }

  .ai-toast-region {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 40;
    pointer-events: none;
    width: min(360px, calc(100vw - 2rem));
  }

  .ai-toast {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: .75rem;
    padding: .9rem;
    border-radius: 8px;
    border: 1px solid #fecaca;
    background: #fff;
    color: #111827;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .16);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
  }

  .ai-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .ai-toast__icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #fef2f2;
    color: #dc2626;
    flex: 0 0 auto;
  }

  .ai-toast__icon svg {
    width: 18px;
    height: 18px;
  }

  .ai-toast__title {
    margin: 0;
    color: #111827;
    font-weight: 800;
    font-size: .95rem;
    line-height: 1.25;
  }

  .ai-toast__message {
    margin: .18rem 0 0;
    color: #4b5563;
    font-size: .9rem;
    line-height: 1.4;
  }

  .ai-toast__close {
    appearance: none;
    border: 0;
    background: transparent;
    color: #6b7280;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    cursor: pointer;
  }

  .ai-toast__close:hover,
  .ai-toast__close:focus-visible {
    color: #111827;
  }

  .ai-toast__close svg {
    width: 18px;
    height: 18px;
  }

  @media (max-width: 749px) {
    .ai-toast-region {
      top: .75rem;
      right: .75rem;
      width: calc(100vw - 1.5rem);
    }
  }
  
  /* Product Grid Styles */
  .ai-product-grid {
    margin-top: 1.5rem;
  }
  
  /* Variant-style option pills (Shopify-like) */
  .ai-variant-fieldset {
    border: 0;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: center;
  }
  .ai-variant-legend {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .ai-variant-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }
  .ai-variant-pill {
    display: inline-flex;
    align-items: baseline;
    gap: .6rem;
    padding: .9rem 1.1rem;
    border-radius: 999px;
    border: 2px solid #eef2f7;
    background: #fff;
    cursor: pointer;
    transition: all .2s ease;
    font-weight: 700;
    color: #1a1a2e;
    user-select: none;
  }
  .ai-variant-pill:hover {
    border-color: #667eea;
  }
  .ai-variant-input:focus-visible + .ai-variant-pill {
    outline: 3px solid rgba(102, 126, 234, 0.35);
    outline-offset: 2px;
  }
  .ai-variant-input:checked + .ai-variant-pill {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    box-shadow: 0 10px 26px rgba(102, 126, 234, 0.12);
  }
  .ai-variant-pill__price {
    font-weight: 800;
    color: #667eea;
  }
  
  .product-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 3px solid transparent;
  }
  
  .product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-hover-shadow);
  }
  
  .product-card.selected {
    border-color: #667eea;
  }
  
  .product-card__image {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #f8f9fc 0%, #eef2f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
  }
  
  .product-card__image img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
    transition: transform 0.3s ease;
  }
  
  .product-card:hover .product-card__image img {
    transform: scale(1.03);
  }
  
  .product-card__badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--accent-gradient);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .product-card__check {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: #667eea;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  }
  
  .product-card.selected .product-card__check {
    display: flex;
  }
  
  .product-card__check svg {
    width: 18px;
    height: 18px;
    color: #fff;
  }
  
  .product-card__info {
    padding: 1.5rem;
  }
  
  .product-card__title {
    font-size: 1.22rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: #1a1a2e;
  }
  
  .product-card__subtitle {
    font-size: 0.95rem;
    color: #666;
    margin: 0 0 1rem 0;
  }
  
  .product-card__price {
    font-size: 1.45rem;
    font-weight: 700;
    color: #667eea;
  }
  
  /* Frame Options */
  .options-container {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    margin-top: 2.5rem;
    box-shadow: var(--card-shadow);
  }
  
  .frame-options-grid {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
  }
  
  .frame-option-btn {
    padding: 1rem 2rem;
    border: 2px solid #eef2f7;
    border-radius: 50px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
  }
  
  .frame-option-btn:hover {
    border-color: #667eea;
  }
  
  .frame-option-btn.selected {
    border-color: #667eea;
    background: var(--accent-gradient);
    color: #fff;
  }
  
  .frame-option-btn.is-unavailable {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
  }
  
  /* Frame Color Swatches */
  .frame-colors {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 1.5rem;
  }
  
  .frame-color-item {
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease;
  }
  
  .frame-color-item:hover {
    transform: scale(1.05);
  }
  
  .frame-color-swatch {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: 0 auto 0.75rem;
    transition: all 0.2s ease;
    border: 4px solid transparent;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
  
  .frame-color-swatch.white { 
    background: #fff;
    box-shadow: inset 0 0 0 2px #e0e0e0, 0 4px 12px rgba(0,0,0,0.1);
  }
  .frame-color-swatch.black { background: #1a1a1a; }
  .frame-color-swatch.espresso { background: #3c2415; }
  
  .frame-color-item.selected .frame-color-swatch {
    border-color: #667eea;
    transform: scale(1.1);
  }
  
  .frame-color-name {
    font-size: 0.85rem;
    color: #666;
    text-transform: capitalize;
    font-weight: 500;
  }
  
  .frame-color-item.selected .frame-color-name {
    font-weight: 700;
    color: #1a1a2e;
  }
  
  /* Main Preview */
  .main-preview-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 24px;
    padding: 3rem;
    margin-bottom: 3rem;
    text-align: center;
  }
  
  .main-preview-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2rem;
  }
  
  .main-preview-image-wrapper {
    max-width: 400px;
    margin: 0 auto;
    position: relative;
  }
  
  .main-preview-image {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.4);
    background: #fff;
  }
  
  /* Frame color is shown in the mockup images; do not add borders to the preview container. */
  
  .main-preview-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2rem 0 0.5rem;
    color: #fff;
  }
  
  .main-preview-price {
    font-size: 1.25rem;
    color: #e94560;
    font-weight: 600;
  }
  
  /* Section Headers */
  .ai-generator-wrapper .section-header {
    text-align: center;
    margin-bottom: 1.5rem;
  }
  
  .ai-generator-wrapper .section-header__title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #667eea;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
  }
  
  .ai-generator-wrapper .section-header__subtitle {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
  }
  
  /* CTA Button */
  .cta-section {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eef2f7;
  }
  
  .cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 3rem;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
  }
  
  .cta-button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.35);
  }
  
  .cta-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  .cta-hint {
    margin-top: 1rem;
    font-size: 1rem;
    color: #666;
  }
  
  /* Loading State */
  .mockup-loading-text {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
    margin-top: 1.5rem;
  }
  
  /* Mockup Navigation */
  .mockup-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    color: #1a1a2e;
  }
  
  .mockup-nav-btn:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.1);
  }
  
  .mockup-prev { left: -24px; }
  .mockup-next { right: -24px; }
  
  @media (max-width: 768px) {
    .mockup-prev { left: 10px; }
    .mockup-next { right: 10px; }
  }
  
  .mockup-thumbnails {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
  }
  
  .mockup-thumb {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s ease;
    opacity: 0.5;
  }
  
  .mockup-thumb:hover {
    opacity: 0.8;
  }
  
  .mockup-thumb.active {
    border-color: #e94560;
    opacity: 1;
  }
  
  .mockup-counter {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    margin-top: 1rem;
  }

  /* Legacy styles for compatibility */
  .canvas-preview-wrapper {
    position: relative;
    margin: 0 auto 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .canvas-preview {
    background: #f5f5f5;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .canvas-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .canvas-preview.size-6x6 { width: 80px; height: 80px; }
  .canvas-preview.size-12x12 { width: 100px; height: 100px; }
  .canvas-preview.size-20x20 { width: 120px; height: 120px; }
    color: #fff;
  }
  
  /* Frame Color Swatches */
  .frame-colors {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 1.5rem;
  }
  
  .frame-color-item {
    text-align: center;
    cursor: pointer;
  }
  
  .frame-color-swatch {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin: 0 auto 0.5rem;
    transition: all 0.2s ease;
    border: 3px solid transparent;
  }
  
  .frame-color-swatch.white { 
    background: #fff; 
    box-shadow: inset 0 0 0 1px #ddd;
  }
  .frame-color-swatch.black { background: #1a1a1a; }
  .frame-color-swatch.espresso { background: #3c2415; }
  
  .frame-color-item.selected .frame-color-swatch {
    border-color: #000;
    transform: scale(1.15);
  }
  
  .frame-color-name {
    font-size: 0.8rem;
    color: #666;
    text-transform: capitalize;
  }
  
  .frame-color-item.selected .frame-color-name {
    font-weight: 600;
    color: #000;
  }
  
  /* Main Preview */
  .main-preview-section {
    background: linear-gradient(180deg, #fafafa 0%, #f0f0f0 100%);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    text-align: center;
  }
  
  .main-preview-label {
    font-size: 0.85rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
  }
  
  .main-preview-image-wrapper {
    max-width: 320px;
    margin: 0 auto;
  }
  
  .main-preview-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.18);
    background: #fff;
  }
  
  /* Frame color is shown in the mockup images; do not add borders to the preview container. */
  
  .main-preview-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 1.5rem 0 0.5rem;
    color: #1a1a1a;
  }
  
  .main-preview-price {
    font-size: 1.25rem;
    color: #000;
    font-weight: 600;
  }
  
  /* Section Headers */
  .ai-generator-wrapper .section-header {
    text-align: center;
    margin-bottom: 1.5rem;
  }
  
  .ai-generator-wrapper .section-header__title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
  }
  
  .ai-generator-wrapper .section-header__subtitle {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
  }
  
  /* Options Container */
  .options-container {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  }
  
  /* CTA Button */
  .cta-section {
    text-align: center;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
  }
  
  .cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.125rem 2.5rem;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .cta-button:hover:not(:disabled) {
    background: #333;
    transform: translateY(-2px);
  }
  
  .cta-button:disabled {
    background: #ccc;
    cursor: not-allowed;
  }
  
  .cta-hint {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #666;
  }
  
  /* Loading State */
  .mockup-loading-text {
    font-size: 0.9rem;
    color: #888;
    margin-top: 1rem;
  }
  
  /* Mockup Navigation */
  .main-preview-image-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
  }
  
  .mockup-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  
  .mockup-nav-btn:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  }
  
  .mockup-prev { left: -60px; }
  .mockup-next { right: -60px; }
  
  @media (max-width: 768px) {
    .mockup-prev { left: 10px; }
    .mockup-next { right: 10px; }
  }
  
  .mockup-thumbnails {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1rem;
    flex-wrap: wrap;
  }
  
  .mockup-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    opacity: 0.6;
  }
  
  .mockup-thumb:hover {
    opacity: 0.8;
  }
  
  .mockup-thumb.active {
    border-color: #000;
    opacity: 1;
  }
  
  .mockup-counter {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.5rem;
  }

  /* Legacy styles for form section */
  .canvas-option-card {
    border: 2px solid #ddd;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
  }
  .canvas-option-card:hover {
    border-color: #999;
    transform: translateY(-2px);
  }
  .canvas-option-card.selected {
    border-color: #000;
    background: #f5f5f5;
  }
  .canvas-option-card h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
  }
  .canvas-option-card .price {
    color: #666;
    font-size: 0.9rem;
  }
  .canvas-preview-wrapper {
    position: relative;
    margin: 0 auto 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .canvas-preview {
    background: #f5f5f5;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .canvas-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .canvas-preview.size-6x6 { width: 80px; height: 80px; }
  .canvas-preview.size-12x12 { width: 100px; height: 100px; }
  .canvas-preview.size-20x20 { width: 120px; height: 120px; }

  /* ==========================================================
     Minimal / elegant / polished overrides (Dawn-like)
     Keep all functionality intact; just restyle.
     ========================================================== */
  .ai-generator-wrapper {
    --ink: rgb(var(--color-foreground));
    --muted: rgba(var(--color-foreground), .7);
    --surface: rgb(var(--color-background));
    --surface-2: rgb(var(--color-background));
    --border: rgba(var(--color-foreground), .12);
    --card-shadow: 0 10px 30px rgba(0,0,0,.06);
    --card-hover-shadow: 0 14px 36px rgba(0,0,0,.08);
    --radius-lg: 18px;
    --radius-md: 14px;
  }

  .ai-content {
    background: var(--surface);
    padding: 2rem 0 2.5rem;
  }
  .ai-content__inner {
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 0 1.5rem;
  }
  @media screen and (min-width: 750px) {
    .ai-content__inner { padding: 0 5rem; }
  }

  .ai-generator-wrapper--signed-in .ai-header {
    display: none;
  }
  .ai-generator-wrapper--signed-out .ai-header {
    display: block;
    margin: 0 0 1.75rem;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    color: var(--ink);
  }
  .ai-header__controls {
    display: none;
  }
  .ai-header__title {
    margin: 0;
    font-family: var(--font-heading-family);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--ink);
  }
  .ai-header__subtitle {
    margin: .5rem 0 0;
    color: var(--muted);
    line-height: 1.5;
    max-width: 52ch;
  }
  .ai-header__meta {
    margin: .35rem 0 0;
    color: var(--muted);
    line-height: 1.45;
  }

  .ai-generator-wrapper.is-canvas-view .ai-header {
    padding-bottom: 0;
    margin-bottom: .5rem;
  }
  .ai-generator-wrapper.is-canvas-view .ai-header__title,
  .ai-generator-wrapper.is-canvas-view .ai-header__subtitle {
    display: none;
  }
  .ai-generator-wrapper.is-canvas-view .ai-header__controls {
    display: none;
    margin-bottom: 0;
  }
  .ai-generator-wrapper.is-canvas-view #step-3 {
    margin-top: .35rem;
  }
  .ai-generator-wrapper.is-canvas-view #ai-stepper {
    display: none;
  }

  .ai-create-hero {
    display: none;
  }

  .ai-form-card,
  .options-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: none;
  }
  .ai-form-card { padding: 1.5rem; }
  .ai-form-card__title {
    line-height: 1.2;
    font-weight: 700;
    margin: 0;
  }
  .ai-form-card__meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: .65rem;
    flex-wrap: wrap;
    margin-left: auto;
  }
  .ai-path-composer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
    margin: 0 0 1.25rem;
  }
  .ai-path-option {
    appearance: none;
    border: 1px solid rgba(var(--color-foreground), .14);
    border-radius: .5rem;
    background: rgb(var(--color-background));
    color: rgb(var(--color-foreground));
    padding: 16px 18px;
    min-height: 92px;
    text-align: left;
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease, transform .16s ease;
  }
  .ai-path-option:hover {
    border-color: rgba(var(--color-foreground), .3);
    transform: translateY(-1px);
  }
  .ai-path-option.is-active,
  .ai-path-option[aria-selected="true"] {
    border-color: rgb(var(--color-foreground));
    box-shadow: inset 0 0 0 .08rem rgb(var(--color-foreground));
    background: rgba(var(--color-foreground), .025);
  }
  .ai-path-option__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
  }
  .ai-path-option__label {
    display: block;
    font-weight: 850;
    font-size: 18px;
    line-height: 1.2;
  }
  .ai-path-option__badge {
    border: 1px solid rgba(var(--color-foreground), .16);
    border-radius: 999px;
    padding: 3px 8px;
    color: rgba(var(--color-foreground), .62);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
  }
  .ai-path-option__text {
    margin: .45rem 0 0;
    color: rgba(var(--color-foreground), .66);
    font-size: 14px;
    line-height: 1.45;
  }
  .ai-generator-login-wall {
    border-top: 1px solid rgba(var(--color-foreground), .12);
    border-bottom: 1px solid rgba(var(--color-foreground), .12);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem 1rem 2.1rem;
    margin: .4rem auto 1.5rem;
    max-width: 38rem;
    text-align: center;
  }
  .ai-generator-login-wall[hidden] {
    display: none;
  }
  .ai-generator-login-wall__eyebrow {
    margin: 0 0 -.15rem;
    color: rgba(var(--color-foreground), .58);
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .14em;
    text-transform: uppercase;
  }
  .ai-generator-login-wall__title {
    margin: 0;
    color: rgb(var(--color-foreground));
    font-size: clamp(1.55rem, 2vw, 2rem);
    line-height: 1.15;
    font-weight: 760;
  }
  .ai-generator-login-wall__copy {
    margin: 0;
    color: rgba(var(--color-foreground), .68);
    max-width: 31rem;
    line-height: 1.55;
    text-wrap: pretty;
  }
  .ai-generator-login-wall__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    border-radius: 999px;
    padding: .75rem 1.1rem;
    background: rgb(var(--color-foreground));
    color: rgb(var(--color-background));
    text-decoration: none;
    font-weight: 850;
  }
  .ai-field__label {
    font-size: 1.12rem;
    font-weight: 700;
  }
  .ai-field__hint {
    font-size: .95rem;
    color: var(--muted);
  }
  .ai-file-upload__text {
    font-size: 1rem;
    color: var(--muted);
  }
  .ai-file-upload__meta {
    font-size: .94rem;
  }
  .ai-file-upload__body {
    align-items: flex-start;
  }
  .ai-edit-source {
    margin-top: .65rem;
    padding: .65rem .75rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(var(--color-foreground), .03);
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: .55rem;
    flex-wrap: wrap;
  }
  .ai-edit-source__text {
    font-size: .88rem;
    color: var(--ink);
    font-weight: 700;
  }
  .ai-edit-source__btn {
    appearance: none;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font-size: .82rem;
    font-weight: 700;
    padding: .45rem .7rem;
    cursor: pointer;
  }
  .ai-edit-source__btn:hover {
    border-color: rgba(var(--color-foreground), .3);
  }
  .ai-generator-wrapper.is-upload-path .ai-field--requires-auth {
    display: none;
  }
  .ai-generator-wrapper.is-upload-path #ai-edit-source {
    display: none !important;
  }
  .ai-generator-wrapper.is-upload-path #step-1 .ai-create-grid__primary-action,
  .ai-generator-wrapper.is-generate-path .ai-file-upload__actions {
    display: none;
  }
  .ai-generator-wrapper--signed-out.is-generator-locked #step-1 .ai-form-card__header {
    display: none;
  }
  .ai-generator-wrapper.is-generator-locked #ai-generator-form {
    display: none;
  }
  .ai-file-upload__actions {
    display: flex;
    align-items: center;
    gap: .7rem;
    flex-wrap: wrap;
  }
  .ai-file-upload__actions[hidden] {
    display: none;
  }
  .ai-upload-canvas-btn {
    appearance: none;
    border: 1px solid rgb(var(--color-foreground));
    border-radius: 8px;
    background: rgb(var(--color-foreground));
    color: rgb(var(--color-background));
    min-height: 2.9rem;
    padding: .78rem 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    font: inherit;
    font-size: .98rem;
    font-weight: 800;
    cursor: pointer;
    transition: opacity .16s ease, transform .16s ease, box-shadow .16s ease;
    box-shadow: 0 12px 26px rgba(0, 0, 0, .13);
  }
  .ai-upload-canvas-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, .16);
  }
  .ai-upload-canvas-btn:disabled {
    opacity: .62;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
  }
  .ai-upload-canvas-btn svg {
    width: 1.08rem;
    height: 1.08rem;
    flex: 0 0 auto;
  }
  .ai-upload-artwork-status {
    color: rgba(var(--color-foreground), .64);
    font-size: .9rem;
    font-weight: 650;
  }
  .ai-generate-btn--auth {
    text-decoration: none;
    background: rgb(var(--color-background));
    color: rgb(var(--color-foreground));
    border: 1px solid rgba(var(--color-foreground), .18);
  }
  .ai-generate-btn {
    font-size: 1.08rem;
    padding: 1rem 1.4rem;
  }

  @media (max-width: 749px) {
    .ai-path-composer {
      grid-template-columns: 1fr;
    }
    .ai-model-selector {
      grid-template-columns: 1fr;
    }
    .ai-path-option {
      min-height: 0;
    }
    .ai-file-upload__body {
      flex-direction: column;
      text-align: center;
      align-items: center;
    }
    .ai-file-upload__copy {
      text-align: center;
    }
    .ai-create-preview__secondary-actions {
      grid-template-columns: 1fr;
    }
  }

  /* Step 1: two-column layout (controls left, preview right) */
  .ai-create-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
    gap: 1.5rem;
    align-items: start;
  }
  @media (max-width: 900px) {
    .ai-create-grid { grid-template-columns: 1fr; }
  }
  .ai-create-preview {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(var(--color-foreground), .015);
    overflow: hidden;
    min-height: 320px;
    display: grid;
    place-items: center;
    position: relative;
  }
  .ai-create-preview__stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  .ai-create-preview.has-image {
    background: var(--surface);
  }
  .ai-create-preview img {
    width: 100%;
    height: 100%;
    max-height: 520px;
    object-fit: contain;
    display: block;
    background: var(--surface);
    transition: filter .15s ease;
    position: relative;
    z-index: 1;
  }
  .ai-create-preview.is-loading img {
    filter: brightness(.55);
  }
  .ai-create-preview__empty {
    text-align: center;
    color: var(--muted);
    max-width: 360px;
    padding: 1.25rem;
  }
  .ai-create-preview__empty strong {
    display: block;
    color: var(--ink);
    font-weight: 900;
    margin-bottom: .35rem;
  }

  .ai-create-preview__loading {
    display: none;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: .85rem;
    text-align: center;
    color: var(--muted);
    padding: 1.25rem;
    pointer-events: none;
    z-index: 3;
  }
  .ai-create-preview__loading-title {
    margin: 0;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,.45);
  }
  .ai-create-preview__loading-subtext {
    margin: 0;
    color: rgba(255,255,255,.92);
    text-shadow: 0 1px 2px rgba(0,0,0,.45);
  }
  .ai-create-preview.is-loading .ai-create-preview__loading {
    display: flex;
  }
  .ai-create-preview__spinner {
    width: 26px;
    height: 26px;
    border: 3px solid rgba(255,255,255,.34);
    border-top-color: #fff;
    border-radius: 999px;
    animation: aiSpin 1s linear infinite;
    margin: 0;
  }
  @keyframes aiSpin { to { transform: rotate(360deg); } }

  .ai-create-preview__error {
    display: none;
    padding: .85rem 1rem;
    border-radius: 10px;
    background: rgba(220,38,38,.05);
    border: 1px solid rgba(220,38,38,.14);
    color: rgb(185, 28, 28);
    margin: 0 1rem;
  }
  .ai-create-preview__error.is-upsell {
    background: transparent;
    border: none;
    color: inherit;
    padding: 0;
    margin: 1rem 1.25rem 0;
    width: calc(100% - 2.5rem);
  }
  .ai-no-credits-card {
    border: 1px solid rgba(var(--color-foreground), .1);
    border-radius: 10px;
    background: rgba(var(--color-foreground), .02);
    padding: .85rem 1rem;
    text-align: left;
  }
  .ai-no-credits-card__title {
    margin: 0;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 900;
  }
  .ai-no-credits-card__text {
    margin: .4rem 0 0;
    color: var(--muted);
    font-size: .94rem;
    line-height: 1.45;
  }
  .ai-no-credits-card__actions {
    margin-top: .9rem;
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
  }
  .ai-no-credits-card__btn {
    appearance: none;
    border-radius: 999px;
    padding: .62rem .9rem;
    font-weight: 900;
    font-size: .9rem;
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink);
  }
  .ai-no-credits-card__btn--primary {
    border: none;
    background: var(--ink);
    color: var(--surface);
  }

  .ai-create-preview__actions {
    display: none;
    gap: .85rem;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1rem 1.25rem;
  }
  .ai-create-preview__next-step {
    display: none;
    width: 100%;
  }
  .ai-create-preview__secondary-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
  }
  .ai-create-preview__actions a,
  .ai-create-preview__actions button {
    appearance: none;
    width: 100%;
    min-height: 4.2rem;
    border-radius: 14px;
    padding: .75rem 1rem;
    font-weight: 900;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
  }
  .ai-create-preview__actions .ai-primary {
    border: none;
    background: var(--ink);
    color: var(--surface);
  }
  .ai-create-preview__continue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
  }
  .ai-create-preview__continue svg {
    width: 1.2rem;
    height: 1.2rem;
    flex: 0 0 auto;
  }

  /* Lightbox */
  .ai-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    z-index: 3;
    cursor: zoom-out;
  }
  .ai-lightbox.is-open { display: flex; }
  .ai-lightbox__img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(1100px, 96vw);
    max-height: 86vh;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 48px rgba(0,0,0,.25);
  }

  .ai-form-card__header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
  }
  .ai-form-card__icon {
    display: none;
  }

  .ai-step {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: none;
    border-radius: 10px;
    padding: .65rem .85rem;
  }
  .ai-step__num {
    width: 26px;
    height: 26px;
    background: rgba(var(--color-foreground), .05);
    color: rgba(var(--color-foreground), .45);
  }
  .ai-step.is-active {
    border-color: rgba(var(--color-foreground), .2);
  }
  .ai-step.is-active .ai-step__num {
    background: var(--ink);
    color: var(--surface);
  }
  .ai-stepper {
    margin: .5rem 0;
  }

  .ai-textarea {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
  }
  .ai-textarea:focus {
    border-color: rgba(var(--color-foreground), .3);
    box-shadow: none;
  }

  .ai-file-upload {
    background: transparent;
    border: 1px dashed rgba(var(--color-foreground), .18);
    border-radius: 10px;
  }
  .ai-file-upload:hover {
    border-color: rgba(var(--color-foreground), .3);
    background: rgba(var(--color-foreground), .02);
  }

  /* Primary action buttons: clean black */
  .ai-generate-btn,
  .cta-button {
    background: var(--ink);
    color: var(--surface);
    border-radius: 999px;
    box-shadow: none;
  }
  .ai-generate-btn:hover,
  .cta-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(0,0,0,.12);
    background: rgba(var(--color-foreground), .92);
  }

  /* Variant pills: neutral, no gradients */
  .ai-variant-pill,
  .frame-option-btn {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink);
    border-radius: 999px;
  }
  .ai-variant-input:checked + .ai-variant-pill {
    border-color: rgba(var(--color-foreground), .35);
    background: rgba(var(--color-foreground), .06);
    box-shadow: none;
  }
  .frame-option-btn.selected {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--surface);
  }
  .frame-option-btn.is-unavailable {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
  }

  /* Frame color swatches: quieter */
  .frame-color-swatch {
    box-shadow: none;
    border-width: 2px;
    border-color: transparent;
  }
  .frame-color-item.selected .frame-color-swatch {
    border-color: var(--ink);
    transform: none;
  }

  /* Preview area: white card, not dark */
  .main-preview-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    padding: 2.25rem;
  }
  .main-preview-label { color: var(--muted); }
  .main-preview-title { color: var(--ink); }
  .main-preview-price { color: var(--ink); }
  .mockup-loading-text { color: var(--muted); }

  .mockup-nav-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: none;
  }
  .mockup-thumb.active {
    border-color: var(--ink);
  }

  /* Step 3 product layout (inline canvas selector) */
  #step-3 .ai-canvas-product-toolbar {
    display: flex;
    justify-content: flex-start;
    margin: 0 0 1rem 0;
  }
  #step-3 .ai-canvas-product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(32rem, .85fr);
    gap: 4rem;
    align-items: start;
  }
  #step-3 .ai-canvas-media-panel {
    position: sticky;
    top: calc(var(--header-height, 0px) + 1rem);
    max-width: none;
  }
  #step-3 .ai-canvas-options-panel {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
  }
  #step-3 .main-preview-section {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  #step-3 .main-preview-image-wrapper {
    width: 100%;
    max-width: none;
    aspect-ratio: 4 / 3;
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: .4rem;
    background: rgb(var(--color-background));
    display: block;
    border: 0.1rem solid rgba(var(--color-foreground), .08);
  }
  #step-3 .main-preview-image-wrapper.has-konva-mockup {
    background: rgb(var(--color-background));
  }
  #step-3 .main-preview-image-wrapper.is-konva-preparing {
    background-color: #edf0f3;
    background-image: var(--ai-konva-preparing-bg, none);
    background-position: var(--ai-konva-preparing-bg-position, center);
    background-repeat: no-repeat;
    background-size: var(--ai-konva-preparing-bg-size, cover);
  }
  #step-3 .main-preview-image {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: contain;
    object-position: center;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  #step-3 .main-preview-image[hidden] {
    display: none !important;
  }
  #step-3 .main-preview-image.is-konva-hidden {
    opacity: 0;
  }
  #step-3 .ai-konva-mockup-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    display: none;
  }
  #step-3 .ai-konva-mockup-layer canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
  }
  #step-3 .mockup-loading-text {
    text-align: left;
    margin: 1rem 0 0;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-size: .95rem;
  }
  #step-3 .mockup-thumbnails {
    justify-content: flex-start;
    margin-top: 1.4rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: min(100%, 46rem);
  }
  #step-3 .mockup-counter {
    text-align: left;
    margin-top: .65rem;
  }
  #step-3 .mockup-prev { left: 10px; }
  #step-3 .mockup-next { right: 10px; }
  #step-3 .mockup-nav-btn { z-index: 2; }
  #step-3 .ai-product-detail__eyebrow {
    margin: 0 0 1rem;
    color: rgba(var(--color-foreground), .6);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
  }
  #step-3 .ai-product-detail__title {
    margin: 0;
    font-size: clamp(2.8rem, 4.4vw, 5.2rem);
    line-height: 1.06;
    font-weight: 400;
    letter-spacing: -.03em;
    color: var(--ink);
  }
  #step-3 .ai-product-detail__price {
    margin: 1.8rem 0 2.4rem;
    font-size: 1.75rem;
    font-weight: 500;
    letter-spacing: -.02em;
    color: var(--ink);
  }
  #step-3 .ai-product-detail__group {
    margin-bottom: 2rem;
  }
  #step-3 .ai-product-detail__group--framing {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  #step-3 .section-header {
    text-align: left;
    margin: 0 0 1rem;
  }
  #step-3 .section-header__title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: none;
  }
  #step-3 .section-header__subtitle {
    margin-top: .45rem;
    color: rgba(var(--color-foreground), .62);
    font-size: .98rem;
    line-height: 1.45;
  }
  #step-3 .ai-product-grid {
    margin: 0;
  }
  #step-3 .ai-variant-fieldset {
    justify-content: flex-start;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
  }
  #step-3 .frame-options-grid,
  #step-3 .frame-colors {
    justify-content: flex-start;
  }
  #step-3 .frame-options-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
  }
  #step-3 .ai-variant-pill {
    min-height: 4.75rem;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.2rem;
    border-width: 0.1rem;
    border-color: rgba(var(--color-foreground), .2);
    border-radius: 999px;
    box-shadow: none;
    font-size: 1rem;
    background: rgb(var(--color-background));
    color: rgb(var(--color-foreground));
  }
  #step-3 .ai-variant-pill__price {
    font-size: 1.1rem;
    color: #5e74e8;
  }
  #step-3 .ai-variant-input:checked + .ai-variant-pill {
    border-color: rgb(var(--color-foreground));
    background: rgb(var(--color-foreground));
    color: rgb(var(--color-background));
    box-shadow: none;
  }
  #step-3 .ai-variant-input:checked + .ai-variant-pill .ai-variant-pill__price {
    color: rgba(var(--color-background), .82);
  }
  #step-3 .frame-option-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 1rem .75rem;
    font-size: 1rem;
    font-weight: 700;
    border-width: 0.1rem;
    border-color: rgba(var(--color-foreground), .2);
    border-radius: 0;
    background: rgb(var(--color-background));
    color: rgb(var(--color-foreground));
  }
  #step-3 .frame-option-btn.selected {
    border-color: rgb(var(--color-foreground));
    background: rgb(var(--color-foreground));
    color: rgb(var(--color-background));
  }
  #step-3 .cta-section {
    text-align: left;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }
  #step-3 .cta-button {
    width: 100%;
    justify-content: center;
    min-height: 5rem;
    border-radius: 0;
    font-size: 1.1rem;
    font-weight: 800;
  }
  #step-3 .cta-hint {
    margin: 1rem 0 0;
    color: rgba(var(--color-foreground), .72);
    font-size: 1rem;
    line-height: 1.5;
  }
  #step-3 .ai-product-detail__details-list {
    margin-top: 2rem;
    border-top: 1px solid rgba(var(--color-foreground), .1);
  }
  #step-3 #ai-back-to-design {
    padding: .7rem 1rem;
    border: 1px solid rgba(var(--color-foreground), .14);
    background: rgb(var(--color-background));
    color: rgb(var(--color-foreground));
    border-radius: 8px;
    min-height: 2.75rem;
    font-size: 1.02rem;
    font-weight: 750;
    letter-spacing: .01em;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .04);
  }
  #step-3 #ai-back-to-design:hover {
    color: rgb(var(--color-foreground));
    border-color: rgba(var(--color-foreground), .28);
    background: rgba(var(--color-foreground), .04);
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, .07);
  }
  #step-3 #ai-back-to-design svg {
    width: 1.05rem;
    height: 1.05rem;
    stroke-width: 2;
  }
  #step-3 .ai-product-detail__details {
    border-bottom: 1px solid rgba(var(--color-foreground), .1);
  }
  #step-3 .ai-product-detail__details summary {
    list-style: none;
    cursor: pointer;
    padding: 1.15rem 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  #step-3 .ai-product-detail__details summary::-webkit-details-marker {
    display: none;
  }
  #step-3 .ai-product-detail__details summary::after {
    content: '+';
    font-size: 1.4rem;
    line-height: 1;
    color: rgba(var(--color-foreground), .62);
  }
  #step-3 .ai-product-detail__details[open] summary::after {
    content: '−';
  }
  #step-3 .ai-product-detail__details-body {
    padding: 0 0 1.15rem;
    color: rgba(var(--color-foreground), .72);
    line-height: 1.6;
  }
  #step-3 .ai-product-detail__quality-note {
    margin: 1rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(var(--color-foreground), .08);
    color: rgba(var(--color-foreground), .78);
  }
  #step-3 .ai-product-detail__spec-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: .65rem;
  }
  #step-3 .ai-product-detail__spec-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding-bottom: .65rem;
    border-bottom: 1px solid rgba(var(--color-foreground), .08);
  }
  #step-3 .ai-product-detail__spec-list li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }
  #step-3 .ai-product-detail__spec-label {
    color: rgba(var(--color-foreground), .56);
  }
  #step-3 .ai-product-detail__spec-value {
    color: rgb(var(--color-foreground));
    font-weight: 600;
    text-align: right;
  }
  @media (max-width: 989px) {
    #step-3 .ai-canvas-product-toolbar {
      margin-bottom: 1.1rem;
    }
    #step-3 .ai-canvas-product-layout {
      grid-template-columns: 1fr;
      gap: 1.35rem;
    }
    #step-3 .ai-canvas-media-panel {
      position: static;
      top: auto;
    }
    #step-3 .ai-product-detail__title {
      font-size: clamp(2rem, 8vw, 3rem);
    }
    #step-3 .ai-variant-fieldset {
      grid-template-columns: 1fr;
    }
    #step-3 .frame-options-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    #step-3 .main-preview-image-wrapper {
      width: 100%;
      max-width: none;
      margin: 0 auto;
    }
  }

  /* Step 1: bring the generator closer to the open Dawn product layout */
  #step-1 .ai-form-card {
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
  }
  #step-1 .ai-form-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: none;
    margin: 0 0 0.55rem;
    padding: 0;
    border: 0;
  }
  #step-1 .ai-form-card__icon {
    display: none;
  }
  #step-1 .ai-form-card__title {
    font-size: clamp(2.25rem, 3vw, 2.85rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: none;
    color: rgb(var(--color-foreground));
    flex: 0 1 auto;
  }
  #step-1 .ai-create-grid {
    grid-template-areas:
      "details preview"
      "generate continue";
    grid-template-columns: minmax(33.5rem, 0.96fr) minmax(0, 1.18fr);
    gap: 0.8rem 2rem;
    align-items: start;
  }
  #step-1 .ai-create-left {
    grid-area: details;
    order: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
    justify-self: start;
    padding-top: 0;
    min-height: 100%;
    height: 100%;
  }
  #step-1 .ai-create-left > .ai-field {
    display: flex;
    flex-direction: column;
  }
  .ai-generator-wrapper.is-upload-path #step-1 .ai-create-left > .ai-field--requires-auth {
    display: none;
  }
  #step-1 .ai-create-left > .ai-field:first-child {
    flex: 1 1 44%;
  }
  #step-1 .ai-create-left > .ai-field--model {
    flex: 0 0 auto;
  }
  #step-1 .ai-create-left > .ai-field:last-child {
    flex: 1.2 1 56%;
  }
  #step-1 .ai-create-preview__stack {
    grid-area: preview;
    order: 2;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    position: static;
    top: auto;
    min-height: 100%;
  }
  #step-1 .ai-create-grid__primary-action {
    grid-area: generate;
  }
  #step-1 .ai-create-grid__secondary-action {
    grid-area: continue;
  }
  #step-1 .ai-field {
    margin-bottom: 0;
  }
  #step-1 .ai-field + .ai-field {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(var(--color-foreground), 0.1);
  }
  #step-1 .ai-field__label {
    margin-bottom: 0.62rem;
    font-size: 1.28rem;
    font-weight: 700;
    color: rgb(var(--color-foreground));
    line-height: 1.3;
  }
  #step-1 .ai-field__hint {
    color: rgba(var(--color-foreground), 0.6);
    font-size: 1.12rem;
  }
  #step-1 .ai-textarea {
    flex: 1 1 auto;
    min-height: 15.2rem;
    padding: 1.05rem 1.12rem;
    border-width: 0.1rem;
    border-radius: 0;
    background: rgb(var(--color-background));
    font-size: 1.16rem;
    line-height: 1.6;
  }
  #step-1 .ai-textarea::placeholder {
    color: rgba(var(--color-foreground), 0.38);
  }
  #step-1 .ai-file-upload {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 0.72rem;
    min-height: 19.5rem;
    padding: 1.08rem 1.16rem;
    border-style: solid;
    border-width: 0.1rem;
    border-radius: 0;
    background: rgb(var(--color-background));
    cursor: default;
  }
  #step-1 .ai-file-upload__body {
    position: relative;
    align-items: flex-start;
    gap: 0.9rem;
    min-height: 5rem;
  }
  #step-1 .ai-file-upload input[type="file"] {
    inset: 0;
  }
  #step-1 .ai-file-upload__copy {
    padding-top: 0.1rem;
  }
  #step-1 .ai-file-upload__icon {
    width: 3.15rem;
    height: 3.15rem;
    border-radius: 0;
    background: rgba(var(--color-foreground), 0.06);
    color: rgb(var(--color-foreground));
  }
  #step-1 .ai-file-upload__text {
    font-size: 1.16rem;
    line-height: 1.45;
  }
  #step-1 .ai-file-upload__meta {
    line-height: 1.52;
    font-size: 1.04rem;
  }
  #step-1 #ai-file-meta {
    margin-top: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(var(--color-foreground), 0.62);
  }
  #step-1 .ai-edit-source {
    margin-top: 0;
    border: 0.1rem solid rgba(var(--color-foreground), 0.12);
    border-radius: 0;
    background: rgba(var(--color-foreground), 0.02);
    padding: 0.82rem 0.94rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
    flex: 1 1 auto;
  }
  #step-1 .ai-edit-source__summary {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
  }
  #step-1 .ai-edit-source__thumb {
    width: 3.6rem;
    height: 3.6rem;
    flex: 0 0 3.6rem;
    overflow: hidden;
    border: 0.1rem solid rgba(var(--color-foreground), 0.12);
    background: rgba(var(--color-foreground), 0.04);
  }
  #step-1 .ai-edit-source__thumb[hidden] {
    display: none;
  }
  #step-1 .ai-edit-source__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  #step-1 .ai-edit-source__copy {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
  }
  #step-1 .ai-edit-source__eyebrow {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(var(--color-foreground), 0.52);
  }
  #step-1 .ai-edit-source__text {
    font-size: 1.08rem;
    font-weight: 700;
    color: rgb(var(--color-foreground));
  }
  #step-1 .ai-edit-source__hint {
    font-size: 0.98rem;
    line-height: 1.4;
    color: rgba(var(--color-foreground), 0.68);
  }
  #step-1 .ai-edit-source__actions {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-top: auto;
  }
  #step-1 .ai-edit-source__btn {
    min-height: 3.05rem;
    border-radius: 0;
    padding: 0.6rem 0.9rem;
    font-size: 0.98rem;
    font-weight: 700;
    color: rgb(var(--color-foreground));
    background: rgb(var(--color-background));
    border: 0.1rem solid rgba(var(--color-foreground), 0.16);
  }
  #step-1 .ai-edit-source__btn.is-active {
    color: rgb(var(--color-background));
    background: rgb(var(--color-foreground));
    border-color: rgb(var(--color-foreground));
  }
  #step-1 .ai-generate-btn {
    width: 100%;
    min-height: 4.7rem;
    margin-top: 0;
    border-radius: 0;
    font-size: 1.28rem;
    font-weight: 800;
    letter-spacing: 0.01em;
  }
  #step-1 .ai-generate-btn.ai-generate-btn--auth {
    background: rgb(var(--color-background));
    color: rgb(var(--color-foreground));
    border: 0.1rem solid rgba(var(--color-foreground), 0.16);
    box-shadow: none;
  }
  #step-1 .ai-generate-btn.ai-generate-btn--auth:hover {
    background: rgba(var(--color-foreground), 0.04);
    border-color: rgba(var(--color-foreground), 0.28);
    box-shadow: none;
  }
  #step-1 .ai-create-preview {
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
    display: block;
  }
  #step-1 .ai-create-preview__empty,
  #step-1 .ai-create-preview img {
    width: 100%;
    min-height: clamp(15.8rem, 32vw, 27.25rem);
    border: 0.1rem solid rgba(var(--color-foreground), 0.08);
    border-radius: 0.4rem;
    background: rgb(var(--color-background));
  }
  #step-1 .ai-create-preview__empty {
    max-width: none;
    padding: 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(180deg, rgba(var(--color-foreground), 0.03), rgba(var(--color-foreground), 0.01));
    font-size: 1.22rem;
    line-height: 1.6;
  }
  #step-1 .ai-create-preview__empty strong {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    letter-spacing: 0.02em;
  }
  #step-1 .ai-create-preview__download-icon {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    z-index: 4;
    width: 3rem;
    height: 3rem;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(17, 24, 39, 0.84);
    color: rgb(var(--color-background));
    cursor: pointer;
    box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.22);
    transition: transform 0.18s ease, background 0.18s ease;
  }
  #step-1 .ai-create-preview__download-icon:hover,
  #step-1 .ai-create-preview__download-icon:focus-visible {
    background: rgba(17, 24, 39, 0.95);
    transform: translateY(-1px);
  }
  #step-1 .ai-create-preview__download-icon[hidden] {
    display: none;
  }
  #step-1 .ai-create-preview__download-icon svg {
    width: 1.35rem;
    height: 1.35rem;
  }
  #step-1 .ai-create-preview img {
    max-height: none;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    object-position: center;
    border-radius: 0.4rem;
    background: rgb(var(--color-background));
  }
  #step-1 .ai-create-preview__loading {
    inset: 0;
    min-height: clamp(15.8rem, 32vw, 27.25rem);
    border-radius: 0.4rem;
  }
  #step-1 .ai-create-preview__loading-inner {
    width: min(36rem, 88%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    margin: 0 auto;
  }
  #step-1 .ai-create-preview__loading-title {
    font-size: clamp(2rem, 2.4vw, 2.7rem);
    line-height: 1.08;
  }
  #step-1 .ai-create-preview__loading-subtext {
    font-size: 1.2rem;
    line-height: 1.5;
    max-width: 34rem;
  }
  #step-1 .ai-create-preview__spinner {
    width: 2rem;
    height: 2rem;
    border-width: 0.24rem;
  }
  #step-1 .ai-create-preview__error {
    margin: 1rem 0 0;
    border-radius: 0;
  }
  #step-1 .ai-create-preview__error.is-upsell {
    margin: 1rem 0 0;
    width: 100%;
  }
  #step-1 .ai-create-preview__actions {
    display: none !important;
  }
  #step-1 .ai-create-preview__secondary-actions {
    display: none;
  }
  #step-1 .ai-create-preview__actions a,
  #step-1 .ai-create-preview__actions button,
  #step-1 .ai-create-preview__next-step {
    min-height: 4.7rem;
    border-radius: 0;
    font-size: 1.28rem;
    font-weight: 700;
  }
  #step-1 .ai-create-preview__next-step {
    justify-content: center;
    width: 100%;
    margin-top: 0;
  }
  #step-1 .ai-create-preview__continue {
    gap: 0.7rem;
  }
  #step-1 .ai-form-card__meta .ai-credits-pill {
    min-height: 3.2rem;
    padding: 0.6rem 1rem;
    font-size: 1.08rem;
  }
  #step-1 .ai-form-card__meta .ai-buy-credits-btn {
    min-height: 3.2rem;
    padding: 0.55rem 1rem;
    font-size: 1.06rem;
  }
  #step-3 .ai-product-detail__title {
    font-size: clamp(3.2rem, 4.2vw, 5rem);
    line-height: 0.98;
  }
  #step-3 .ai-product-detail__eyebrow {
    font-size: 0.96rem;
  }
  #step-3 .ai-product-detail__price {
    font-size: 2.2rem;
  }
  #step-3 .section-header__title {
    font-size: 1.18rem;
  }
  #step-3 .section-header__subtitle,
  #step-3 .cta-hint,
  #step-3 .ai-product-detail__details-body {
    font-size: 1.12rem;
  }
  #step-3 .ai-variant-pill,
  #step-3 .frame-option-btn {
    font-size: 1.14rem;
  }
  #step-3 .ai-variant-pill__price {
    font-size: 1.28rem;
  }
  #step-3 .cta-button {
    font-size: 1.2rem;
  }
  #step-3 .ai-product-detail__details summary {
    font-size: 1.18rem;
  }

  @media (max-width: 989px) {
    #step-1 .ai-form-card__header {
      max-width: none;
      margin: 0 0 0.85rem;
      align-items: flex-start;
      flex-direction: column;
    }
    #step-1 .ai-create-grid {
      grid-template-areas:
        "details"
        "generate"
        "preview"
        "continue";
      grid-template-columns: 1fr;
      gap: 1rem;
    }
    #step-1 .ai-create-left {
      order: 1;
      max-width: none;
      justify-self: stretch;
      padding-top: 0;
      height: auto;
    }
    #step-1 .ai-create-left > .ai-field:first-child,
    #step-1 .ai-create-left > .ai-field:last-child {
      flex: 0 0 auto;
    }
    #step-1 .ai-create-preview__stack {
      order: 2;
      position: static;
      top: auto;
    }
    #step-1 .ai-form-card__meta {
      width: 100%;
      justify-content: flex-start;
      margin-left: 0;
    }
  }

  @media (max-width: 749px) {
    #step-1 .ai-form-card__title {
      font-size: 1.9rem;
      letter-spacing: -0.02em;
    }
    #step-1 .ai-textarea {
      min-height: 8.4rem;
      padding: 0.9rem 1rem;
      font-size: 1.08rem;
    }
    #step-1 .ai-create-preview__empty,
    #step-1 .ai-create-preview img,
    #step-1 .ai-create-preview__loading {
      min-height: 15rem;
    }
    #step-1 .ai-generate-btn,
    #step-1 .ai-create-preview__actions a,
    #step-1 .ai-create-preview__actions button,
    #step-1 .ai-create-preview__next-step {
      min-height: 4.4rem;
      font-size: 1.08rem;
    }
  }

  /* (Important) Do not style Dawn's global .section-header (site header wrapper).
     All .section-header styles are scoped under .ai-generator-wrapper above. */

  /* Readable type scale for custom studio UI. Dawn's rem baseline is 10px, so
     these px values keep app text from collapsing into 9-12px labels. */
  .ai-generator-wrapper .ai-header__meta,
  .ai-generator-wrapper .ai-toast__title,
  .ai-generator-wrapper .ai-toast__message,
  .ai-generator-wrapper .ai-loading__text,
  .ai-generator-wrapper .ai-upload-artwork-status,
  .ai-generator-wrapper .mockup-loading-text,
  .ai-generator-wrapper .mockup-counter,
  .ai-generator-wrapper .main-preview-label,
  .ai-generator-wrapper .frame-color-name,
  .ai-generator-wrapper .product-card__subtitle,
  .ai-generator-wrapper .canvas-option-card .price,
  .ai-generator-wrapper .cta-hint,
  .ai-generator-wrapper .ai-no-credits-card__text,
  .ai-generator-wrapper .ai-no-credits-card__btn {
    font-size: 14px;
  }
  .ai-generator-wrapper .product-card__badge {
    font-size: 14px;
  }
  .ai-generator-wrapper .ai-step__num {
    font-size: 14px;
  }
  .ai-generator-wrapper .ai-step__label,
  .ai-generator-wrapper .ai-model-option__name,
  .ai-generator-wrapper .section-header__subtitle,
  .ai-generator-wrapper .ai-action-btn,
  .ai-generator-wrapper .frame-option-btn,
  .ai-generator-wrapper .cta-button {
    font-size: 16px;
  }
  .ai-generator-wrapper .section-header__title,
  .ai-generator-wrapper .main-preview-price,
  .ai-generator-wrapper .canvas-option-card h4,
  .ai-generator-wrapper .ai-no-credits-card__title {
    font-size: 17px;
  }
  .ai-generator-wrapper .product-card__title {
    font-size: 18px;
  }
  .ai-generator-wrapper .main-preview-title {
    font-size: 22px;
  }
  #step-1 .ai-field__label {
    font-size: 16px;
  }
  #step-1 .ai-field__hint,
  #step-1 .ai-file-upload__meta,
  #step-1 #ai-file-meta,
  #step-1 .ai-edit-source__hint,
  #step-1 .ai-model-option__quality,
  #step-1 .ai-model-option__credits,
  #step-1 .ai-model-cost-pill {
    font-size: 14px;
  }
  #step-1 .ai-textarea,
  #step-1 .ai-file-upload__text,
  #step-1 .ai-edit-source__text,
  #step-1 .ai-model-option__name,
  #step-1 .ai-edit-source__btn,
  #step-1 .ai-generate-btn,
  #step-1 .ai-create-preview__actions a,
  #step-1 .ai-create-preview__actions button,
  #step-1 .ai-create-preview__next-step {
    font-size: 16px;
  }
  #step-1 .ai-edit-source__eyebrow {
    font-size: 14px;
  }
  #step-1 .ai-create-preview__empty {
    font-size: 15px;
  }
  #step-1 .ai-create-preview__empty strong {
    font-size: 16px;
  }
  #step-1 .ai-create-preview__loading-title {
    font-size: clamp(24px, 2.4vw, 32px);
  }
  #step-1 .ai-create-preview__loading-subtext,
  #step-1 .ai-form-card__meta .ai-credits-pill,
  #step-1 .ai-form-card__meta .ai-buy-credits-btn,
  .ai-credits-pill,
  .ai-buy-credits-btn,
  .ai-auth-actions a {
    font-size: 14px;
  }
  #step-3 .mockup-loading-text,
  #step-3 .mockup-counter,
  #step-3 .ai-product-detail__eyebrow {
    font-size: 14px;
  }
  #step-3 .section-header__title,
  #step-3 .section-header__subtitle,
  #step-3 .cta-hint,
  #step-3 .ai-product-detail__details-body,
  #step-3 .ai-variant-pill,
  #step-3 .frame-option-btn,
  #step-3 #ai-back-to-design,
  #step-3 .ai-product-detail__details summary {
    font-size: 16px;
  }
  #step-3 .ai-variant-pill__price,
  #step-3 .cta-button {
    font-size: 17px;
  }

  .ai-auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.5rem;
    max-width: 480px;
  }
  .ai-auth-card p { margin: .4rem 0 0; color: var(--muted); line-height: 1.5; }
  .ai-auth-actions {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
  }
  .ai-auth-actions a {
    appearance: none;
    border-radius: 999px;
    padding: .75rem 1rem;
    font-weight: 700;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
  }
  .ai-auth-actions a.ai-primary {
    border: none;
    background: var(--ink);
    color: var(--surface);
  }

  .ai-credits-pill {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .72rem;
    border-radius: 999px;
    background: rgba(var(--color-foreground), .06);
    border: 1px solid rgba(var(--color-foreground), .14);
    color: var(--ink);
    font-weight: 900;
    font-size: .96rem;
    text-decoration: none;
    white-space: nowrap;
  }
  a.ai-credits-pill {
    cursor: pointer;
  }
  a.ai-credits-pill:hover {
    border-color: rgba(var(--color-foreground), .24);
    background: rgba(var(--color-foreground), .085);
  }
  a.ai-credits-pill:focus-visible {
    outline: 2px solid rgba(var(--color-foreground), .38);
    outline-offset: 3px;
  }
  .ai-credits-pill strong { color: var(--ink); }
  .ai-credits-pill.is-loading strong { color: rgba(var(--color-foreground), .7); }
  .ai-credits-pill.is-unavailable {
    background: rgba(251, 146, 60, .12);
    border-color: rgba(251, 146, 60, .32);
  }
  .ai-credits-pill.is-empty {
    background: rgba(220, 38, 38, .12);
    border-color: rgba(220, 38, 38, .3);
  }
  .ai-buy-credits-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.95rem;
    border-radius: 12px;
    padding: .45rem .95rem;
    font-weight: 800;
    letter-spacing: .01em;
    border: 1px solid rgba(var(--color-foreground), .16);
    background: linear-gradient(180deg, rgb(var(--color-background)) 0%, rgba(var(--color-foreground), .045) 100%);
    color: var(--ink);
    text-decoration: none;
    font-size: .94rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.72), 0 8px 18px rgba(0,0,0,.05);
  }
  .ai-buy-credits-btn:hover {
    background: linear-gradient(180deg, rgb(var(--color-background)) 0%, rgba(var(--color-foreground), .065) 100%);
    border-color: rgba(var(--color-foreground), .22);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.78), 0 10px 22px rgba(0,0,0,.08);
  }
  @media (max-width: 749px) {
    .ai-content__inner {
      padding: 0 1.1rem;
    }
    .ai-header__title {
      font-size: 1.95rem;
    }
    .ai-header__subtitle {
      font-size: 1.02rem;
    }
    .ai-form-card {
      padding: 1.15rem;
    }
    .ai-form-card__title {
      font-size: 1.55rem;
    }
    .ai-field__label {
      font-size: 1.02rem;
    }
  }

  /* Final readability safeguards after mobile and credit controls. */
  .ai-generator-login-wall__eyebrow {
    font-size: 14px;
  }
  .ai-generator-login-wall__copy,
  .ai-generator-login-wall__btn {
    font-size: 16px;
  }
  .ai-generator-wrapper .ai-field__label {
    font-size: 16px;
  }
  .ai-generator-wrapper .ai-field__hint,
  .ai-generator-wrapper .ai-file-upload__meta,
  .ai-generator-wrapper .ai-edit-source__hint,
  .ai-generator-wrapper .ai-model-option__quality,
  .ai-generator-wrapper .ai-model-option__credits,
  .ai-generator-wrapper .ai-model-cost-pill,
  .ai-generator-wrapper .ai-upload-artwork-status,
  .ai-generator-wrapper .ai-credits-pill,
  .ai-generator-wrapper .ai-buy-credits-btn,
  .ai-generator-wrapper .ai-auth-actions a {
    font-size: 14px;
  }
  .ai-generator-wrapper .ai-textarea,
  .ai-generator-wrapper .ai-file-upload__text,
  .ai-generator-wrapper .ai-edit-source__text,
  .ai-generator-wrapper .ai-model-option__name,
  .ai-generator-wrapper .ai-edit-source__btn,
  .ai-generator-wrapper .ai-generate-btn {
    font-size: 16px;
  }
