body.ecom-genesis-page {
    margin: 0;
    min-height: 100vh;
    background: #f4f7fb;
    color: #111827;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.eg-shell {
    min-height: 100vh;
}

.eg-topbar {
    height: 64px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 28px;
    border-bottom: 1px solid #e5eaf1;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.eg-back,
.eg-nav a {
    color: #536174;
    text-decoration: none;
    font-size: 14px;
}

.eg-back:hover,
.eg-nav a:hover {
    color: #111827;
}

.eg-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: 0;
}

.eg-brand-mark {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: #111827;
    box-shadow: inset 0 0 0 5px #22d3ee;
}

.eg-nav {
    justify-self: end;
    display: flex;
    gap: 18px;
}

.eg-main {
    width: min(1180px, calc(100vw - 36px));
    margin: 0 auto;
    padding: 42px 0 64px;
}

.eg-hero {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    align-items: end;
    margin-bottom: 28px;
}

.eg-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    padding: 7px 12px;
    border: 1px solid #dce5ef;
    border-radius: 999px;
    background: #fff;
    color: #0f766e;
    font-size: 13px;
    font-weight: 650;
}

.eg-kicker span {
    padding: 3px 7px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
}

.eg-hero h1 {
    margin: 0;
    font-size: 40px;
    line-height: 1.15;
    letter-spacing: 0;
}

.eg-subtitle {
    max-width: 680px;
    margin: 14px 0 0;
    color: #64748b;
    font-size: 17px;
    line-height: 1.7;
}

.eg-meter {
    display: grid;
    grid-template-columns: repeat(4, auto);
    gap: 8px;
    padding: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 10px;
    color: #475569;
    white-space: nowrap;
}

.eg-meter span {
    padding: 8px 10px;
    border-radius: 7px;
    background: #f8fafc;
    font-size: 13px;
}

.eg-meter span:first-child {
    background: #ecfeff;
    color: #0f766e;
}

.eg-workspace {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.eg-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
}

.eg-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid #edf2f7;
}

.eg-panel h2 {
    margin: 0;
    font-size: 17px;
    letter-spacing: 0;
}

.eg-panel p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.55;
}

#eg-upload-count,
.eg-batch-id {
    color: #0f766e;
    font-size: 13px;
}

.eg-dropzone {
    margin: 18px 22px;
    min-height: 184px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    border: 1px dashed #b8c4d4;
    border-radius: 8px;
    background: #f8fafc;
    cursor: pointer;
    color: #334155;
}

.eg-dropzone:hover {
    border-color: #0891b2;
    background: #f0fdff;
}

.eg-dropzone.is-dragover {
    border-color: #0891b2;
    background: #ecfeff;
    box-shadow: inset 0 0 0 1px rgba(8, 145, 178, 0.18);
}

.eg-upload-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #111827;
    color: #fff;
    font-size: 24px;
    line-height: 1;
}

.eg-dropzone small {
    color: #94a3b8;
}

.eg-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 0 22px 22px;
}

.eg-thumb {
    position: relative;
    aspect-ratio: 1;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
}

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

.eg-thumb button {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 7px;
    background: rgba(17, 24, 39, 0.82);
    color: #fff;
    cursor: pointer;
}

.eg-config-panel {
    padding-bottom: 20px;
}

.eg-mode-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 22px 22px 10px;
}

.eg-mode-tabs button,
.eg-link-btn {
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    min-height: 38px;
    cursor: pointer;
    color: #334155;
}

.eg-mode-tabs button.is-active {
    background: #111827;
    border-color: #111827;
    color: #fff;
}

.eg-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 12px 22px;
}

.eg-field-full {
    display: block;
    padding: 12px 22px;
}

.eg-form-grid label,
.eg-field-full {
    color: #475569;
    font-size: 13px;
}

.eg-form-grid span,
.eg-field-full span {
    display: block;
    margin-bottom: 8px;
    font-weight: 650;
}

.eg-form-grid select,
.eg-field-full textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #dfe7f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #111827;
    font: inherit;
}

.eg-form-grid select {
    height: 42px;
    padding: 0 12px;
}

.eg-field-full textarea {
    resize: vertical;
    min-height: 132px;
    padding: 12px;
    line-height: 1.6;
}

.eg-form-grid select:focus,
.eg-field-full textarea:focus {
    outline: 2px solid rgba(8, 145, 178, 0.18);
    border-color: #0891b2;
    background: #fff;
}

.eg-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 14px 22px 0;
    flex-wrap: wrap;
}

.eg-discount-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 22px 0;
    padding: 10px 12px;
    border: 1px solid rgba(249, 115, 22, 0.24);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255, 247, 237, 0.96), rgba(236, 253, 245, 0.9));
    color: #334155;
    font-size: 13px;
    line-height: 1.5;
}

.eg-discount-notice strong {
    padding: 3px 8px;
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 12px;
    white-space: nowrap;
}

.eg-btn {
    border: 0;
    border-radius: 8px;
    min-height: 42px;
    padding: 0 18px;
    font-weight: 700;
    cursor: pointer;
    background: #e6eef7;
    color: #111827;
}

.eg-btn-primary {
    background: #0891b2;
    color: #fff;
}

.eg-btn-secondary {
    background: #111827;
    color: #fff;
}

