/* ═══════════════════════════════════════════════════════════════════════════
   RPPG — Theme tokens
   Inherit from the active Bootstrap / site theme wherever possible.
   Fallback values keep the plugin working even without Bootstrap.
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
    /* Primary brand color — pulls from Bootstrap $primary */
    --rppg-primary:      var(--bs-primary,           #6c63ff);
    --rppg-primary-rgb:  var(--bs-primary-rgb,        108, 99, 255);
    /* Darker shade for hover states — requires color-mix (Chrome 111+, FF 113+) */
    --rppg-primary-dark: color-mix(in srgb, var(--rppg-primary) 80%, black);

    /* Typography */
    --rppg-font:         var(--bs-body-font-family,   -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);

    /* Surfaces & borders */
    --rppg-body-color:   var(--bs-body-color,         #1a1a2e);
    --rppg-body-bg:      var(--bs-body-bg,            #ffffff);
    --rppg-border:       var(--bs-border-color,       #d1d5db);
    --rppg-muted:        var(--bs-secondary-color,    #6b7280);

    /* Shape */
    --rppg-radius:       var(--bs-border-radius,      0.375rem);
    --rppg-radius-lg:    var(--bs-border-radius-lg,   0.5rem);
    --rppg-shadow:       var(--bs-box-shadow,         0 4px 20px rgba(0,0,0,.08));
}

/* ─────────────────────────────────────────────────────────────────────────── */

.rppg-generator {
    font-family: var(--rppg-font);
    max-width: 680px;
    margin: 0 auto;
    color: var(--rppg-body-color);
}

/* Fields */
.rppg-field {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.rppg-field label {
    font-weight: 600;
    font-size: 14px;
}
.rppg-field textarea,
.rppg-field input[type="number"],
.rppg-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--rppg-border);
    border-radius: var(--rppg-radius);
    font-size: 14px;
    font-family: var(--rppg-font);
    box-sizing: border-box;
    background: var(--rppg-body-bg);
    transition: border-color .2s;
}
.rppg-field textarea:focus,
.rppg-field input:focus,
.rppg-field select:focus {
    outline: none;
    border-color: var(--rppg-primary);
    box-shadow: 0 0 0 3px rgba(var(--rppg-primary-rgb),.12);
}
.rppg-field input[type="number"] {
    width: 90px;
}
.rppg-field--grow {
    flex: 1;
}

.rppg-field-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* Button */
.rppg-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 24px;
    background: var(--rppg-primary);
    color: #fff !important;
    border: none;
    border-radius: var(--rppg-radius);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--rppg-font);
    cursor: pointer;
    text-decoration: none;
    transition: background .2s, opacity .2s;
}
.rppg-btn:hover { background: var(--rppg-primary-dark); }
.rppg-btn:disabled { opacity: .6; cursor: not-allowed; }
.rppg-btn--outline {
    background: transparent;
    color: var(--rppg-primary) !important;
    border: 2px solid var(--rppg-primary);
}
.rppg-btn--outline:hover { background: rgba(var(--rppg-primary-rgb), .06); }
.rppg-btn--ghost {
    background: transparent;
    color: var(--rppg-muted) !important;
    border: 1px solid var(--rppg-border);
}
.rppg-btn--ghost:hover { background: rgba(var(--rppg-primary-rgb), .04); }

/* Progress */
.rppg-progress-wrap { margin-top: 20px; }
.rppg-progress-track {
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
    height: 8px;
    max-width: 400px;
}
.rppg-progress-bar {
    height: 100%;
    background: var(--rppg-primary);
    transition: width .3s;
}
.rppg-status { margin-top: 8px; font-size: 14px; color: var(--rppg-muted); }

/* Result */
.rppg-result {
    margin-top: 20px;
    padding: 16px 20px;
    background: rgba(var(--rppg-primary-rgb), .06);
    border: 1px solid var(--rppg-primary);
    border-radius: var(--rppg-radius);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.rppg-result strong { font-size: 16px; color: color-mix(in srgb, var(--rppg-primary) 65%, black); }
.rppg-result p { margin: 0; color: var(--rppg-muted); font-size: 14px; }

/* ── Quota bar ─────────────────────────────────────────────────────────────── */
.rppg-quota-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0 14px;
    flex-wrap: wrap;
}
.rppg-quota-text {
    font-size: 12px;
    color: var(--rppg-muted);
    white-space: nowrap;
    flex-shrink: 0;
}
.rppg-quota-track {
    flex: 1;
    min-width: 80px;
    height: 5px;
    border-radius: 99px;
    background: var(--rppg-border);
    overflow: hidden;
}
.rppg-quota-fill {
    height: 100%;
    border-radius: 99px;
    background: var(--rppg-primary);
    transition: width .5s ease, background-color .3s;
}
.rppg-quota-fill--warn   { background: #f59e0b; }
.rppg-quota-fill--danger { background: #ef4444; }

/* ── Prompt example chips ──────────────────────────────────────────────────── */
.rppg-prompt-examples {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    transition: opacity .2s;
}
.rppg-prompt-examples--hidden {
    opacity: 0;
    pointer-events: none;
    height: 0;
    margin: 0;
    overflow: hidden;
}
.rppg-prompt-examples__label {
    font-size: 12px;
    color: var(--rppg-muted);
    font-weight: 600;
    flex-shrink: 0;
}
.rppg-prompt-example {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 99px;
    border: 1px solid var(--rppg-border);
    background: var(--rppg-body-bg);
    color: var(--rppg-body-color);
    cursor: pointer;
    transition: border-color .15s, background .15s;
    font-family: var(--rppg-font);
    text-align: left;
    line-height: 1.4;
}
.rppg-prompt-example:hover {
    border-color: var(--rppg-primary);
    background: rgba(var(--rppg-primary-rgb), .06);
    color: var(--rppg-primary);
}

/* Notice */
.rppg-notice {
    padding: 12px 16px;
    border-radius: var(--rppg-radius);
    background: #fff3cd;
    border: 1px solid #ffc107;
    margin-top: 16px;
}
.rppg-notice--error {
    background: #fef2f2;
    border-color: #f87171;
    color: #991b1b;
}
.rppg-notice p { margin: 0; font-size: 14px; }
.rppg-error-retry { margin-top: 10px; color: #991b1b; border-color: #f87171; }

/* Slide preview */
.rppg-preview-wrap { margin-top: 24px; }
.rppg-preview-wrap h3 { font-size: 16px; font-weight: 700; margin-bottom: 14px; color: var(--rppg-body-color); }
/* ── Slideshow preview ───────────────────────────────────────── */
.rppg-slideshow { width: 100%; }

/* Placeholder shown while the first streaming slide is being generated */
.rppg-slide-loading {
    margin: auto;
    color: rgba(255,255,255,.45);
    font-size: 1rem;
    letter-spacing: .04em;
    animation: rppg-pulse 1.4s ease-in-out infinite;
}
@keyframes rppg-pulse {
    0%, 100% { opacity: .45; }
    50%       { opacity: .9;  }
}

.rppg-slide-main {
    background: #1a1a2e;
    border-radius: 10px;
    aspect-ratio: 16 / 9;
    padding: 4% 5%;
    box-shadow: 0 4px 24px rgba(0,0,0,.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    position: relative;
}
.rppg-slide-inner {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.15) transparent;
}
.rppg-slide-inner::-webkit-scrollbar { width: 4px; }
.rppg-slide-inner::-webkit-scrollbar-track { background: transparent; }
.rppg-slide-inner::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 2px; }
.rppg-main-badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #a8a4ff;
    margin-bottom: 10px;
    flex-shrink: 0;
}
.rppg-main-title {
    font-size: clamp(16px, 2.6vw, 26px);
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
    margin-bottom: 12px;
    flex-shrink: 0;
}
.rppg-main-context {
    font-size: clamp(12px, 1.4vw, 15px);
    color: #e0deff;
    line-height: 1.65;
    margin: 0 0 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,.12);
    font-style: italic;
}
.rppg-main-prose {
    font-size: clamp(11px, 1.2vw, 14px);
    color: #c8c6e8;
    line-height: 1.75;
    margin: 0;
}
.rppg-bullets-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.rppg-bullets-list li {
    font-size: clamp(11px, 1.2vw, 14px);
    color: #c8c6e8;
    line-height: 1.55;
    padding-left: 1.4em;
    position: relative;
}
.rppg-bullets-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--rppg-accent, #a8a4ff);
    font-size: .9em;
}
.rppg-slide-notes {
    margin-top: 10px;
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 8px;
    flex-shrink: 0;
}
.rppg-slide-notes summary { font-size: 10px; color: #888; cursor: pointer; user-select: none; }
.rppg-slide-notes p { font-size: 11px; color: #aaa; margin: 6px 0 0; line-height: 1.5; font-style: italic; }

.rppg-slide-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 14px 0 12px;
}
.rppg-nav-btn {
    background: none;
    border: 1px solid var(--rppg-border);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    font-size: 16px;
    cursor: pointer;
    color: var(--rppg-body-color);
    transition: background .15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rppg-nav-btn:hover { background: rgba(var(--rppg-primary-rgb), .06); border-color: var(--rppg-primary); color: var(--rppg-primary); }
.rppg-nav-counter { font-size: 13px; color: var(--rppg-muted); min-width: 48px; text-align: center; }

.rppg-thumbs-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 8px;
    scrollbar-width: thin;
}
.rppg-thumb {
    flex: 0 0 110px;
    border: 2px solid var(--rppg-border);
    border-radius: 6px;
    padding: 8px 10px;
    background: var(--rppg-body-bg);
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.rppg-thumb:hover { border-color: var(--rppg-primary); }
.rppg-thumb--active { border-color: var(--rppg-primary); box-shadow: 0 0 0 2px rgba(var(--rppg-primary-rgb),.2); background: rgba(var(--rppg-primary-rgb), .06); }
.rppg-thumb-num {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--rppg-primary);
    margin-bottom: 4px;
}
.rppg-thumb-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--rppg-body-color);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.rppg-preview-actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* History */
.rppg-history { margin-top: 32px; }
.rppg-history h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--rppg-body-color);
}
.rppg-history-list { list-style: none; margin: 0; padding: 0; }
.rppg-history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--rppg-border);
    flex-wrap: wrap;
}
.rppg-history-prompt { flex: 1; font-size: 14px; min-width: 180px; }
.rppg-history-meta { font-size: 12px; color: var(--rppg-muted); white-space: nowrap; }
.rppg-history-dl {
    font-size: 13px;
    color: var(--rppg-primary);
    text-decoration: none;
    white-space: nowrap;
}
.rppg-history-dl:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════
   LOGIN / UPGRADE GATE
   ═══════════════════════════════════════════════════════════════ */

.rppg-gate {
    background: linear-gradient(135deg, #0f0e1a 0%, #1a1a2e 55%, #221c40 100%);
    border-radius: 16px;
    padding: 48px 36px;
    text-align: center;
    max-width: 520px;
    margin: 0 auto;
    box-shadow: 0 8px 40px rgba(var(--rppg-primary-rgb),.15);
}
.rppg-gate__icon {
    font-size: 36px;
    display: block;
    margin-bottom: 16px;
    line-height: 1;
}
.rppg-gate__title {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 10px;
}
.rppg-gate__desc {
    font-size: 15px;
    color: rgba(255,255,255,.68);
    line-height: 1.6;
    margin: 0 0 20px;
}
.rppg-gate__perks {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    display: inline-flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}
.rppg-gate__perks li {
    font-size: 13px;
    color: rgba(255,255,255,.75);
}
.rppg-gate__perks li::marker { display: none; }
.rppg-gate__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
/* Ghost button inside gate (dark bg) */
.rppg-gate .rppg-btn--outline {
    color: rgba(255,255,255,.85) !important;
    border-color: rgba(255,255,255,.3);
    background: transparent;
}
.rppg-gate .rppg-btn--outline:hover {
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.55);
}
.rppg-gate--upgrade .rppg-gate__icon { filter: grayscale(0); }

/* ── Gate com WooCommerce embutido ────────────────────────────── */
.rppg-gate--woo {
    max-width: 680px;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    align-items: stretch;
}
.rppg-gate--woo .rppg-gate__header {
    flex: 1 1 240px;
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid rgba(255,255,255,.08);
}
.rppg-gate--woo .rppg-gate__woo-form {
    flex: 1 1 280px;
    background: #fff;
    padding: 36px 32px;
    border-radius: 0 16px 16px 0;
}

/* Ajustes no formulário WooCommerce dentro do gate */
.rppg-gate--woo .rppg-gate__woo-form .woocommerce {
    max-width: 100%;
}
.rppg-gate--woo .rppg-gate__woo-form .woocommerce-form-login,
.rppg-gate--woo .rppg-gate__woo-form .woocommerce-form-register {
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}
.rppg-gate--woo .rppg-gate__woo-form h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--rppg-body-color);
    margin-bottom: 16px;
}
.rppg-gate--woo .rppg-gate__woo-form .woocommerce-tabs,
.rppg-gate--woo .rppg-gate__woo-form .u-columns {
    /* Esconde colunas extras (endereço, etc.) da minha-conta */
    display: none !important;
}
.rppg-gate--woo .rppg-gate__woo-form .woocommerce-MyAccount-navigation {
    display: none !important;
}
.rppg-gate--woo .rppg-gate__woo-form .woocommerce-MyAccount-content {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
}
/* Botão de login do WooCommerce */
.rppg-gate--woo .rppg-gate__woo-form .woocommerce-button,
.rppg-gate--woo .rppg-gate__woo-form button[type="submit"] {
    background: var(--rppg-primary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 11px 24px !important;
    font-weight: 600 !important;
    width: 100%;
}
.rppg-gate--woo .rppg-gate__woo-form .woocommerce-button:hover,
.rppg-gate--woo .rppg-gate__woo-form button[type="submit"]:hover {
    background: var(--rppg-primary-dark) !important;
}

@media (max-width: 560px) {
    .rppg-gate--woo { flex-direction: column; }
    .rppg-gate--woo .rppg-gate__header { border-right: none; border-bottom: 1px solid rgba(255,255,255,.08); padding: 28px 24px; }
    .rppg-gate--woo .rppg-gate__woo-form { border-radius: 0 0 16px 16px; padding: 24px; }
    .rppg-gate { padding: 36px 20px; }
    .rppg-gate__actions { flex-direction: column; }
    .rppg-gate__actions .rppg-btn { width: 100%; justify-content: center; }
}

/* ═══════════════════════════════════════════════════════════════
   DESIGN TEMPLATES SHOWCASE (landing)
   ═══════════════════════════════════════════════════════════════ */

.rppg-designs {
    padding: 56px 0 48px;
}
.rppg-designs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 36px;
}
.rppg-design-card {
    border-radius: var(--rppg-radius-lg);
    overflow: hidden;
    border: 1px solid var(--rppg-border);
    background: var(--rppg-body-bg);
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    transition: transform .2s, box-shadow .2s;
}
.rppg-design-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0,0,0,.12);
}

/* Mini slide mockup dentro do card */
.rppg-design-mockup {
    aspect-ratio: 4 / 3;
    padding: 12px 14px 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow: hidden;
}
.rppg-design-mock-badge {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    flex-shrink: 0;
}
.rppg-design-mock-title {
    height: 10px;
    width: 70%;
    border-radius: 3px;
    flex-shrink: 0;
    margin-bottom: 2px;
}
.rppg-design-mock-line {
    height: 6px;
    border-radius: 2px;
    flex-shrink: 0;
}
.rppg-design-mock-spacer {
    height: 4px;
    flex-shrink: 0;
}
.rppg-design-mock-bullet {
    height: 5px;
    border-radius: 2px;
    flex-shrink: 0;
}
.rppg-design-mock-accent {
    height: 3px;
    width: 32px;
    border-radius: 2px;
    flex-shrink: 0;
    margin-top: auto;
    opacity: .4;
}

/* Info abaixo do mockup */
.rppg-design-card__info {
    padding: 14px 16px 16px;
}
.rppg-design-card__swatches {
    display: flex;
    gap: 5px;
    margin-bottom: 8px;
}
.rppg-design-card__swatch {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,.1);
    display: inline-block;
}
.rppg-design-card__name {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--rppg-body-color);
    margin-bottom: 4px;
}
.rppg-design-card__desc {
    font-size: 12px;
    color: var(--rppg-muted);
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 700px) {
    .rppg-designs-grid { grid-template-columns: 1fr; max-width: 360px; margin-left: auto; margin-right: auto; }
}
@media (min-width: 701px) and (max-width: 900px) {
    .rppg-designs-grid { grid-template-columns: repeat(2, 1fr); }
    .rppg-designs-grid .rppg-design-card:last-child { grid-column: 1 / -1; max-width: 360px; margin: 0 auto; }
}

/* ═══════════════════════════════════════════════════════════════
   LANDING PAGE
   ═══════════════════════════════════════════════════════════════ */

.rppg-landing {
    margin: 0 auto;
    font-family: var(--rppg-font);
    color: var(--rppg-body-color);
}

/* ── Shared section helpers ───────────────────────────────────── */
.rppg-section-title {
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 800;
    color: var(--rppg-body-color);
    margin: 0 0 8px;
    text-align: center;
}
.rppg-section-sub {
    font-size: 16px;
    color: var(--rppg-muted);
    text-align: center;
    margin: 0 0 36px;
}

/* ── Hero ─────────────────────────────────────────────────────── */
.rppg-hero {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 36px;
    background: linear-gradient(135deg, #0f0e1a 0%, #1a1a2e 50%, #221c40 100%);
    border-radius: 16px;
    padding: 48px 40px;
    margin-bottom: 0;
}
.rppg-hero__content {
    flex: 1 1 280px;
    min-width: 0;
}
.rppg-hero__badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    background: rgba(var(--rppg-primary-rgb),.18);
    border: 1px solid rgba(var(--rppg-primary-rgb),.35);
    color: #a8a4ff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .5px;
    margin-bottom: 20px;
}
.rppg-hero__title {
    font-size: clamp(20px, 3.2vw, 36px);
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
    margin: 0 0 16px;
    word-break: break-word;
}
.rppg-hero__sub {
    font-size: 16px;
    color: rgba(255,255,255,.72);
    line-height: 1.6;
    margin: 0 0 28px;
}
.rppg-hero__ctas {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.rppg-hero__trust {
    font-size: 12px;
    color: rgba(255,255,255,.45);
    margin: 0;
}
.rppg-hero__login-hint {
    font-size: 13px;
    color: rgba(255,255,255,.45);
    margin: 12px 0 0;
}
.rppg-hero__login-hint a {
    color: #a8a4ff;
    text-decoration: none;
}
.rppg-hero__login-hint a:hover { text-decoration: underline; }
.rppg-btn--lg { padding: 13px 28px; font-size: 15px; }
.rppg-btn--glow {
    background: var(--rppg-primary);
    box-shadow: 0 0 0 0 rgba(var(--rppg-primary-rgb),.5);
    animation: rppg-glow-pulse 2.5s ease-in-out infinite;
}
.rppg-btn--glow:hover { background: var(--rppg-primary-dark); box-shadow: none; animation: none; }
@keyframes rppg-glow-pulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(var(--rppg-primary-rgb),.45); }
    50%      { box-shadow: 0 0 0 8px rgba(var(--rppg-primary-rgb),0); }
}

/* Ghost button override inside dark hero */
.rppg-hero .rppg-btn--ghost {
    color: rgba(255,255,255,.82) !important;
    border-color: rgba(255,255,255,.3);
}
.rppg-hero .rppg-btn--ghost:hover {
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.55);
}

/* ── Mockup visual ────────────────────────────────────────────── */
.rppg-hero__visual {
    flex: 1 1 calc(100% - 1rem) !important;
    max-width: 1 1 calc(100% - 1rem) !important;
    min-width: 0;
}
.rppg-mockup {
    background: #0d0c1a;
    border-radius: 10px;
    padding: 20px 20px 14px;
    box-shadow: 0 8px 40px rgba(0,0,0,.45), 0 0 0 1px rgba(var(--rppg-primary-rgb),.2);
}
.rppg-mockup__main {
    background: #1a1a2e;
    border-radius: 7px;
    aspect-ratio: 16 / 9;
    padding: 14px 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 7px;
    overflow: hidden;
}
.rppg-mockup__num {
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #a8a4ff;
}
.rppg-mockup__title-bar {
    height: 12px;
    width: 65%;
    background: rgba(255,255,255,.85);
    border-radius: 3px;
    margin: 2px 0 4px;
}
.rppg-mockup__ctx-line {
    height: 6px;
    background: rgba(224,222,255,.4);
    border-radius: 3px;
    animation: rppg-shimmer 2s ease-in-out infinite;
}
.rppg-mockup__ctx-line + .rppg-mockup__ctx-line { animation-delay: .15s; }
.rppg-mockup__divider {
    height: 1px;
    background: rgba(255,255,255,.1);
    margin: 2px 0;
}
.rppg-mockup__bullet {
    height: 5px;
    background: rgba(200,198,232,.35);
    border-radius: 3px;
    animation: rppg-shimmer 2s ease-in-out infinite;
}
.rppg-mockup__bullet:nth-child(odd)  { animation-delay: .1s; }
.rppg-mockup__bullet:nth-child(even) { animation-delay: .3s; }
@keyframes rppg-shimmer {
    0%,100% { opacity: .6; }
    50%      { opacity: 1; }
}
.rppg-mockup__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 0 6px;
}
.rppg-mockup__nav-btn {
    width: 22px; height: 22px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 50%;
    color: rgba(255,255,255,.6);
    font-size: 12px;
    display: flex; align-items: center; justify-content: center;
}
.rppg-mockup__nav-count { font-size: 10px; color: rgba(255,255,255,.5); }
.rppg-mockup__thumbs {
    display: flex;
    gap: 5px;
}
.rppg-mockup__thumb {
    flex: 1;
    height: 32px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 4px;
}
.rppg-mockup__thumb--on {
    border-color: var(--rppg-primary);
    background: rgba(var(--rppg-primary-rgb),.2);
}