.eg-btn:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.eg-cost {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #0f766e;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.eg-cost b {
    padding: 3px 7px;
    border-radius: 999px;
    background: #fee2e2;
    color: #dc2626;
    font-size: 11px;
}

.eg-cost del {
    color: #94a3b8;
    font-weight: 600;
}

.eg-status {
    min-height: 20px;
    padding: 12px 22px 0;
    margin: 0;
}

.eg-insight,
.eg-plan,
.eg-results,
.eg-history {
    margin-top: 18px;
}

.eg-insight {
    padding: 18px 22px;
}

.eg-insight-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
    margin-bottom: 12px;
}

.eg-insight-head span {
    display: block;
    margin-bottom: 6px;
    color: #0f766e;
    font-size: 12px;
    font-weight: 700;
}

.eg-insight-head strong {
    display: block;
    color: #111827;
    font-size: 18px;
}

.eg-insight-head em {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid #dbe4ee;
    border-radius: 999px;
    color: #475569;
    font-style: normal;
    font-size: 12px;
    white-space: nowrap;
}

.eg-insight > p {
    margin: 0 0 16px;
    color: #475569;
    font-size: 14px;
    line-height: 1.7;
}

.eg-insight-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.eg-insight-cols section {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fbfdff;
    padding: 14px;
}

.eg-insight-cols b {
    display: block;
    margin-bottom: 10px;
    color: #111827;
    font-size: 13px;
}

.eg-insight-cols ul {
    margin: 0;
    padding-left: 18px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.65;
}

.eg-suite-style {
    margin-top: 14px;
    border: 1px solid #d7e2ec;
    border-radius: 8px;
    background: #f8fbfe;
    padding: 14px;
}

.eg-suite-style label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 10px;
}

.eg-suite-style b {
    color: #111827;
    font-size: 13px;
}

.eg-suite-style span {
    color: #64748b;
    font-size: 12px;
}

.eg-suite-style textarea {
    width: 100%;
    min-height: 120px;
    border: 1px solid #dbe4ee;
    border-radius: 8px;
    background: #ffffff;
    padding: 12px;
    color: #334155;
    font: inherit;
    font-size: 13px;
    line-height: 1.65;
    resize: vertical;
}

.eg-plan-grid,
.eg-result-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding: 18px 22px 22px;
}

.eg-plan-item,
.eg-result-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fbfdff;
    overflow: hidden;
}

.eg-plan-item {
    padding: 14px;
}

.eg-plan-item strong {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

.eg-plan-item span {
    display: block;
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
}

.eg-result-media {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    background: #eef3f8;
    color: #64748b;
    font-size: 13px;
}

.eg-result-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.eg-result-meta {
    padding: 12px;
}

.eg-result-meta strong {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
}

.eg-result-meta p {
    margin: 0;
    min-height: 20px;
}

.eg-result-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.eg-result-actions a {
    flex: 1;
    text-align: center;
    text-decoration: none;
    color: #111827;
    border: 1px solid #dbe4ee;
    border-radius: 7px;
    padding: 7px 6px;
    font-size: 12px;
    background: #fff;
}

.eg-empty {
    grid-column: 1 / -1;
    min-height: 240px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    color: #94a3b8;
}

.eg-empty-compact {
    min-height: 130px;
}

.eg-history-list {
    display: grid;
    gap: 12px;
    padding: 18px 22px 22px;
}

.eg-history-item {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fbfdff;
    padding: 12px;
}

.eg-history-thumb {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #eef3f8;
    overflow: hidden;
}

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

.eg-history-main strong {
    display: block;
    margin-bottom: 6px;
    color: #111827;
    font-size: 14px;
}

.eg-history-main p {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.55;
}

.eg-history-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.eg-history-meta span {
    color: #0f766e;
    font-size: 12px;
    font-weight: 700;
}

.eg-empty span {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid #dbe4ee;
    background: linear-gradient(90deg, #f8fafc 25%, #eef3f8 50%, #f8fafc 75%);
    background-size: 220% 100%;
    animation: eg-shimmer 1.6s infinite linear;
}

@keyframes eg-shimmer {
    from { background-position: 120% 0; }
    to { background-position: -120% 0; }
}

@media (max-width: 900px) {
    .eg-topbar {
        grid-template-columns: 1fr;
        height: auto;
        gap: 12px;
        padding: 14px 18px;
    }

    .eg-brand,
    .eg-nav {
        justify-self: start;
    }

    .eg-hero,
    .eg-workspace {
        grid-template-columns: 1fr;
        display: grid;
    }

    .eg-hero h1 {
        font-size: 30px;
    }

    .eg-form-grid,
    .eg-insight-cols,
    .eg-plan-grid,
    .eg-result-grid {
        grid-template-columns: 1fr;
    }

    .eg-meter {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        width: 100%;
        box-sizing: border-box;
    }

    .eg-meter span {
        text-align: center;
        padding: 8px 6px;
    }

    .eg-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .eg-cost {
        margin-left: 0;
    }

    .eg-history-item {
        grid-template-columns: 56px minmax(0, 1fr);
    }

    .eg-history-thumb {
        width: 56px;
        height: 56px;
    }

    .eg-history-meta {
        grid-column: 1 / -1;
        align-items: stretch;
    }
}