/* ── Stats bar ────────────────────────────────────────────────── */
.rppg-stats-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    background: rgba(var(--rppg-primary-rgb), .05);
    border: 1px solid rgba(var(--rppg-primary-rgb), .15);
    border-radius: var(--rppg-radius-lg);
    padding: 20px 28px;
    margin: 20px 0;
}
.rppg-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 28px;
}
.rppg-stat strong {
    font-size: 20px;
    font-weight: 800;
    color: var(--rppg-body-color);
    line-height: 1.1;
}
.rppg-stat span {
    font-size: 12px;
    color: var(--rppg-muted);
    margin-top: 2px;
    text-align: center;
}
.rppg-stat-sep {
    width: 1px;
    height: 36px;
    background: var(--rppg-border);
}

/* ── How it works ─────────────────────────────────────────────── */
.rppg-how {
    padding: 48px 20px;
    text-align: center;
}
.rppg-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}
.rppg-step {
    flex: 1;
    min-width: 180px;
    max-width: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 16px;
}
.rppg-step__num {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--rppg-primary);
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    box-shadow: 0 4px 16px rgba(var(--rppg-primary-rgb),.3);
}
.rppg-step strong {
    font-size: 15px;
    font-weight: 700;
    color: var(--rppg-body-color);
    display: block;
    margin-bottom: 8px;
}
.rppg-step p {
    font-size: 13px;
    color: var(--rppg-muted);
    line-height: 1.6;
    margin: 0;
}
.rppg-step__connector {
    flex: 0 0 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--rppg-primary), #a8a4ff);
    margin-top: 22px;
    border-radius: 2px;
}

/* ── Features ─────────────────────────────────────────────────── */
.rppg-features {
    padding: 40px 20px 48px;
    background: rgba(var(--rppg-primary-rgb), .03);
    border-radius: var(--rppg-radius-lg);
    margin-bottom: 20px;
}
.rppg-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    margin-top: 8px;
}
.rppg-feature-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 18px 16px;
    background: var(--rppg-body-bg);
    border: 1px solid var(--rppg-border);
    border-radius: var(--rppg-radius);
    border-left: 3px solid var(--rppg-primary);
    transition: box-shadow .2s, transform .2s;
}
.rppg-feature-card:hover {
    box-shadow: 0 4px 20px rgba(var(--rppg-primary-rgb),.1);
    transform: translateY(-2px);
}
.rppg-feature-icon {
    font-size: 24px;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 1px;
}
.rppg-feature-body strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--rppg-body-color);
    margin-bottom: 5px;
}
.rppg-feature-body p {
    margin: 0;
    font-size: 13px;
    color: var(--rppg-muted);
    line-height: 1.55;
}

/* ── Generator section ────────────────────────────────────────── */
.rppg-gen-section {
    padding: 48px 0 20px;
    scroll-margin-top: 80px;
}
.rppg-gen-section__header {
    text-align: center;
    margin-bottom: 28px;
}
.rppg-gen-section__header h2 {
    font-size: clamp(20px, 3vw, 26px);
    font-weight: 800;
    color: var(--rppg-body-color);
    margin: 0 0 8px;
}
.rppg-gen-section__header p {
    color: var(--rppg-muted);
    font-size: 15px;
    margin: 0;
}

/* ── Generator CTA (landing → creator page) ───────────────────── */
.rppg-gen-section__cta {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

/* ── Bottom CTA ───────────────────────────────────────────────── */
.rppg-cta-bottom {
    background: linear-gradient(135deg, #1a1a2e 0%, #2a1f4e 100%);
    border-radius: 16px;
    padding: 52px 32px;
    text-align: center;
    margin-top: 20px;
}
.rppg-cta-bottom h2 {
    font-size: clamp(20px, 3vw, 30px);
    font-weight: 800;
    color: #fff;
    margin: 0 0 12px;
}
.rppg-cta-bottom p {
    color: rgba(255,255,255,.7);
    font-size: 16px;
    margin: 0 0 28px;
}

/* ── Output examples section ──────────────────────────────────── */
.rppg-examples-section {
    padding: 48px 0 24px;
}
.rppg-examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 28px;
}
.rppg-example-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
/* Override aspect-ratio for the static showcase — use fixed height instead */
.rppg-slide-main--ex {
    aspect-ratio: unset;
    height: 220px;
    font-size: 85%;   /* scale text down slightly so it fits the fixed height */
}
.rppg-example-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--rppg-muted);
    text-align: center;
    margin: 0;
}
.rppg-examples-note {
    margin-top: 20px;
    text-align: center;
    font-size: 13px;
    color: var(--rppg-muted);
    font-style: italic;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 860px) {
    /* Hero já faz wrap automaticamente com flex-wrap: wrap,
       mas abaixo de 860px forçamos coluna para garantir leitura. */
    .rppg-hero {
        flex-direction: column;
        padding: 36px 28px;
        gap: 28px;
    }
    .rppg-hero__content { flex: none; width: 100%; }
    .rppg-hero__visual   { flex: none; width: 100%; max-width: 100%; }
    .rppg-mockup { max-width: 480px; margin: 0 auto; }
}
@media (max-width: 640px) {
    .rppg-step__connector { display: none; }
    .rppg-steps { gap: 24px; }
    .rppg-stat-sep { display: none; }
    .rppg-stats-bar { gap: 16px; padding: 16px 12px; }
    .rppg-stat { padding: 4px 8px; }
    .rppg-features { padding: 28px 12px 32px; }
    /* Examples: 2-up on small tablets */
    .rppg-examples-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .rppg-slide-main--ex { height: 180px; font-size: 75%; }
}
@media (max-width: 420px) {
    /* Examples: single column on phones */
    .rppg-examples-grid { grid-template-columns: 1fr; }
    .rppg-slide-main--ex { height: 200px; font-size: 80%; }
}
@media (max-width: 480px) {
    .rppg-field-row { flex-direction: column; }
    .rppg-features-grid { grid-template-columns: 1fr; }
    .rppg-hero { padding: 28px 16px; }
    .rppg-hero__ctas { flex-direction: column; }
    .rppg-btn--lg { width: 100%; justify-content: center; text-align: center; }
    .rppg-cta-bottom { padding: 36px 20px; border-radius: 12px; }
    .rppg-landing { max-width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE: GENERATOR + PREVIEW
   Breakpoints:
     ≤ 600px — primary phone portrait target
     ≤ 400px — very narrow (SE / small Android)
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 600px) {

    /* ── Quota bar ───────────────────────────── */
    .rppg-quota-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding-bottom: 12px;
    }
    .rppg-quota-track { width: 100%; }

    /* ── Prompt examples ─────────────────────── */
    .rppg-prompt-examples { gap: 5px; }
    .rppg-prompt-example  { font-size: 11px; padding: 3px 9px; }

    /* ── Wizard step-nav ─────────────────────── */
    .rppg-step-nav {
        flex-direction: column-reverse;  /* primary action on top */
        gap: 8px;
    }
    .rppg-step-nav .rppg-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    /* ── Slide preview ───────────────────────── */
    .rppg-slide-main {
        border-radius: 8px;
        /* Slightly loosen padding so text breathes */
        padding: 5% 5%;
    }

    /* Larger touch targets for prev/next */
    .rppg-nav-btn {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    .rppg-slide-nav { gap: 12px; margin: 12px 0 10px; }

    /* Thinner thumbs so more fit without scrolling */
    .rppg-thumb {
        flex: 0 0 80px;
        padding: 6px 8px;
    }
    .rppg-thumb-title { font-size: 10px; -webkit-line-clamp: 2; }

    /* Preview action buttons stack full-width */
    .rppg-preview-actions {
        flex-direction: column;
        gap: 8px;
    }
    .rppg-preview-actions .rppg-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    /* Result screen */
    .rppg-result {
        flex-direction: column;
        gap: 10px;
    }
    .rppg-result .rppg-btn { width: 100%; justify-content: center; }
}

@media (max-width: 400px) {
    .rppg-slide-main { padding: 6% 4%; }
    .rppg-main-title { font-size: 14px; }
    /* Hide thumbnail strip on very narrow; counter + arrows suffice */
    .rppg-thumbs-strip { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   DESIGN TEMPLATE PICKER
   ═══════════════════════════════════════════════════════════════ */

.rppg-design-section {
    margin-bottom: 20px;
}
.rppg-design-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--rppg-body-color);
}
.rppg-template-picker {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── Card horizontal: mockup à esquerda, texto à direita ── */
.rppg-tpl-card {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 2px solid var(--rppg-border);
    border-radius: var(--rppg-radius);
    padding: 10px 14px 10px 10px;
    cursor: pointer;
    background: var(--rppg-body-bg);
    transition: border-color .18s, box-shadow .18s, transform .18s;
    user-select: none;
}
.rppg-tpl-card:hover {
    border-color: var(--rppg-primary);
    box-shadow: 0 4px 16px rgba(var(--rppg-primary-rgb),.12);
    transform: translateX(3px);
}
.rppg-tpl-card--active {
    border-color: var(--rppg-primary);
    box-shadow: 0 0 0 3px rgba(var(--rppg-primary-rgb),.18);
    background: rgba(var(--rppg-primary-rgb), .06);
}
.rppg-tpl-card--active::after {
    content: '✓';
    margin-left: auto;
    font-size: 14px;
    font-weight: 700;
    color: var(--rppg-primary);
    flex-shrink: 0;
}

/* ── Mini slide mockup ──────────────────────────────────── */
.rppg-tpl-mockup {
    flex-shrink: 0;
    width: 96px;
    aspect-ratio: 4 / 3;
    border-radius: 6px;
    padding: 8px 9px 7px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: 1px solid rgba(0,0,0,.07);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.rppg-tpl-mock-badge {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    flex-shrink: 0;
}
.rppg-tpl-mock-title {
    height: 8px;
    width: 75%;
    border-radius: 2px;
    flex-shrink: 0;
    margin-bottom: 2px;
}
.rppg-tpl-mock-line {
    height: 5px;
    border-radius: 2px;
    flex-shrink: 0;
}
.rppg-tpl-mock-accent {
    height: 3px;
    width: 28px;
    border-radius: 2px;
    flex-shrink: 0;
    margin-top: auto;
    opacity: .5;
}

/* ── Text block ──────────────────────────────────────────── */
.rppg-tpl-info {
    flex: 1;
    min-width: 0;
}
.rppg-tpl-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--rppg-body-color);
    margin-bottom: 3px;
}
.rppg-tpl-desc {
    font-size: 11px;
    color: var(--rppg-muted);
    line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════════
   CUSTOMIZATION PANEL
   ═══════════════════════════════════════════════════════════════ */

.rppg-custom-wrap {
    margin-bottom: 20px;
    border: 1px solid var(--rppg-border);
    border-radius: var(--rppg-radius);
    overflow: hidden;
}

/* Toggle button */
.rppg-custom-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: rgba(var(--rppg-primary-rgb), .03);
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--rppg-font);
    color: var(--rppg-body-color);
    text-align: left;
    transition: background .15s;
}
.rppg-custom-toggle:hover { background: rgba(var(--rppg-primary-rgb), .06); color: var(--rppg-primary-dark); }
.rppg-custom-toggle__icon { font-size: 16px; }
.rppg-custom-toggle__arrow {
    margin-left: auto;
    font-size: 12px;
    color: var(--rppg-muted);
    transition: transform .2s;
}

/* Panel body */
.rppg-custom-panel {
    padding: 18px 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-top: 1px solid var(--rppg-border);
}

.rppg-custom-group__title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--rppg-muted);
    margin-bottom: 10px;
}

/* Color pickers row */
.rppg-custom-colors {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.rppg-color-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--rppg-body-color);
    cursor: pointer;
}
.rppg-color-input {
    -webkit-appearance: none;
    width: 36px;
    height: 36px;
    border: 2px solid var(--rppg-border);
    border-radius: 8px;
    cursor: pointer;
    padding: 2px;
    background: none;
    transition: border-color .15s;
}
.rppg-color-input:hover { border-color: var(--rppg-primary); }
.rppg-btn--sm {
    padding: 6px 14px;
    font-size: 12px;
}

/* Logo upload area */
.rppg-logo-upload { position: relative; }

.rppg-logo-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 20px 16px;
    border: 2px dashed var(--rppg-border);
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: border-color .15s, background .15s;
    background: var(--rppg-body-bg);
}
.rppg-logo-drop:hover,
.rppg-logo-drop--over {
    border-color: var(--rppg-primary);
    background: rgba(var(--rppg-primary-rgb), .05);
}
.rppg-logo-drop__icon { font-size: 22px; }
.rppg-logo-drop__text {
    font-size: 13px;
    font-weight: 600;
    color: var(--rppg-body-color);
}
.rppg-logo-drop__hint {
    font-size: 11px;
    color: var(--rppg-muted);
}

/* Logo preview */
.rppg-logo-preview {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--rppg-border);
    border-radius: 8px;
    padding: 10px 14px;
    background: var(--rppg-body-bg);
    margin-bottom: 8px;
    max-width: 100%;
}
.rppg-logo-preview img {
    max-height: 60px;
    max-width: 200px;
    object-fit: contain;
    display: block;
}
.rppg-logo-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    border: 2px solid #fff;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    transition: background .15s;
}
.rppg-logo-remove:hover { background: #dc2626; }

.rppg-logo-hint {
    font-size: 11px;
    color: var(--rppg-muted);
    margin: 8px 0 0;
}
.rppg-logo-status {
    font-size: 12px;
    color: var(--rppg-primary);
    margin: 6px 0 0;
    min-height: 18px;
}

/* ═══════════════════════════════════════════════════════════════
   SLIDE PREVIEW — TYPED LAYOUTS
   ═══════════════════════════════════════════════════════════════ */

/* Badge row: type tag + slide number */
.rppg-main-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    flex-shrink: 0;
}
.rppg-slide-type-tag {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--rppg-accent, #a8a4ff);
    background: rgba(255,255,255,.08);
    padding: 2px 8px;
    border-radius: 20px;
}
.rppg-main-badge-num {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,.45);
}

/* Light theme adaptation */
.rppg-slide-main--light {
    color: #1a1a2e;
}
.rppg-slide-main--light .rppg-main-title { color: #1a1a2e; }
.rppg-slide-main--light .rppg-main-context { color: #444; border-bottom-color: rgba(0,0,0,.1); }
.rppg-slide-main--light .rppg-main-prose { color: #333; }
.rppg-slide-main--light .rppg-bullets-list li { color: #333; }
.rppg-slide-main--light .rppg-bullets-list li::before { color: var(--rppg-accent, #1E3A8A); }
.rppg-slide-main--light .rppg-main-badge-num { color: rgba(0,0,0,.4); }
.rppg-slide-main--light .rppg-slide-notes summary { color: #555; }
.rppg-slide-main--light .rppg-slide-notes p { color: #555; }
.rppg-slide-main--light .rppg-highlight-statement { color: var(--rppg-accent, #1E3A8A); }
.rppg-slide-main--light .rppg-highlight-explanation { color: #333; }
.rppg-slide-main--light .rppg-stat-value { color: var(--rppg-accent, #1E3A8A); }
.rppg-slide-main--light .rppg-stat-label { color: #1a1a2e; }
.rppg-slide-main--light .rppg-stat-insight { color: #666; }
.rppg-slide-main--light .rppg-cmp-heading { color: var(--rppg-accent, #1E3A8A); }
.rppg-slide-main--light .rppg-cmp-points { color: #333; }
.rppg-slide-main--light .rppg-slide-inner { scrollbar-color: rgba(0,0,0,.15) transparent; }

/* ── Stats layout ─────────────────────────────────────────────── */
.rppg-stats-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.rppg-stat-item {
    flex: 1 1 80px;
    min-width: 0;
}
.rppg-stat-value {
    font-size: clamp(22px, 4vw, 36px);
    font-weight: 800;
    color: var(--rppg-accent, #a8a4ff);
    line-height: 1.1;
    margin-bottom: 4px;
}
.rppg-stat-label {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 3px;
}
.rppg-stat-insight {
    font-size: 10px;
    color: rgba(255,255,255,.55);
    font-style: italic;
    line-height: 1.4;
}

/* ── Comparison layout ────────────────────────────────────────── */
.rppg-cmp-grid {
    display: flex;
    gap: 12px;
    flex: 1;
}
.rppg-cmp-col {
    flex: 1 1 0;
    min-width: 0;
}
.rppg-cmp-heading {
    font-size: 13px;
    font-weight: 800;
    color: var(--rppg-accent, #a8a4ff);
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.rppg-cmp-points {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.rppg-cmp-points li {
    font-size: clamp(10px, 1.1vw, 12px);
    color: #c8c6e8;
    line-height: 1.45;
    padding-left: 12px;
    position: relative;
}
.rppg-cmp-points li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--rppg-accent, #a8a4ff);
    font-size: 10px;
}

/* ── Highlight layout ─────────────────────────────────────────── */
.rppg-highlight-statement {
    font-size: clamp(14px, 2vw, 20px);
    font-weight: 800;
    color: var(--rppg-accent, #a8a4ff);
    line-height: 1.35;
    margin: 0 0 14px;
    font-style: italic;
}
.rppg-highlight-explanation {
    font-size: clamp(11px, 1.3vw, 14px);
    color: #c8c6e8;
    line-height: 1.7;
    margin: 0;
}

/* ── Thumb type indicators ────────────────────────────────────── */
.rppg-thumb--cover   { border-left: 3px solid #a8a4ff; }
.rppg-thumb--stats   { border-left: 3px solid #22c55e; }
.rppg-thumb--comparison { border-left: 3px solid #fb923c; }
.rppg-thumb--highlight  { border-left: 3px solid #facc15; }

@media (max-width: 520px) {
    .rppg-template-picker { gap: 8px; }
    .rppg-tpl-card { padding: 10px 12px 10px 10px; }
    .rppg-tpl-mockup { width: 80px; }
    .rppg-stats-grid { gap: 8px; }
    .rppg-cmp-grid { flex-direction: column; gap: 8px; }
}

/* ── Visual Editor Modal ─────────────────────────────────────────────────── */

#rppg-editor-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #1a1a2e;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body.rppg-editor-open {
    overflow: hidden;
}

/* Toolbar */
.rppg-editor-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0f0f1a;
    border-bottom: 1px solid #2d2d4a;
    padding: 8px 16px;
    gap: 12px;
    flex-shrink: 0;
    height: 52px;
    box-sizing: border-box;
}

.rppg-editor-bar__nav,
.rppg-editor-bar__tools,
.rppg-editor-bar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rppg-ed-counter {
    font-size: 13px;
    color: #94a3b8;
    min-width: 56px;
    text-align: center;
    font-family: inherit;
}

/* Buttons */
.rppg-ed-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #3d3d5c;
    background: #252540;
    color: #e2e8f0;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
    line-height: 1;
}

.rppg-ed-btn:hover {
    background: #2e2e52;
    border-color: #5b5b8a;
}

.rppg-ed-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.rppg-ed-btn--primary {
    background:   var(--rppg-primary);
    border-color: var(--rppg-primary);
    color: #fff;
    font-weight: 600;
}

.rppg-ed-btn--primary:hover {
    background:   var(--rppg-primary-dark);
    border-color: var(--rppg-primary-dark);
}

.rppg-ed-btn--ghost {
    background: transparent;
    border-color: transparent;
    color: #94a3b8;
}

.rppg-ed-btn--ghost:hover {
    background: #1e1e38;
    border-color: #3d3d5c;
    color: #e2e8f0;
}

.rppg-ed-btn--tool {
    padding: 6px 10px;
    font-size: 14px;
    font-weight: 700;
}

/* Body: slide area + thumb strip */
.rppg-editor-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

/* Main slide area — centres the slide card */
.rppg-editor-canvas-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 24px;
    background: #12122a;
    min-height: 0;
    /* Container queries so .rppg-editor-slide can size itself relative to this area */
    container-type: size;
    container-name: editor-canvas;
}

/* The slide rendered in the editor — sized to fill the canvas while keeping 16/9.
   setZoom() overrides width via inline style; this is the CSS baseline. */
.rppg-editor-slide {
    /* aspect-ratio: 16/9 is inherited from .rppg-slide-main */
    /* Fit to canvas: capped by canvas width (92cqw) AND canvas height (calc(92cqh * 16/9)) */
    width: min(900px, 92cqw, calc(92cqh * 1.7778));
    flex-shrink: 0;
    box-shadow: 0 8px 36px rgba(0,0,0,.65);
    border-radius: 8px;
    cursor: text;
}

/* Contenteditable fields: subtle edit affordance */
.rppg-editor-slide [contenteditable] {
    outline: none;
    border-radius: 3px;
    cursor: text;
    transition: background 0.15s, box-shadow 0.15s;
}
.rppg-editor-slide [contenteditable]:hover {
    background: rgba(255,255,255,.06);
    box-shadow: 0 0 0 1px rgba(255,255,255,.12);
}
.rppg-editor-slide [contenteditable]:focus {
    background: rgba(255,255,255,.09);
    box-shadow: 0 0 0 2px rgba(168,164,255,.45);
}
.rppg-slide-main--light .rppg-editor-slide [contenteditable]:hover,
#rppg-editor-modal .rppg-slide-main--light [contenteditable]:hover {
    background: rgba(0,0,0,.04);
    box-shadow: 0 0 0 1px rgba(0,0,0,.1);
}
.rppg-slide-main--light .rppg-editor-slide [contenteditable]:focus,
#rppg-editor-modal .rppg-slide-main--light [contenteditable]:focus {
    background: rgba(0,0,0,.06);
    box-shadow: 0 0 0 2px rgba(30,58,138,.35);
}

/* Hint text in toolbar */
.rppg-ed-hint {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
}

/* Thumbnail strip at the bottom of the editor */
.rppg-editor-thumbstrip {
    display: flex;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 16px;
    background: #0f0f1a;
    border-top: 1px solid #1e1e38;
    flex-shrink: 0;
    scrollbar-width: thin;
    scrollbar-color: #2d2d4a transparent;
    align-items: center;
}
.rppg-editor-thumbstrip::-webkit-scrollbar { height: 4px; }
.rppg-editor-thumbstrip::-webkit-scrollbar-track { background: transparent; }
.rppg-editor-thumbstrip::-webkit-scrollbar-thumb { background: #2d2d4a; border-radius: 2px; }

/* Re-use .rppg-thumb styles — active state already handled by class */

@media (max-width: 760px) {
    .rppg-editor-bar {
        padding: 6px 10px;
        gap: 6px;
    }
    .rppg-ed-btn {
        padding: 5px 8px;
        font-size: 12px;
    }
    .rppg-editor-canvas-wrap {
        padding: 12px 12px 8px;
    }
    .rppg-ed-hint {
        display: none;  /* hide on small screens */
    }
}

/* ── New slide type previews ────────────────────────────────────────────── */

/* Quote */
.rppg-quote-block {
    margin: 0;
    padding: 0 8px;
    border-left: 3px solid var(--rppg-accent, #a8a4ff);
}
.rppg-quote-text {
    font-size: clamp(13px, 1.6vw, 18px);
    font-style: italic;
    font-weight: 600;
    color: #e0deff;
    line-height: 1.55;
    margin: 0 0 8px;
}
.rppg-quote-author {
    font-size: clamp(10px, 1.1vw, 13px);
    color: var(--rppg-accent, #a8a4ff);
    text-align: right;
}
.rppg-quote-author cite { font-style: normal; opacity: .75; }

.rppg-slide-main--light .rppg-quote-text   { color: #1a1a2e; }
.rppg-slide-main--light .rppg-quote-author { color: var(--rppg-accent, #1E3A8A); }

/* Agenda */
.rppg-agenda-list {
    list-style: none;
    margin: 0; padding: 0;
    counter-reset: agenda;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.rppg-agenda-list li {
    font-size: clamp(11px, 1.3vw, 15px);
    color: #c8c6e8;
    padding: 4px 0 4px 2em;
    position: relative;
    counter-increment: agenda;
}
.rppg-agenda-list li::before {
    content: counter(agenda) '.';
    position: absolute;
    left: 0;
    color: var(--rppg-accent, #a8a4ff);
    font-weight: 700;
    font-size: .9em;
}
.rppg-agenda-item--active { font-weight: 700; color: var(--rppg-accent, #a8a4ff) !important; }
.rppg-slide-main--light .rppg-agenda-list li { color: #333; }

/* Process */
.rppg-process-steps {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.rppg-process-step {
    flex: 1 1 100px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}
.rppg-process-num {
    font-size: clamp(18px, 2vw, 26px);
    font-weight: 800;
    color: var(--rppg-accent, #a8a4ff);
    line-height: 1;
    min-width: 28px;
    flex-shrink: 0;
}
.rppg-process-title {
    font-size: clamp(11px, 1.2vw, 14px);
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}
.rppg-process-desc {
    font-size: clamp(9px, 1vw, 11px);
    color: #c8c6e8;
    line-height: 1.4;
}
.rppg-slide-main--light .rppg-process-title { color: #1a1a2e; }
.rppg-slide-main--light .rppg-process-desc  { color: #555; }

/* Chart */
.rppg-chart-preview {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 80px;
}
.rppg-chart-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--rppg-accent, #a8a4ff);
    margin-bottom: 6px;
    text-transform: uppercase;
}
.rppg-chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 70px;
    padding-bottom: 18px;
    position: relative;
}
.rppg-chart-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    gap: 2px;
}
.rppg-chart-bar {
    width: 100%;
    background: var(--rppg-accent, #a8a4ff);
    border-radius: 2px 2px 0 0;
    min-height: 4px;
    opacity: .85;
    transition: opacity .15s;
}
.rppg-chart-bar-val {
    font-size: 8px;
    color: var(--rppg-accent, #a8a4ff);
    font-weight: 700;
    white-space: nowrap;
}
.rppg-chart-bar-lbl {
    font-size: 8px;
    color: #c8c6e8;
    white-space: nowrap;
    text-align: center;
    max-width: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rppg-chart-empty { font-size: 12px; color: #666; }
.rppg-slide-main--light .rppg-chart-bar-lbl { color: #555; }

/* Table */
.rppg-table-wrap { overflow-x: auto; }
.rppg-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: clamp(9px, 1vw, 12px);
}
.rppg-data-table th {
    background: var(--rppg-accent, #a8a4ff);
    color: #fff;
    padding: 4px 6px;
    text-align: left;
    font-weight: 700;
    white-space: nowrap;
}
.rppg-data-table td {
    padding: 3px 6px;
    color: #c8c6e8;
    border-bottom: 1px solid rgba(255,255,255,.06);
    white-space: nowrap;
}
.rppg-data-table tr:nth-child(even) td { background: rgba(255,255,255,.04); }
.rppg-slide-main--light .rppg-data-table td { color: #333; border-bottom-color: rgba(0,0,0,.07); }

/* Image placeholder */
.rppg-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 70px;
    border: 1.5px dashed var(--rppg-accent, #a8a4ff);
    border-radius: 6px;
    background: rgba(168,164,255,.07);
    padding: 12px;
    margin-bottom: 8px;
}
.rppg-image-icon { font-size: 22px; }
.rppg-image-caption {
    font-size: clamp(10px, 1.1vw, 12px);
    color: #c8c6e8;
    text-align: center;
}
.rppg-slide-main--light .rppg-image-caption { color: #555; }
.rppg-slide-main--light .rppg-image-placeholder { background: rgba(0,0,0,.04); }

/* Thumb colors for new types */
.rppg-thumb--quote    { border-left: 3px solid #c084fc; }
.rppg-thumb--agenda   { border-left: 3px solid #38bdf8; }
.rppg-thumb--process  { border-left: 3px solid #34d399; }
.rppg-thumb--chart    { border-left: 3px solid #fb923c; }
.rppg-thumb--table    { border-left: 3px solid #f472b6; }
.rppg-thumb--image    { border-left: 3px solid #a78bfa; }
.rppg-thumb--section  { border-left: 3px solid #e879f9; }
.rppg-thumb--timeline { border-left: 3px solid #2dd4bf; }

/* ── Key takeaway ─────────────────────────────────────────────────── */
.rppg-key-takeaway {
    margin-top: 12px;
    padding: 7px 12px;
    background: rgba(255,255,255,.07);
    border-left: 3px solid var(--rppg-accent, #a8a4ff);
    border-radius: 0 5px 5px 0;
    font-size: clamp(11px, 1.2vw, 13px);
    font-weight: 700;
    color: var(--rppg-accent, #a8a4ff);
    line-height: 1.45;
}
.rppg-slide-main--light .rppg-key-takeaway {
    background: rgba(0,0,0,.04);
    color: var(--rppg-accent, #1E3A8A);
}

/* ── Section slide ────────────────────────────────────────────────── */
.rppg-section-number {
    font-size: clamp(42px, 7vw, 64px);
    font-weight: 800;
    color: var(--rppg-accent, #a8a4ff);
    opacity: .28;
    line-height: 1;
    margin-bottom: 4px;
}
.rppg-section-subtitle {
    font-size: clamp(12px, 1.5vw, 16px);
    color: #e0deff;
    line-height: 1.6;
    margin: 6px 0 0;
    font-style: italic;
}
.rppg-slide-main--light .rppg-section-subtitle {
    color: #444;
}

/* ── Timeline ─────────────────────────────────────────────────────── */
.rppg-timeline {
    display: flex;
    gap: 0;
    align-items: flex-start;
    position: relative;
    padding-top: 4px;
    flex-wrap: nowrap;
    overflow: hidden;
}
/* Horizontal connector line */
.rppg-timeline::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--rppg-accent, #a8a4ff);
    opacity: .45;
}
.rppg-tl-event {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 4px;
    position: relative;
}
.rppg-tl-year {
    font-size: clamp(11px, 1.3vw, 14px);
    font-weight: 800;
    color: var(--rppg-accent, #a8a4ff);
    margin-bottom: 4px;
    text-align: center;
}
.rppg-tl-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--rppg-accent, #a8a4ff);
    flex-shrink: 0;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}
.rppg-tl-body { text-align: center; }
.rppg-tl-title {
    font-size: clamp(10px, 1.2vw, 13px);
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
    line-height: 1.35;
}
.rppg-tl-desc {
    font-size: clamp(9px, 1vw, 11px);
    color: #c8c6e8;
    line-height: 1.45;
}
.rppg-slide-main--light .rppg-tl-title { color: #1a1a2e; }
.rppg-slide-main--light .rppg-tl-desc  { color: #555; }

/* ── Logo overlay on slide preview ────────────────────────────────────────── */
.rppg-slide-logo {
    position:   absolute;
    bottom:     10px;
    right:      12px;
    max-height: 28px;
    max-width:  110px;
    width:      auto;
    height:     auto;
    object-fit: contain;
    opacity:    0.80;
    pointer-events: none;
    /* Soft drop-shadow so logo stays visible on any background */
    filter: drop-shadow(0 1px 3px rgba(0,0,0,.45));
}

/* ═══════════════════════════════════════════════════════════════════════════
   WIZARD – step-by-step generation flow
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Indicator bar ─────────────────────────────────────────────────────────── */
.rppg-wiz-bar {
    display:         flex;
    align-items:     flex-start;
    justify-content: center;
    gap:             0;
    margin-bottom:   2.25rem;
    padding-top:     .25rem;
    user-select:     none;
}

/* Connector line between bubbles */
.rppg-wiz-line {
    flex:        1;
    max-width:   72px;
    min-width:   20px;
    height:      1px;
    background:  rgba(168,164,255,.22);
    margin-top:  15px;   /* vertically aligns with centre of 32-px bubble */
    transition:  background .3s;
}

/* Single step */
.rppg-wiz-step {
    display:         flex;
    flex-direction:  column;
    align-items:     center;
    gap:             5px;
    position:        relative;
}

/* Numbered bubble */
.rppg-wiz-step__bubble {
    width:          32px;
    height:         32px;
    border-radius:  50%;
    border:         2px solid rgba(168,164,255,.28);
    display:        flex;
    align-items:    center;
    justify-content: center;
    font-size:      .8rem;
    font-weight:    700;
    color:          rgba(200,198,232,.45);
    background:     transparent;
    transition:     all .28s;
    line-height:    1;
}

.rppg-wiz-step__label {
    font-size:   .7rem;
    font-weight: 500;
    color:       rgba(200,198,232,.38);
    white-space: nowrap;
    transition:  color .28s;
    letter-spacing: .02em;
}

/* Active step */
.rppg-wiz-step--active .rppg-wiz-step__bubble {
    border-color: var(--rppg-accent, #a8a4ff);
    background:   var(--rppg-accent, #a8a4ff);
    color:        #fff;
    box-shadow:   0 0 16px rgba(168,164,255,.45);
}
.rppg-wiz-step--active .rppg-wiz-step__label {
    color: var(--rppg-accent, #a8a4ff);
    font-weight: 600;
}

/* Done step (checkmark) */
.rppg-wiz-step--done {
    cursor: pointer;
}
.rppg-wiz-step--done .rppg-wiz-step__bubble {
    border-color: rgba(168,164,255,.45);
    color:        rgba(200,198,232,.7);
}
.rppg-wiz-step--done .rppg-wiz-step__bubble::before {
    content: '✓';
    font-size: .75rem;
    font-weight: 700;
}
.rppg-wiz-step--done .rppg-wiz-step__label {
    color: rgba(200,198,232,.55);
}
/* Hover: done step looks clickable — subtle accent glow */
.rppg-wiz-step--done:hover .rppg-wiz-step__bubble {
    border-color: var(--rppg-accent, #a8a4ff);
    background:   rgba(168,164,255,.15);
    color:        rgba(200,198,232,.9);
    box-shadow:   0 0 10px rgba(168,164,255,.28);
}
.rppg-wiz-step--done:hover .rppg-wiz-step__label {
    color: rgba(200,198,232,.8);
}
/* Make the connector after a done step slightly more visible */
.rppg-wiz-step--done + .rppg-wiz-line {
    background: rgba(168,164,255,.38);
}

/* ── Step panels ────────────────────────────────────────────────────────────── */
.rppg-step-panel {
    animation: rppgWizIn .22s ease both;
}
@keyframes rppgWizIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* Panel heading row */
.rppg-step-panel__title {
    display:     flex;
    align-items: center;
    gap:         .5rem;
    font-size:   1.1rem;
    font-weight: 600;
    color:       #e8e6ff;
    margin:      0 0 1.5rem;
}
.rppg-step-panel__icon { font-size: 1.1em; }

/* ── Step nav buttons ────────────────────────────────────────────────────────── */
.rppg-step-nav {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    gap:             1rem;
    margin-top:      1.75rem;
}
.rppg-step-nav--right { justify-content: flex-end; }

/* ── Optional label ─────────────────────────────────────────────────────────── */
.rppg-optional {
    font-weight:  400;
    font-size:    .78em;
    opacity:      .6;
    margin-left:  .2em;
}

/* ── Inline custom group (step 2 colors, no collapsible wrapper) ─────────────── */
.rppg-custom-group--inline {
    margin-top: 1.25rem;
    padding:    1rem 1.1rem;
    background: rgba(168,164,255,.06);
    border:     1px solid rgba(168,164,255,.15);
    border-radius: 10px;
}
.rppg-custom-group--inline .rppg-custom-group__title {
    font-size:     .82rem;
    font-weight:   600;
    color:         rgba(200,198,232,.75);
    margin-bottom: .65rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* ── Wizard summary card (step 3) ───────────────────────────────────────────── */
.rppg-wiz-summary {
    background:    rgba(168,164,255,.08);
    border:        1px solid rgba(168,164,255,.2);
    border-radius: 10px;
    padding:       .9rem 1.1rem;
    margin-bottom: .25rem;
    font-size:     .88rem;
    color:         #c8c6e8;
    line-height:   1.6;
}
.rppg-wiz-summary strong { color: var(--rppg-accent, #a8a4ff); }
.rppg-wiz-summary em     { font-style: italic; opacity: .85; }

/* ── Textarea validation flash ──────────────────────────────────────────────── */
.rppg-field--error textarea,
.rppg-field--error input {
    border-color: #f87171 !important;
    animation: rppgFieldShake .3s ease;
}
@keyframes rppgFieldShake {
    0%,100% { transform: translateX(0); }
    25%      { transform: translateX(-6px); }
    75%      { transform: translateX(6px); }
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .rppg-wiz-line  { max-width: 28px; }
    .rppg-wiz-step__label { display: none; }  /* hide labels on tiny screens */
    .rppg-wiz-step__bubble { width: 28px; height: 28px; font-size: .72rem; }
    .rppg-wiz-line  { margin-top: 13px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   EDITOR — CANVAS v2
   New UI elements introduced in the canvas-style editor rewrite:
   3-column toolbar, type selector, formatting buttons, list-item controls,
   drag states, add-slide type picker.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 3-column toolbar sections ───────────────────────────────────────────── */
.rppg-editor-bar__left,
.rppg-editor-bar__center,
.rppg-editor-bar__right {
    display:     flex;
    align-items: center;
    gap:         6px;
    flex-shrink: 0;
    min-width:   0;
}
.rppg-editor-bar__left   { flex: 1; justify-content: flex-start; }
.rppg-editor-bar__center { flex: 0 1 auto; justify-content: center; gap: 4px; }
.rppg-editor-bar__right  { flex: 1; justify-content: flex-end; }

/* ── Vertical separator ──────────────────────────────────────────────────── */
.rppg-ed-sep {
    width:      1px;
    height:     20px;
    background: rgba(255,255,255,.1);
    flex-shrink: 0;
    margin:     0 3px;
}

/* ── Type-selector dropdown ──────────────────────────────────────────────── */
.rppg-ed-type-sel {
    -webkit-appearance: none;
    appearance:   none;
    background:   #252540 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2394a3b8'/%3E%3C/svg%3E") no-repeat right 8px center;
    background-size: 10px 6px;
    border:       1px solid #3d3d5c;
    border-radius: 6px;
    color:        #e2e8f0;
    font-size:    13px;
    font-family:  inherit;
    padding:      5px 28px 5px 10px;
    cursor:       pointer;
    line-height:  1;
    max-width:    150px;
    transition:   border-color .15s, background .15s;
}
.rppg-ed-type-sel:hover  { border-color: #5b5b8a; background-color: #2e2e52; }
.rppg-ed-type-sel:focus  { outline: none; border-color: var(--rppg-primary); box-shadow: 0 0 0 2px rgba(var(--rppg-primary-rgb),.25); }
.rppg-ed-type-sel option { background: #1a1a2e; color: #e2e8f0; }

/* ── New button variants ─────────────────────────────────────────────────── */

/* + Slide (accent purple) */
.rppg-ed-btn--add {
    background:   rgba(var(--rppg-primary-rgb),.18);
    border-color: rgba(var(--rppg-primary-rgb),.45);
    color:        #a8a4ff !important;
    font-weight:  600;
}
.rppg-ed-btn--add:hover {
    background:   rgba(var(--rppg-primary-rgb),.32);
    border-color: var(--rppg-primary);
    color:        #c4c0ff !important;
}

/* 🗑 Delete (red) */
.rppg-ed-btn--danger {
    background:   rgba(239,68,68,.12);
    border-color: rgba(239,68,68,.35);
    color:        #fca5a5 !important;
}
.rppg-ed-btn--danger:hover {
    background:   rgba(239,68,68,.24);
    border-color: #ef4444;
    color:        #fff !important;
}
.rppg-ed-btn--danger:disabled { opacity: .3; }

/* Small size (used on panel close) */
.rppg-ed-btn--sm {
    padding:   3px 9px;
    font-size: 12px;
}

/* ── Formatting toolbar buttons ──────────────────────────────────────────── */
.rppg-ed-fmt-btn {
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    width:           28px;
    height:          28px;
    padding:         0;
    border-radius:   5px;
    border:          1px solid transparent;
    background:      transparent;
    color:           #94a3b8;
    font-size:       14px;
    font-family:     inherit;
    cursor:          pointer;
    transition:      background .12s, color .12s, border-color .12s;
    flex-shrink:     0;
    line-height:     1;
    user-select:     none;
}
.rppg-ed-fmt-btn:hover {
    background:   #252540;
    border-color: #3d3d5c;
    color:        #e2e8f0;
}
/* Active / pressed state */
.rppg-ed-fmt-btn--on {
    background:   rgba(var(--rppg-primary-rgb),.25);
    border-color: rgba(var(--rppg-primary-rgb),.6);
    color:        #a8a4ff;
}
/* Keep formatting marks visible */
.rppg-ed-fmt-btn strong,
.rppg-ed-fmt-btn em,
.rppg-ed-fmt-btn u { color: inherit; font-size: inherit; }

/* ── List-item wrapper  (position:relative host for × button) ────────────── */
.rppg-ed-list-item {
    position: relative;
    padding-right: 22px !important;
}

/* Hide × by default; reveal on hover */
.rppg-ed-list-item .rppg-ed-li-del { display: none; }
.rppg-ed-list-item:hover .rppg-ed-li-del { display: flex; }

/* ── × delete button ─────────────────────────────────────────────────────── */
.rppg-ed-li-del {
    position:   absolute;
    right:      2px;
    top:        50%;
    transform:  translateY(-50%);
    width:      18px;
    height:     18px;
    border-radius: 50%;
    border:     none;
    background: rgba(239,68,68,.18);
    color:      #fca5a5;
    font-size:  12px;
    line-height: 1;
    cursor:     pointer;
    align-items: center;
    justify-content: center;
    padding:    0;
    flex-shrink: 0;
    transition: background .12s, color .12s;
    z-index:    2;
}
.rppg-ed-li-del:hover {
    background: #ef4444;
    color:      #fff;
}

/* ── "Add item" row at bottom of each list ───────────────────────────────── */
.rppg-ed-li-addrow {
    list-style: none !important;
    padding:    3px 0 1px !important;
}
/* suppress counter/bullet from parent <ol>/<ul> */
.rppg-ed-li-addrow::before { display: none !important; }

.rppg-ed-li-add {
    background: none;
    border:     1px dashed rgba(168,164,255,.28);
    border-radius: 5px;
    color:      rgba(168,164,255,.55);
    font-size:  11px;
    padding:    3px 10px;
    cursor:     pointer;
    transition: border-color .12s, color .12s, background .12s;
    white-space: nowrap;
    font-family: inherit;
}
.rppg-ed-li-add:hover {
    border-color: rgba(168,164,255,.65);
    color:        #a8a4ff;
    background:   rgba(168,164,255,.08);
}

/* ── Block-level "add" button (stats, process) ───────────────────────────── */
.rppg-ed-block-add {
    display:   block;
    width:     100%;
    margin-top: 8px;
    background: none;
    border:    1px dashed rgba(168,164,255,.28);
    border-radius: 7px;
    color:     rgba(168,164,255,.55);
    font-size: 12px;
    padding:   5px 12px;
    cursor:    pointer;
    text-align: center;
    transition: border-color .12s, color .12s, background .12s;
    font-family: inherit;
}
.rppg-ed-block-add:hover {
    border-color: rgba(168,164,255,.65);
    color:        #a8a4ff;
    background:   rgba(168,164,255,.07);
}

/* ── Stat-item wrapper (has relative-positioned × button) ────────────────── */
.rppg-ed-stat-item {
    position:      relative;
    padding-right: 22px !important;
}
.rppg-ed-stat-item .rppg-ed-li-del { top: 4px; transform: none; display: none; }
.rppg-ed-stat-item:hover .rppg-ed-li-del { display: flex; }

/* ── Process-step wrapper ────────────────────────────────────────────────── */
.rppg-ed-step-item {
    position:      relative;
    padding-right: 22px !important;
}
.rppg-ed-step-item .rppg-ed-li-del { top: 4px; transform: none; display: none; }
.rppg-ed-step-item:hover .rppg-ed-li-del { display: flex; }

/* ── Thumb drag states ───────────────────────────────────────────────────── */
.rppg-thumb--dragging {
    opacity:    .35;
    box-shadow: none !important;
    cursor:     grabbing;
}
.rppg-thumb--drag-over {
    border-color: var(--rppg-primary) !important;
    box-shadow:   0 0 0 3px rgba(var(--rppg-primary-rgb),.5) !important;
    transform:    scale(1.04);
    transition:   transform .1s;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ADD-SLIDE PANEL (type picker)
   ═══════════════════════════════════════════════════════════════════════════ */

#rppg-ed-addpanel {
    position: absolute;
    inset:    0;
    z-index:  10;
    display:  flex;
    align-items:     center;
    justify-content: center;
}

.rppg-ed-addpanel__overlay {
    position:           absolute;
    inset:              0;
    background:         rgba(0,0,0,.6);
    backdrop-filter:         blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.rppg-ed-addpanel__box {
    position:   relative;
    z-index:    1;
    background: #161625;
    border:     1px solid #2d2d4a;
    border-radius: 14px;
    padding:    20px 22px 24px;
    width:      min(540px, 90vw);
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.7);
    scrollbar-width: thin;
    scrollbar-color: #2d2d4a transparent;
}
.rppg-ed-addpanel__box::-webkit-scrollbar { width: 4px; }
.rppg-ed-addpanel__box::-webkit-scrollbar-thumb { background: #2d2d4a; border-radius: 2px; }

.rppg-ed-addpanel__hdr {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    margin-bottom:   16px;
    font-size:       15px;
    font-weight:     600;
    color:           #e2e8f0;
    flex-shrink:     0;
}

.rppg-ed-addpanel__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

/* ── Type card buttons ───────────────────────────────────────────────────── */
.rppg-ed-type-card {
    display:         flex;
    flex-direction:  column;
    align-items:     center;
    justify-content: center;
    gap:             6px;
    padding:         14px 10px;
    background:      #252540;
    border:          1.5px solid #2d2d4a;
    border-radius:   10px;
    color:           #c8c6e8;
    font-family:     inherit;
    cursor:          pointer;
    transition:      background .15s, border-color .15s, transform .15s, color .15s;
    text-align:      center;
    min-height:      72px;
    user-select:     none;
}
.rppg-ed-type-card:hover {
    background:   #2e2e52;
    border-color: var(--rppg-primary);
    color:        #e8e6ff;
    transform:    translateY(-2px);
    box-shadow:   0 4px 16px rgba(var(--rppg-primary-rgb),.25);
}
.rppg-ed-type-card__icon {
    font-size:   20px;
    line-height: 1;
    display:     block;
}
.rppg-ed-type-card__label {
    font-size:   11px;
    font-weight: 600;
    line-height: 1.3;
    display:     block;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
    .rppg-editor-bar__center { gap: 3px; }
    .rppg-ed-type-sel         { max-width: 110px; font-size: 12px; }
    .rppg-ed-fmt-btn          { width: 26px; height: 26px; font-size: 13px; }
    .rppg-ed-addpanel__grid   { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
}
@media (max-width: 540px) {
    /* On very small screens collapse the center toolbar to keep export visible */
    .rppg-editor-bar__center { display: none; }
    .rppg-editor-bar__left   { flex: 1 1 auto; }
    .rppg-editor-bar__right  { flex: 0 0 auto; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   EDITOR TITLEBAR  (name input + save)
   ═══════════════════════════════════════════════════════════════════════════ */

.rppg-ed-titlebar {
    display:     flex;
    align-items: center;
    gap:         8px;
    padding:     6px 16px;
    background:  #13132a;
    border-bottom: 1px solid #1e1e38;
    flex-shrink: 0;
}

.rppg-ed-name-input {
    flex:        1;
    background:  transparent;
    border:      1px solid transparent;
    border-radius: 5px;
    color:       #e2e8f0;
    font-size:   13px;
    font-family: inherit;
    font-weight: 500;
    padding:     4px 8px;
    outline:     none;
    transition:  border-color .15s, background .15s;
    min-width:   0;
}
.rppg-ed-name-input::placeholder { color: #3d3d5c; }
.rppg-ed-name-input:hover  { border-color: #3d3d5c; background: rgba(255,255,255,.03); }
.rppg-ed-name-input:focus  { border-color: var(--rppg-primary); background: rgba(255,255,255,.05); }

.rppg-ed-save-status {
    font-size:   11px;
    color:       #64748b;
    white-space: nowrap;
    min-width:   60px;
}
.rppg-ed-save-status--ok  { color: #22c55e; }
.rppg-ed-save-status--err { color: #ef4444; }

/* ── Zoom label ──────────────────────────────────────────────────────────── */
.rppg-ed-zoom-label {
    font-size:  12px;
    color:      #94a3b8;
    min-width:  38px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-family: inherit;
}

/* ── Theme selector (right toolbar) ─────────────────────────────────────── */
.rppg-ed-theme-sel {
    max-width: 120px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPEAKER NOTES PANEL
   ═══════════════════════════════════════════════════════════════════════════ */

.rppg-ed-notes-panel {
    flex-shrink: 0;
    background:  #0b0b1c;
    border-top:  1px solid #1e1e38;
    overflow:    hidden;
    transition:  max-height .2s ease;
    max-height:  160px;
}

.rppg-ed-notes-panel--collapsed {
    max-height: 34px;   /* only the bar visible */
}

.rppg-ed-notes-bar {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    padding:         5px 12px 5px 14px;
    height:          34px;
    box-sizing:      border-box;
    flex-shrink:     0;
}

.rppg-ed-notes-label {
    font-size:   11px;
    font-weight: 600;
    color:       #64748b;
    letter-spacing: .04em;
    text-transform: uppercase;
    user-select: none;
}

.rppg-ed-notes-textarea {
    display:     block;
    width:       100%;
    box-sizing:  border-box;
    padding:     8px 14px;
    background:  transparent;
    border:      none;
    outline:     none;
    color:       #cbd5e1;
    font-size:   13px;
    font-family: inherit;
    line-height: 1.55;
    resize:      none;
    scrollbar-width: thin;
    scrollbar-color: #2d2d4a transparent;
}
.rppg-ed-notes-textarea::placeholder { color: #334155; }
.rppg-ed-notes-textarea:focus        { background: rgba(255,255,255,.02); }

/* ── AI button in toolbar ─────────────────────────────────────────────────── */
.rppg-ed-btn--ai {
    background:  linear-gradient(135deg, #6c63ff 0%, #a78bfa 100%);
    color:       #fff !important;
    border:      none;
    font-weight: 600;
    padding:     0 14px;
    border-radius: 6px;
    letter-spacing: .02em;
    transition:  opacity .15s, transform .1s;
}
.rppg-ed-btn--ai:hover:not(:disabled) { opacity: .88; transform: translateY(-1px); }
.rppg-ed-btn--ai:disabled             { opacity: .45; cursor: not-allowed; }

/* ── AI panel (slide-over from right) ────────────────────────────────────── */
#rppg-ed-ai-panel {
    position:   absolute;
    inset:      0;
    z-index:    120;
    display:    none; /* toggled via jQuery */
}

.rppg-ed-ai-overlay {
    position:   absolute;
    inset:      0;
    background: rgba(0,0,0,.45);
    cursor:     pointer;
}

.rppg-ed-ai-box {
    position:   absolute;
    top:        0;
    right:      0;
    bottom:     0;
    width:      min(340px, 92vw);
    background: #1e1e36;
    border-left: 1px solid #2d2d4a;
    display:    flex;
    flex-direction: column;
    overflow-y: auto;
    padding:    0 0 20px;
    box-shadow: -6px 0 24px rgba(0,0,0,.35);
}

/* header row */
.rppg-ed-ai-box > div:first-child {
    display:       flex;
    align-items:   center;
    justify-content: space-between;
    padding:       14px 16px 12px;
    border-bottom: 1px solid #2d2d4a;
    flex-shrink:   0;
}
.rppg-ed-ai-box > div:first-child strong {
    font-size:   14px;
    font-weight: 700;
    color:       #e2e8f0;
    letter-spacing: .02em;
}

/* sections */
.rppg-ed-ai-section {
    padding: 16px 16px 0;
}

.rppg-ed-ai-section__title {
    font-size:      10px;
    font-weight:    700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color:          #64748b;
    margin-bottom:  8px;
}

/* action buttons inside panel */
.rppg-ed-ai-btn {
    display:       block;
    width:         100%;
    padding:       10px 14px;
    background:    #2d2d4a;
    border:        1px solid #3d3d5c;
    border-radius: 7px;
    color:         #c4b5fd;
    font-size:     13px;
    font-weight:   600;
    cursor:        pointer;
    text-align:    left;
    transition:    background .15s, border-color .15s, transform .1s;
    margin-bottom: 8px;
}
.rppg-ed-ai-btn:hover:not(:disabled) {
    background:   #383860;
    border-color: #6c63ff;
    transform:    translateY(-1px);
}
.rppg-ed-ai-btn:disabled {
    opacity: .45;
    cursor:  not-allowed;
}

/* extend row (3 side-by-side buttons) */
.rppg-ed-ai-extend-row {
    display: flex;
    gap:     8px;
}
.rppg-ed-ai-extend-row .rppg-ed-ai-btn {
    flex:        1;
    text-align:  center;
    padding:     10px 6px;
    font-size:   12px;
}

/* translate row */
.rppg-ed-ai-translate-row {
    display:   flex;
    gap:       8px;
    flex-wrap: wrap;
}
.rppg-ed-ai-translate-row select {
    flex:          1;
    min-width:     0;
    background:    #2d2d4a;
    border:        1px solid #3d3d5c;
    border-radius: 7px;
    color:         #e2e8f0;
    font-size:     13px;
    padding:       9px 10px;
}
.rppg-ed-ai-translate-row .rppg-ed-ai-btn {
    flex-basis: 100%;
    text-align: center;
    margin-bottom: 0;
}

/* loading overlay (inside editor body) */
.rppg-ed-ai-loading {
    position:   absolute;
    inset:      0;
    z-index:    130;
    background: rgba(10,10,26,.72);
    display:    flex;
    flex-direction: column;
    align-items:    center;
    justify-content: center;
    gap:        14px;
    color:      #e2e8f0;
    font-size:  14px;
    font-weight: 600;
    pointer-events: all;
}
.rppg-ed-ai-loading__spinner {
    width:  36px;
    height: 36px;
    border: 3px solid #3d3d5c;
    border-top-color: #a78bfa;
    border-radius: 50%;
    animation: rppg-spin .7s linear infinite;
}
@keyframes rppg-spin {
    to { transform: rotate(360deg); }
}

/* status message at bottom of AI panel */
.rppg-ed-ai-status {
    margin:        12px 16px 0;
    padding:       9px 12px;
    border-radius: 6px;
    font-size:     12px;
    font-weight:   500;
    line-height:   1.45;
    background:    #1a1a30;
    border:        1px solid #2d2d4a;
    color:         #94a3b8;
}
.rppg-ed-ai-status--ok  { border-color: #22c55e; color: #86efac; background: #052e16; }
.rppg-ed-ai-status--err { border-color: #ef4444; color: #fca5a5; background: #2d0a0a; }

/* ═══════════════════════════════════════════════════════════════════════════
   SPRINT 7 — Exportação & Compartilhamento
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Present button ──────────────────────────────────────────────────────── */
.rppg-ed-btn--present {
    background:  linear-gradient(135deg, #059669 0%, #34d399 100%);
    color:       #fff !important;
    border:      none;
    font-weight: 600;
    padding:     0 14px;
    border-radius: 6px;
    transition:  opacity .15s, transform .1s;
}
.rppg-ed-btn--present:hover:not(:disabled) { opacity: .88; transform: translateY(-1px); }

/* ── Fullscreen presentation overlay ────────────────────────────────────── */
#rppg-present {
    position:   fixed;
    inset:      0;
    z-index:    99999;
    background: #000;
    display:    flex;
    align-items:    center;
    justify-content: center;
    cursor:     pointer;
}

#rppg-present-slide {
    width:   min(100vw, calc(100vh * 16 / 9));
    height:  min(100vh, calc(100vw * 9 / 16));
    max-width:  100vw;
    max-height: 100vh;
    flex-shrink: 0;
    box-shadow:  0 0 60px rgba(0,0,0,.8);
    overflow:    hidden;
    cursor:      pointer; /* click to advance */
}
/* Scale slide content to fit */
#rppg-present-slide .rppg-slide-cover,
#rppg-present-slide .rppg-slide-content,
#rppg-present-slide .rppg-slide-bullets,
#rppg-present-slide .rppg-slide-stats,
#rppg-present-slide .rppg-slide-comparison,
#rppg-present-slide .rppg-slide-highlight,
#rppg-present-slide .rppg-slide-quote,
#rppg-present-slide .rppg-slide-agenda,
#rppg-present-slide .rppg-slide-process,
#rppg-present-slide .rppg-slide-section,
#rppg-present-slide .rppg-slide-timeline,
#rppg-present-slide [class^="rppg-slide-"] {
    height: 100%;
}

/* Bottom navigation bar */
.rppg-present-ui {
    position:   fixed;
    bottom:     24px;
    left:       50%;
    transform:  translateX(-50%);
    display:    flex;
    align-items: center;
    gap:         12px;
    background:  rgba(0,0,0,.65);
    backdrop-filter: blur(8px);
    padding:     8px 18px;
    border-radius: 999px;
    border:      1px solid rgba(255,255,255,.12);
    opacity:     0;
    transition:  opacity .25s;
    cursor:      default;
}
#rppg-present:hover .rppg-present-ui { opacity: 1; }

.rppg-present-nav-btn {
    background:  transparent;
    border:      1px solid rgba(255,255,255,.25);
    border-radius: 50%;
    color:       #fff;
    width:  36px;
    height: 36px;
    display: flex;
    align-items:    center;
    justify-content: center;
    font-size:   18px;
    cursor:      pointer;
    transition:  background .15s;
}
.rppg-present-nav-btn:hover:not(:disabled) { background: rgba(255,255,255,.15); }
.rppg-present-nav-btn:disabled             { opacity: .3; cursor: default; }

.rppg-present-counter {
    color:      #fff;
    font-size:  13px;
    font-weight: 600;
    min-width:  48px;
    text-align: center;
    opacity:    .8;
}

/* Exit button */
.rppg-present-exit {
    position:   fixed;
    top:        16px;
    right:      20px;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(6px);
    border:     1px solid rgba(255,255,255,.15);
    border-radius: 6px;
    color:      #fff;
    padding:    7px 14px;
    font-size:  13px;
    font-weight: 600;
    cursor:     pointer;
    opacity:    0;
    transition: opacity .25s, background .15s;
}
#rppg-present:hover .rppg-present-exit { opacity: 1; }
.rppg-present-exit:hover               { background: rgba(239,68,68,.7); }

/* ── Print (PDF export) ──────────────────────────────────────────────────── */
.rppg-print-slide {
    width:      297mm;    /* A4 landscape width */
    height:     167mm;    /* A4 landscape height ≈ 16:9 at 297mm */
    overflow:   hidden;
    page-break-after: always;
    break-after: page;
}
.rppg-print-slide__inner {
    width:  100% !important;
    height: 100% !important;
}

@media print {
    body > * { display: none !important; }
    #rppg-print-container {
        display: block !important;
        position: static !important;
        left:  auto !important;
        width: auto !important;
    }
    .rppg-print-slide {
        display:  block !important;
        width:    100vw;
        height:   auto;
        min-height: 56.25vw; /* 16:9 */
        page-break-after: always;
    }
}

/* ── Export dropdown ─────────────────────────────────────────────────────── */
.rppg-ed-export-group {
    position: relative;
    display:  inline-flex;
}

.rppg-ed-export-trigger .rppg-ed-export-caret {
    margin-left: 4px;
    font-size:   10px;
    opacity:     .75;
    display:     inline-block;
    transition:  transform .2s;
}
.rppg-ed-export-trigger--open .rppg-ed-export-caret {
    transform: rotate(180deg);
}

.rppg-ed-export-menu {
    position:       absolute;
    top:            calc(100% + 6px);
    right:          0;
    min-width:      196px;
    background:     #1a1a2e;
    border:         1px solid rgba(255,255,255,.12);
    border-radius:  10px;
    padding:        6px;
    z-index:        10000;
    box-shadow:     0 10px 30px rgba(0,0,0,.45);
    display:        flex;
    flex-direction: column;
    gap:            2px;
    /* Slide-down animation */
    animation:      rppg-menu-in .15s ease;
}
@keyframes rppg-menu-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0);    }
}

.rppg-ed-export-item {
    display:       flex;
    align-items:   center;
    gap:           8px;
    width:         100%;
    padding:       9px 12px;
    background:    none;
    border:        none;
    border-radius: 7px;
    color:         rgba(255,255,255,.88);
    font-family:   inherit;
    font-size:     13px;
    font-weight:   500;
    cursor:        pointer;
    text-align:    left;
    transition:    background .12s;
}
.rppg-ed-export-item:hover {
    background: rgba(255,255,255,.1);
    color:      #fff;
}
.rppg-ed-export-item--share {
    color: #93c5fd;
}
.rppg-ed-export-item--share:hover {
    background: rgba(147,197,253,.12);
    color:      #bfdbfe;
}

.rppg-ed-export-divider {
    height:     1px;
    background: rgba(255,255,255,.1);
    margin:     4px 0;
}

/* Google Slides hint toast (inside modal, bottom-center) */
.rppg-ed-gslides-hint {
    position:      absolute;
    bottom:        72px;
    left:          50%;
    transform:     translateX(-50%);
    background:    #1e3a5f;
    border:        1px solid #3b82f6;
    border-radius: 8px;
    color:         #bfdbfe;
    font-size:     13px;
    line-height:   1.5;
    padding:       10px 16px;
    max-width:     480px;
    width:         max-content;
    z-index:       10001;
    text-align:    center;
    box-shadow:    0 4px 16px rgba(0,0,0,.4);
    pointer-events: none;
}
.rppg-ed-gslides-hint strong { color: #93c5fd; }
.rppg-ed-gslides-hint em     { font-style: italic; opacity: .9; }

/* ── Share modal ─────────────────────────────────────────────────────────── */
#rppg-ed-share-modal {
    position: absolute;
    inset:    0;
    z-index:  120;
}

.rppg-ed-share-overlay {
    position:   absolute;
    inset:      0;
    background: rgba(0,0,0,.5);
    cursor:     pointer;
}

.rppg-ed-share-box {
    position:  absolute;
    top:       50%;
    left:      50%;
    transform: translate(-50%, -50%);
    width:     min(440px, 90vw);
    background: #1e1e36;
    border:     1px solid #2d2d4a;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
    overflow:   hidden;
}

.rppg-ed-share-hdr {
    display:        flex;
    align-items:    center;
    justify-content: space-between;
    padding:        14px 16px;
    border-bottom:  1px solid #2d2d4a;
}
.rppg-ed-share-hdr strong {
    font-size:   14px;
    font-weight: 700;
    color:       #e2e8f0;
}

.rppg-ed-share-body {
    padding: 16px;
}

.rppg-ed-share-desc {
    font-size:   13px;
    color:       #94a3b8;
    margin:      0 0 14px;
    line-height: 1.5;
}

.rppg-ed-share-row {
    display: flex;
    gap:     8px;
}

.rppg-ed-share-input {
    flex:          1;
    min-width:     0;
    background:    #2d2d4a;
    border:        1px solid #3d3d5c;
    border-radius: 6px;
    color:         #e2e8f0;
    font-size:     12px;
    padding:       8px 10px;
    font-family:   monospace;
    cursor:        text;
}
.rppg-ed-share-input:focus { outline: none; border-color: #6c63ff; }

.rppg-ed-share-status {
    margin-top:    10px;
    padding:       8px 12px;
    border-radius: 6px;
    font-size:     12px;
    font-weight:   500;
    background:    #1a1a30;
    border:        1px solid #2d2d4a;
    color:         #94a3b8;
}
.rppg-ed-share-status--ok  { background: #052e16; border-color: #22c55e; color: #86efac; }
.rppg-ed-share-status--err { background: #2d0a0a; border-color: #ef4444; color: #fca5a5; }

/* ── Pricing / Plans section ──────────────────────────────────────────────── */
.rppg-pricing {
    padding: 56px 0 48px;
    scroll-margin-top: 80px;
}

.rppg-pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 36px;
    align-items: stretch;
}

.rppg-plan-card {
    background: var(--rppg-body-bg);
    border: 1px solid var(--rppg-border);
    border-radius: 16px;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    transition: box-shadow .2s, transform .2s;
}
.rppg-plan-card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,.10);
    transform: translateY(-2px);
}
.rppg-plan-card--featured {
    border: 2px solid var(--rppg-primary);
    background: linear-gradient(160deg, rgba(108,99,255,.05) 0%, var(--rppg-body-bg) 60%);
}

.rppg-plan-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--rppg-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    padding: 4px 14px;
    border-radius: 20px;
    white-space: nowrap;
}

.rppg-plan-header {
    text-align: center;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--rppg-border);
    margin-bottom: 24px;
}
.rppg-plan-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--rppg-body-color);
    margin-bottom: 8px;
}
.rppg-plan-price {
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 900;
    color: var(--rppg-primary);
    line-height: 1;
    margin-bottom: 4px;
}
.rppg-plan-period {
    font-size: 13px;
    color: var(--rppg-muted);
}

.rppg-plan-features {
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}
.rppg-plan-features li {
    font-size: 14px;
    line-height: 1.4;
}
.rppg-plan-feature--yes {
    color: var(--rppg-body-color);
}
.rppg-plan-feature--no {
    color: var(--rppg-muted);
    opacity: .6;
}

.rppg-plan-btn {
    display: block;
    text-align: center;
    padding: 12px 20px;
    border-radius: var(--rppg-radius-lg);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background .18s, color .18s, border-color .18s, opacity .18s;
    cursor: pointer;
    border: 2px solid transparent;
}
.rppg-plan-btn--primary {
    background: var(--rppg-primary);
    color: #fff;
    border-color: var(--rppg-primary);
}
.rppg-plan-btn--primary:hover {
    background: var(--rppg-primary-dark);
    border-color: var(--rppg-primary-dark);
    color: #fff;
    text-decoration: none;
}
.rppg-plan-btn--outline {
    background: transparent;
    color: var(--rppg-primary);
    border-color: var(--rppg-primary);
}
.rppg-plan-btn--outline:hover {
    background: rgba(var(--rppg-primary-rgb),.08);
    color: var(--rppg-primary);
    text-decoration: none;
}
.rppg-plan-btn--current {
    display: block;
    text-align: center;
    padding: 12px 20px;
    border-radius: var(--rppg-radius-lg);
    font-size: 14px;
    font-weight: 600;
    background: rgba(var(--rppg-primary-rgb),.08);
    color: var(--rppg-primary);
    opacity: .7;
}

@media (max-width: 860px) {
    .rppg-pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
    .rppg-plan-card--featured { order: -1; }
}
@media (min-width: 600px) and (max-width: 860px) {
    .rppg-pricing-grid {
        grid-template-columns: 1fr 1fr;
        max-width: 720px;
    }
    .rppg-plan-card--featured { order: 0; }
    .rppg-plan-card:first-child { grid-column: 1; }
    .rppg-plan-card--featured   { grid-column: 2; }
    .rppg-plan-card:last-child  { grid-column: 1 / -1; max-width: 340px; margin: 0 auto; }
}
