/* Workbench v2 — PixPix-inspired shell (isolated from classic studio pages) */

/* style.css sets body { overflow: hidden } for studio layout — override here */
body.wb-page {
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
    max-height: none;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body.wb-page::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

body.wb-page:not(.wb-page--studio):not(.wb-page--lightbox) {
    overflow-y: auto !important;
    height: auto !important;
}

html:has(body.wb-page) {
    overflow-y: auto;
    overflow-x: hidden;
    height: auto;
    max-height: none;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html:has(body.wb-page)::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.wb-page {
    font-family: "Noto Sans SC", system-ui, sans-serif;
    background: #fff;
    min-height: 100vh;
    --wb-card-border: #e2e8f0;
    --wb-card-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
    --wb-modal-width: 920px;
    --wb-modal-width-split: 1120px;
    --wb-modal-height: 700px;
    /* 模板参考图 960×700；2 列 × 3 行拼图外框 = 1920×2100 */
    --wb-tpl-screen-ratio: 960 / 700;
    --wb-tpl-puzzle-ratio: 1920 / 2100;
}

.wb-shell {
    max-width: 1120px;
    margin: 0 auto;
    padding: 1.75rem 1.5rem 5rem;
}

.wb-hero {
    position: relative;
    text-align: center;
    margin-bottom: 3rem;
    padding: 1rem 0 0.5rem;
}

.wb-hero-inner {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.wb-hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.9rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-dark);
    background: var(--primary-soft);
    border: 1px solid var(--primary-border);
    letter-spacing: 0.03em;
}

.wb-hero-title {
    margin: 0;
    font-size: 3rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.035em;
    line-height: 1.28;
    white-space: nowrap;
}

.wb-hero-accent {
    color: var(--primary);
}

.wb-hero-lead {
    margin: 0;
    max-width: 28rem;
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.65;
}

.wb-hero .wb-classic-link {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 0.8125rem;
    padding: 0.38rem 0.8rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.wb-hero .wb-classic-link:hover {
    color: var(--primary);
    border-color: var(--primary-border);
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.1);
}

.wb-tab-pane[hidden] {
    display: none !important;
}

.wb-video-workspace {
    position: relative;
    flex: 1;
    min-height: 280px;
    border-radius: 18px;
    background: #f7f7f8;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wb-video-modal {
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1.5rem 1.5rem;
}

.wb-video-modal .wb-tool-modal-head {
    flex-shrink: 0;
    margin-bottom: 0.75rem;
}

.wb-video-modal .wb-status {
    margin-top: 0.65rem;
}

.wb-video-empty {
    text-align: center;
    padding: 2rem;
    color: #64748b;
}

.wb-video-empty p {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    color: #475569;
}

.wb-video-empty-hint {
    font-size: 0.8125rem !important;
    color: #94a3b8 !important;
}

.wb-video-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem;
    color: #dc4a3f;
    font-size: 0.875rem;
}

.wb-video-loading[hidden] {
    display: none !important;
}

.wb-video-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e2e8f0;
    border-top-color: #dc4a3f;
    border-radius: 50%;
    animation: wb-spin 0.8s linear infinite;
}

@keyframes wb-spin {
    to { transform: rotate(360deg); }
}

.wb-video-player-wrap {
    width: 100%;
    max-width: min(920px, 100%);
    padding: 1.5rem;
    box-sizing: border-box;
}

.wb-video-player-wrap[hidden] {
    display: none !important;
}

.wb-video-player-wrap video {
    width: 100%;
    max-height: min(52vh, 560px);
    border-radius: 12px;
    background: #0f172a;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.12);
}

.wb-page--video .wb-video-card {
    margin-bottom: 0;
}

.wb-video-card {
    margin-bottom: 1rem;
}

.wb-tabs {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 2.75rem;
    padding: 4px;
    background: #fff;
    border: 1px solid var(--wb-card-border);
    border-radius: 999px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05), inset 0 1px 0 rgba(255,255,255,0.8);
    backdrop-filter: blur(8px);
}

.wb-tab {
    border: none;
    background: transparent;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wb-tab.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3);
}

.wb-tab:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.wb-prompt-card {
    background: #fff;
    border-radius: 22px;
    padding: 1.35rem 1.5rem;
    box-shadow: var(--wb-card-shadow);
    margin-bottom: 3.25rem;
    border: 1px solid var(--wb-card-border);
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.wb-prompt-card:focus-within {
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px rgba(15, 23, 42, 0.1);
    border-color: rgba(var(--primary-rgb), 0.22);
}

.wb-prompt-inner {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.wb-prompt-editor {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wb-prompt-editor-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.wb-lang-field {
    margin: 0;
}

.wb-lang-select {
    font: inherit;
    font-size: 0.75rem;
    color: #475569;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    border-radius: 999px;
    padding: 0.35rem 1.75rem 0.35rem 0.65rem;
    max-width: 9.5rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: var(--select-chevron, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E"));
    background-repeat: no-repeat;
    background-position: right 0.55rem center;
    background-size: 12px 12px;
    cursor: pointer;
}

.wb-suggest-btn {
    position: relative;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary);
    border: 1px solid rgba(var(--primary-rgb), 0.22);
    background: rgba(var(--primary-rgb), 0.04);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.wb-suggest-btn:hover:not(:disabled) {
    background: rgba(var(--primary-rgb), 0.08);
    border-color: rgba(var(--primary-rgb), 0.35);
}

.wb-suggest-btn:disabled {
    opacity: 0.85;
    cursor: wait;
}

.wb-suggest-btn.is-loading {
    color: transparent;
    pointer-events: none;
}

.wb-suggest-btn.is-loading::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border: 2px solid rgba(var(--primary-rgb), 0.22);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: wb-spin 0.7s linear infinite;
}

.wb-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.wb-quick-refs {
    flex-shrink: 0;
    align-self: stretch;
    display: flex;
    align-items: flex-start;
}

.wb-quick-ref-list {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.55rem;
    min-height: 58px;
}

.wb-quick-ref-item {
    position: relative;
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    border-radius: 14px;
    overflow: visible;
    border: 1.5px solid rgba(96, 165, 250, 0.45);
    background: #f8fafc;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.wb-quick-ref-item:nth-child(1) {
    transform: rotate(-4deg);
}

.wb-quick-ref-item:nth-child(2) {
    transform: rotate(4deg);
}

.wb-quick-ref-item:nth-child(3) {
    transform: rotate(-2deg);
}

.wb-quick-ref-item.is-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    border-style: dashed;
    border-color: #cbd5e1;
    cursor: pointer;
    transform: none;
    font: inherit;
    padding: 0;
}

.wb-quick-ref-item.is-empty:hover {
    border-color: rgba(var(--primary-rgb), 0.35);
    background: rgba(var(--primary-rgb), 0.02);
}

.wb-quick-ref-item.has-add {
    margin-right: 0.15rem;
    margin-bottom: 0.15rem;
}

.wb-quick-ref-visual {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
}

.wb-quick-ref-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wb-quick-ref-remove {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 0.75rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 2;
}

.wb-quick-ref-add-btn {
    position: absolute;
    right: -6px;
    bottom: -6px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: var(--primary);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 0 0 1.5px rgba(96, 165, 250, 0.55), 0 2px 6px rgba(15, 23, 42, 0.08);
    z-index: 3;
}

.wb-quick-ref-add-btn:hover {
    background: var(--primary-soft);
}

.wb-quick-ref-empty-plus {
    font-size: 1.35rem;
    line-height: 1;
    color: #94a3b8;
}

.wb-video-frames {
    flex-shrink: 0;
    align-self: stretch;
}

.wb-video-frame-list {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.55rem;
    min-height: 58px;
}

.wb-video-frame-item:nth-child(1) {
    transform: rotate(-4deg);
}

.wb-video-frame-item:nth-child(2) {
    transform: rotate(4deg);
}

.wb-video-frame-item.is-empty {
    flex-direction: column;
    gap: 0.12rem;
}

.wb-video-frame-label {
    font-size: 0.625rem;
    font-weight: 600;
    color: #64748b;
    line-height: 1;
}

@media (max-width: 640px) {
    .wb-prompt-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .wb-prompt-editor {
        width: 100%;
    }

    .wb-quick-refs,
    .wb-video-frames {
        align-self: flex-start;
    }

    .wb-video-frames {
        flex-direction: row;
        align-items: center;
    }
}

.wb-upload-btn {
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    border-radius: 14px;
    border: 1.5px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.35rem;
    overflow: hidden;
    position: relative;
    background: #fafbfd;
    transition: all 0.2s ease;
}

.wb-upload-btn:hover {
    border-color: var(--primary-border);
    color: var(--primary);
    background: var(--primary-soft);
}

.wb-upload-btn.has-image {
    border-style: solid;
    border-color: rgba(220, 74, 63, 0.25);
}

.wb-quick-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wb-upload-plus {
    line-height: 1;
}

.wb-select-chip {
    font: inherit;
    font-size: 0.75rem;
    color: #475569;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 999px;
    padding: 0.35rem 0.65rem;
    cursor: pointer;
}

.wb-prompt-input {
    flex: 0 0 auto;
    width: 100%;
    border: none;
    resize: none;
    overflow-y: hidden;
    font: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #1e293b;
    min-height: 44px;
    box-sizing: border-box;
}

.wb-prompt-input:focus {
    outline: none;
}

.wb-prompt-foot {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
}

.wb-prompt-foot--draw {
    justify-content: space-between;
    gap: 0.65rem;
}

.wb-prompt-foot-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    min-width: 0;
}

.wb-model-picker,
.wb-draw-settings {
    position: relative;
}

.wb-model-trigger,
.wb-draw-settings-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #334155;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 999px;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.wb-model-trigger:hover,
.wb-draw-settings-trigger:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.wb-model-trigger:focus,
.wb-draw-settings-trigger:focus {
    outline: none;
    border-color: rgba(var(--primary-rgb), 0.4);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.08);
}

.wb-model-trigger-caret {
    font-size: 0.65rem;
    color: #94a3b8;
    line-height: 1;
}

.wb-model-menu,
.wb-draw-settings-pop {
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    z-index: 40;
    min-width: 220px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
    padding: 0.5rem;
}

.wb-draw-settings-pop {
    padding: 0.85rem;
    width: min(320px, calc(100vw - 2rem));
    max-height: min(420px, 70vh);
    overflow-y: auto;
}

.wb-model-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    width: 100%;
    text-align: left;
    font: inherit;
    border: none;
    background: transparent;
    border-radius: 10px;
    padding: 0.55rem 0.65rem;
    cursor: pointer;
    color: #1e293b;
}

.wb-model-option:hover {
    background: #f8fafc;
}

.wb-model-option.is-active {
    background: rgba(220, 74, 63, 0.06);
}

.wb-model-option-label {
    font-size: 0.8125rem;
    font-weight: 600;
}

.wb-model-option-head {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.wb-model-option-badge {
    font-size: 0.625rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    font-weight: 600;
    line-height: 1.2;
}

.wb-model-option-desc {
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.35;
}

.wb-draw-pop-title {
    margin: 0 0 0.45rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
}

.wb-draw-pop-title + .wb-segment-row {
    margin-bottom: 0.75rem;
}

.wb-ratio-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.wb-ratio-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 60px;
    font: inherit;
    font-size: 0.72rem;
    color: #475569;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    padding: 0.4rem;
    transition: all 0.15s ease;
}

.wb-ratio-btn:hover {
    border-color: #cbd5e1;
}

.wb-ratio-btn.is-active {
    border-color: #dc4a3f;
    background: rgba(220, 74, 63, 0.06);
    color: #a8322c;
}

.wb-ratio-preview {
    display: block;
    border: 1.5px solid currentColor;
    border-radius: 2px;
    background: transparent;
}

.wb-ratio-label {
    line-height: 1;
}

.wb-segment-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.wb-segment-btn {
    flex: 1 1 auto;
    min-width: 3.5rem;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 500;
    color: #475569;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 999px;
    padding: 0.4rem 0.7rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.wb-segment-btn:hover {
    border-color: #cbd5e1;
}

.wb-segment-btn.is-active {
    border-color: #dc4a3f;
    background: rgba(220, 74, 63, 0.06);
    color: #a8322c;
}

/* 视频设置弹层 — 比例 5 列 / 清晰度·时长分段按钮 */
.wb-video-settings-pop .wb-ratio-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.wb-video-settings-pop .wb-segment-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(4.5rem, 1fr));
    gap: 0.4rem;
}

.wb-video-settings-pop .wb-segment-btn {
    flex: initial;
    min-width: 0;
    border-radius: 12px;
    padding: 0.55rem 0.65rem;
}

.wb-video-settings-pop .wb-segment-row#wbVideoDurationRow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wb-send-btn--draw {
    margin-left: 0;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 999px;
    padding: 0.55rem 0.85rem;
    min-width: 3.25rem;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3);
    transition: all 0.2s ease;
}

.wb-send-btn--draw:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.4);
}

.wb-send-btn-icon {
    width: 14px;
    height: 14px;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5M5 12l7-7 7 7'/%3E%3C/svg%3E") center / contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5M5 12l7-7 7 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

.wb-send-btn-points {
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1;
}

.wb-chip-muted {
    font-size: 0.75rem;
    color: #94a3b8;
    padding: 0.25rem 0.6rem;
    background: #f8fafc;
    border-radius: 999px;
}

.wb-send-btn {
    margin-left: auto;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.25);
    transition: all 0.2s ease;
}

.wb-send-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.35);
}

.wb-tools {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.15rem;
    margin-top: 0.5rem;
    margin-bottom: 3.5rem;
}

.wb-tools--chips {
    gap: 1.5rem 2rem;
}

.wb-tool-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    font: inherit;
    min-width: 4.75rem;
}

.wb-tool-chip-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--wb-card-border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.wb-tool-chip-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 9px;
    display: block;
}

.wb-tool-chip-icon[data-tool="region_edit"] img {
    padding: 6px;
    transform: scale(1.18);
}

.wb-tool-chip:hover .wb-tool-chip-icon {
    transform: translateY(-3px) scale(1.02);
    border-color: rgba(15, 23, 42, 0.14);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.wb-tool-chip:active .wb-tool-chip-icon {
    transform: translateY(0);
}

.wb-tool-chip-label {
    font-size: 0.75rem;
    color: #475569;
    white-space: nowrap;
    line-height: 1.2;
    font-weight: 500;
}

.wb-tool-chip:hover .wb-tool-chip-label {
    color: #1e293b;
}

.wb-tool {
    font-size: 0.8125rem;
    color: #475569;
    text-decoration: none;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.65);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: none;
    cursor: pointer;
    font: inherit;
}

.wb-tool:hover {
    background: rgba(255, 255, 255, 0.8);
    color: var(--primary);
}

.wb-tool--more {
    border: 1px dashed #cbd5e1;
    background: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    font: inherit;
}

.wb-tool-more-icon {
    font-size: 1rem;
    line-height: 1;
    opacity: 0.7;
}

.wb-tool-badge {
    font-size: 0.625rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-weight: 600;
}

.wb-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
}

.wb-cards--core {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.15rem;
}

@media (min-width: 640px) {
    .wb-cards--core {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 900px) {
    .wb-cards--core {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 1rem;
    }
}

.wb-section-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 1rem;
    color: #0f172a;
    letter-spacing: -0.02em;
    text-align: center;
}

.wb-section-hint {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.65;
    margin: 0 0 1.75rem;
    text-align: center;
}

.wb-section {
    margin-bottom: 1.5rem;
}

.wb-section--core {
    margin-top: 2.5rem;
}

.wb-inspire {
    margin-top: 4.5rem;
    padding-bottom: 2rem;
}

/* 核心能力 / 模板中心加宽至 1300px，相对 .wb-shell(1120px) 向两侧展开；首屏生图/视频区不变 */
.wb-section--core,
.wb-template-center {
    width: min(1300px, calc(100vw - 3rem));
    margin-left: calc(50% - min(650px, 50vw - 1.5rem));
    margin-right: calc(50% - min(650px, 50vw - 1.5rem));
}

.wb-template-center .wb-template-type-tabs {
    margin-top: 0;
    margin-bottom: 1.35rem;
}

.wb-template-rows {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.wb-template-row {
    display: flex;
    align-items: stretch;
    gap: 1.15rem;
    padding: 1.1rem 1.25rem;
    background: #fff;
    border: 1px solid var(--wb-card-border);
    border-radius: 18px;
    box-shadow: var(--wb-card-shadow);
    min-width: 0;
}

.wb-template-row-intro {
    flex: 0 0 168px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-width: 0;
    text-align: center;
}

.wb-template-row-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.wb-template-row-desc {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: #64748b;
}

.wb-template-row-gallery {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: stretch;
    gap: 0.55rem;
}

.wb-template-row-viewport {
    flex: 1;
    min-width: 0;
    position: relative;
    overflow: hidden;
}

.wb-template-row-track {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.15rem 0.25rem 0.15rem 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.wb-template-row-track::-webkit-scrollbar {
    display: none;
}

.wb-template-row-nav {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.45rem;
    padding-left: 0.15rem;
}

.wb-template-row-nav-btn {
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid rgba(var(--primary-rgb), 0.38);
    border-radius: 999px;
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary);
    font: inherit;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(var(--primary-rgb), 0.16);
    transition: border-color 0.15s, color 0.15s, background 0.15s, box-shadow 0.15s;
}

.wb-template-row-nav-btn span {
    display: block;
    margin-top: -0.1rem;
}

.wb-template-row-nav-btn:hover:not(:disabled) {
    border-color: rgba(var(--primary-rgb), 0.55);
    color: var(--primary-dark);
    background: rgba(var(--primary-rgb), 0.22);
    box-shadow: 0 3px 14px rgba(var(--primary-rgb), 0.24);
}

.wb-template-row-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.wb-template-row-empty {
    align-self: center;
    font-size: 0.8125rem;
    color: #94a3b8;
    padding: 1rem 0.5rem;
}

.wb-template-col {
    position: relative;
    flex: 0 0 auto;
    width: 176px;
    border-radius: 14px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wb-template-col:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
}

.wb-template-col-hero {
    border-radius: 14px;
    overflow: hidden;
    background: #eef2f6;
    aspect-ratio: 4 / 5;
    min-height: 220px;
}

.wb-template-col-hero img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center top;
}

.wb-template-col--long .wb-template-col-hero {
    aspect-ratio: auto;
    height: 300px;
    min-height: 300px;
    max-height: 300px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.wb-template-col--long .wb-template-col-hero::-webkit-scrollbar {
    display: none;
}

.wb-template-col--long.is-scrollable-preview .wb-template-col-hero::after {
    content: "";
    position: sticky;
    bottom: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 2rem;
    margin-top: -2rem;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(238, 242, 246, 0) 0%, rgba(238, 242, 246, 0.92) 100%);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.wb-template-col--long.is-scrollable-preview:hover .wb-template-col-hero::after,
.wb-template-col--long.is-scrollable-preview:focus-within .wb-template-col-hero::after {
    opacity: 1;
}

.wb-template-col--long .wb-template-col-hero img {
    width: 100%;
    height: auto;
    min-height: 100%;
    object-fit: contain;
    object-position: top center;
}

.wb-template-col-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 2.25rem 0.65rem 0.65rem;
    border-radius: 0 0 14px 14px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.52) 72%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.wb-template-col:hover .wb-template-col-overlay,
.wb-template-col:focus-within .wb-template-col-overlay {
    opacity: 1;
}

.wb-template-col-go {
    border: none;
    border-radius: 999px;
    padding: 0.55rem 1.15rem;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.35);
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.wb-template-col-go:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.wb-template-col-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 220px;
    font-size: 0.75rem;
    color: #94a3b8;
}

.wb-template-col-thumbs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px;
    margin-top: 3px;
    border-radius: 10px;
    overflow: hidden;
}

.wb-template-col-thumb {
    aspect-ratio: 1;
    min-height: 52px;
    background: #f1f5f9;
    overflow: hidden;
}

.wb-template-col-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

@media (max-width: 768px) {
    .wb-template-row {
        flex-direction: column;
        gap: 0.85rem;
        padding: 1rem;
    }

    .wb-template-row-intro {
        flex: none;
        width: 100%;
    }

    .wb-template-row-gallery {
        flex-direction: column;
    }

    .wb-template-row-nav {
        flex-direction: row;
        justify-content: flex-end;
        padding-left: 0;
    }

    .wb-template-col {
        width: 156px;
    }

    .wb-template-col--long .wb-template-col-hero {
        height: 260px;
        min-height: 260px;
        max-height: 260px;
    }
}

.wb-inspire-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 0 1.25rem;
}

.wb-inspire-tab {
    border: 1px solid var(--wb-card-border);
    background: #fff;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.wb-inspire-tab:hover:not(.active) {
    color: #334155;
    border-color: #cbd5e1;
    background: #f8fafc;
}

.wb-inspire-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.28);
}

.wb-inspire-layout {
    min-height: 120px;
}

.wb-inspire-regions {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
    min-height: 120px;
}

@media (max-width: 768px) {
    .wb-cards {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 820px) {
    .wb-shell {
        padding: 1.25rem 1rem 4rem;
    }

    .wb-hero {
        margin-bottom: 2rem;
        padding-top: 0.25rem;
    }

    .wb-hero .wb-classic-link {
        position: static;
        display: inline-flex;
        margin: 0 auto 1rem;
    }

    .wb-hero-title {
        font-size: min(3rem, 6.8vw);
    }

    .wb-hero-lead {
        font-size: 0.82rem;
    }

    .wb-tabs {
        margin-bottom: 2rem;
    }

    .wb-prompt-card {
        border-radius: 16px;
        padding: 1rem;
        margin-bottom: 2.25rem;
    }

    .wb-prompt-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .wb-prompt-editor {
        width: 100%;
    }

    .wb-quick-refs,
    .wb-video-frames {
        align-self: flex-start;
    }

    .wb-prompt-foot {
        margin-top: 0.55rem;
        padding-top: 0.55rem;
    }

    .wb-tools {
        justify-content: flex-start;
        gap: 0.45rem;
        margin-top: 0.35rem;
        margin-bottom: 2.5rem;
    }

    .wb-tool {
        padding: 0.35rem 0.55rem;
        font-size: 0.78rem;
    }

    .wb-section-title {
        font-size: min(2rem, 6vw);
        margin-bottom: 0.35rem;
    }

    .wb-section-hint {
        margin-bottom: 1.35rem;
    }

    .wb-section--core {
        margin-top: 2rem;
    }

    .wb-inspire {
        margin-top: 3.5rem;
    }

    .wb-cards--core {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
    }
}

.wb-scene-card {
    text-align: left;
    border: 1px solid var(--wb-card-border);
    background: #fff;
    border-radius: 18px;
    padding: 0;
    min-height: 0;
    cursor: pointer;
    box-shadow: var(--wb-card-shadow);
    transition: all 0.25s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.wb-scene-visual {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
    background: #f1f5f9;
}

.wb-scene-copy {
    padding: 0.75rem 0.9rem 0.9rem;
}

.wb-scene-card--soon .wb-scene-visual {
    filter: grayscale(0.35);
    opacity: 0.85;
}

.wb-scene-visual-wrap {
    position: relative;
    display: block;
    line-height: 0;
    overflow: hidden;
}

.wb-scene-soon {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 600;
}

.wb-scene-card:hover:not(:disabled) {
    transform: translateY(-4px);
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06), 0 16px 36px rgba(15, 23, 42, 0.1);
}

.wb-scene-card--link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.wb-scene-card--soon {
    opacity: 0.55;
    cursor: not-allowed;
}

.wb-scene-title {
    display: block;
    font-weight: 650;
    font-size: 0.9375rem;
    color: #0f172a;
    margin-bottom: 0.3rem;
    letter-spacing: -0.01em;
}

.wb-scene-card--core .wb-scene-visual {
    aspect-ratio: 4 / 3;
}

.wb-scene-card--core .wb-scene-copy {
    padding: 1rem 1.05rem 1.1rem;
}

.wb-scene-card--core .wb-scene-title {
    font-size: 1.0625rem;
}

.wb-scene-card--core .wb-scene-desc {
    font-size: 0.8125rem;
}

@media (max-width: 820px) {
    .wb-scene-card {
        border-radius: 14px;
    }

    .wb-scene-card--core {
        display: grid;
        grid-template-columns: 76px 1fr;
        min-height: 96px;
        align-items: stretch;
    }

    .wb-scene-card--core .wb-scene-visual {
        height: 100%;
        min-height: 96px;
        aspect-ratio: auto;
        object-fit: cover;
    }

    .wb-scene-card--core .wb-scene-copy {
        padding: 0.8rem 0.85rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .wb-scene-card--core .wb-scene-title {
        font-size: 0.95rem;
    }

    .wb-scene-card--core .wb-scene-desc {
        font-size: 0.76rem;
        line-height: 1.35;
    }
}

@media (max-width: 520px) {
    .wb-cards--core {
        grid-template-columns: 1fr 1fr;
        gap: 0.65rem;
    }

    .wb-scene-card--core {
        display: flex;
        flex-direction: column;
        grid-template-columns: none;
        min-height: auto;
        aspect-ratio: 3 / 4;
    }

    .wb-scene-card--core .wb-scene-visual {
        width: 100%;
        min-width: 0;
        height: auto;
        min-height: 0;
        aspect-ratio: auto;
        flex: 1;
        border-radius: 14px 14px 0 0;
    }

    .wb-scene-card--core .wb-scene-copy {
        padding: 0.55rem 0.6rem;
        justify-content: flex-start;
    }

    .wb-scene-card--core .wb-scene-title {
        font-size: 0.8rem;
    }

    .wb-scene-card--core .wb-scene-desc {
        font-size: 0.65rem;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* ── Prompt card — 图片生成/视频创作 ── */
    .wb-prompt-card {
        padding: 0.85rem;
        border-radius: 14px;
        margin-bottom: 1.5rem;
    }

    .wb-prompt-foot--draw {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .wb-prompt-foot-left {
        justify-content: flex-start;
    }

    .wb-prompt-foot--draw .wb-send-btn--draw {
        align-self: flex-end;
    }

    .wb-model-trigger,
    .wb-draw-settings-trigger {
        font-size: 0.75rem;
        padding: 0.35rem 0.65rem;
    }

    .wb-suggest-btn {
        font-size: 0.72rem;
    }

    .wb-prompt-input {
        font-size: 0.85rem;
        width: 100%;
    }

    .wb-prompt-editor-bar {
        justify-content: flex-end;
        width: 100%;
    }

    /* ── Video frames ── */
    .wb-video-frame-list {
        gap: 0.4rem;
        min-height: 48px;
    }

    .wb-video-frame-item {
        width: 48px;
        height: 48px;
    }
}

.wb-scene-desc {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.4;
}

/* 灵感模板：品类横向翻页区 */
.wb-inspire-region-title {
    margin: 0 0 0.65rem;
    font-size: 0.9375rem;
    font-weight: 650;
    color: #1e293b;
    letter-spacing: -0.01em;
}

.wb-inspire-region-viewport {
    position: relative;
}

.wb-inspire-region-track {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.wb-inspire-region-track::-webkit-scrollbar {
    display: none;
}

.wb-inspire-nav {
    position: absolute;
    top: 42%;
    z-index: 3;
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    background: #fff;
    color: #334155;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.06);
    cursor: pointer;
    transform: translateY(-50%);
    transition: opacity 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.wb-inspire-region-viewport.is-scrollable .wb-inspire-nav {
    display: inline-flex;
}

.wb-inspire-nav--prev {
    left: 0.1rem;
}

.wb-inspire-nav--next {
    right: 0.1rem;
}

.wb-inspire-nav span {
    display: block;
    font-size: 1.35rem;
    line-height: 1;
    margin-top: -0.1rem;
}

.wb-inspire-nav:hover:not(:disabled) {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
}

.wb-inspire-nav:disabled {
    opacity: 0;
    pointer-events: none;
}

.wb-inspire-region-fade {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3.5rem;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.wb-inspire-region-viewport.is-scrollable .wb-inspire-region-fade {
    opacity: 1;
}

.wb-inspire-region-fade--left {
    left: 0;
    background: linear-gradient(to right, #fff 0%, rgba(255, 255, 255, 0.92) 35%, transparent 100%);
}

.wb-inspire-region-fade--right {
    right: 0;
    background: linear-gradient(to left, #fff 0%, rgba(255, 255, 255, 0.92) 35%, transparent 100%);
}

.wb-inspire-region-viewport.is-at-start .wb-inspire-region-fade--left {
    opacity: 0;
}

.wb-inspire-region-viewport.is-at-end .wb-inspire-region-fade--right {
    opacity: 0;
}

@media (max-width: 820px) {
    .wb-inspire-nav--prev {
        left: 0.05rem;
    }

    .wb-inspire-nav--next {
        right: 0.05rem;
    }

    .wb-inspire-region-fade {
        width: 2.5rem;
    }
}

.wb-inspire-card {
    flex: 0 0 auto;
    width: min(228px, 46vw);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    text-align: left;
    border: 1px solid var(--wb-card-border);
    background: #fff;
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
    box-shadow: var(--wb-card-shadow);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.wb-inspire-placeholder {
    flex: 0 0 auto;
    width: min(200px, 42vw);
    min-height: 168px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    color: #94a3b8;
    scroll-snap-align: start;
}

.wb-inspire-placeholder-text {
    font-size: 0.8125rem;
}

.wb-inspire-card:has(.wb-inspire-start:hover) {
    border-color: #cbd5e1;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08), 0 12px 32px rgba(15, 23, 42, 0.1);
}

.wb-inspire-start {
    width: 100%;
    margin: 0;
    margin-top: auto;
    border: none;
    border-top: 1px solid #f1f5f9;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    font-weight: 600;
    font-size: 0.8125rem;
    padding: 0.7rem 0.75rem;
    border-radius: 0 0 14px 14px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    box-shadow: 0 -1px 0 rgba(15, 23, 42, 0.04);
}

.wb-inspire-start:hover {
    filter: brightness(1.03);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.22);
}

.wb-inspire-start:active {
    transform: translateY(0);
}

.wb-inspire-visual {
    display: block;
    overflow: hidden;
    background: #f8fafc;
    aspect-ratio: 16 / 11;
}

/* 2×3 拼图：每格固定 960:700，外框随内容撑开（避免 1:1 方格裁切） */
.wb-inspire-visual--puzzle {
    aspect-ratio: auto;
    height: auto;
    width: 100%;
    background: #e8edf3;
}

.wb-inspire-puzzle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px;
    width: 100%;
}

.wb-inspire-puzzle-cell {
    aspect-ratio: 960 / 700;
    overflow: hidden;
    background: #f1f5f9;
    line-height: 0;
}

.wb-inspire-visual--puzzle .wb-inspire-puzzle-cell img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    background: #f8fafc;
}

.wb-inspire-visual--cover {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #e8edf3;
}

.wb-inspire-visual--cover > img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.wb-inspire-visual--long {
    aspect-ratio: auto;
    min-height: 420px;
    height: 420px;
    background: #e8edf3;
}

.wb-inspire-visual--long > img {
    width: 100%;
    height: auto;
    max-height: none;
    display: block;
    object-fit: contain;
    object-position: top center;
}

.wb-inspire-card .wb-inspire-visual--long {
    flex: 0 0 420px;
    min-height: 420px;
    height: 420px;
    max-height: 420px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.wb-inspire-card .wb-inspire-visual--long::-webkit-scrollbar {
    display: none;
}

.wb-inspire-visual:not(.wb-inspire-visual--puzzle):not(.wb-inspire-visual--long):not(.wb-inspire-visual--cover) > img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

@media (max-width: 820px) {
    .wb-inspire-regions {
        gap: 1rem;
    }

    .wb-inspire-card,
    .wb-inspire-placeholder {
        width: min(200px, 48vw);
    }
}

/* legacy gallery (unused) */
.wb-gallery-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
    color: #334155;
}

.wb-gallery-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.65rem;
}

@media (max-width: 900px) {
    .wb-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.wb-gallery-item {
    border: none;
    padding: 0;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.07);
    transition: transform 0.15s;
}

.wb-gallery-item:hover {
    transform: translateY(-2px);
}

.wb-gallery-item img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    display: block;
}

.wb-gallery-item .wb-gallery-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    padding: 0.45rem 0.55rem;
}

.wb-gallery-item span {
    display: block;
    font-size: 0.6875rem;
    color: #475569;
    font-weight: 500;
}

.wb-gallery-tag {
    font-size: 0.625rem;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    background: rgba(220, 74, 63, 0.06);
    color: #dc4a3f;
}

/* Modals */
.wb-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.wb-modal[hidden] {
    display: none;
}

.wb-modal-panel {
    background: #fff;
    border-radius: 20px;
    width: min(var(--wb-modal-width), 100%);
    height: min(var(--wb-modal-height), calc(100vh - 2rem));
    max-height: min(var(--wb-modal-height), calc(100vh - 2rem));
    overflow: hidden;
    padding: 1.25rem 1.35rem;
    position: relative;
    box-shadow: 0 25px 60px -12px rgba(15, 23, 42, 0.2), 0 0 0 1px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
}

.wb-modal-panel--wide {
    width: min(var(--wb-modal-width), 100%);
}

.wb-modal-inner {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    margin: 0 -0.25rem;
    padding: 0 0.25rem 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.wb-modal-panel-foot {
    flex-shrink: 0;
    padding-top: 0.85rem;
    margin-top: 0.25rem;
    border-top: 1px solid #f1f5f9;
    background: #fff;
}

.wb-modal-panel-foot .wb-points-est {
    margin-bottom: 0.65rem;
}

.wb-flow-modal .wb-modal-inner,
.wb-clone-inner,
.wb-retouch-inner,
.wb-tplset-inner {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.wb-modal-body--main,
.wb-clone-body,
.wb-retouch-body,
.wb-tplset-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: stretch;
}

.wb-main-media,
.wb-clone-media,
.wb-retouch-media {
    flex-shrink: 0;
    min-height: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.wb-main-settings,
.wb-clone-config,
.wb-retouch-config {
    flex: 1 1 auto;
    min-height: 0;
    overflow: visible;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.wb-modal-body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: stretch;
}

@media (max-width: 768px) {
    .wb-modal-form {
        max-height: none;
    }
}

.wb-modal-form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: min(520px, 62vh);
}

.wb-modal-form-scroll {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.25rem;
    min-height: 0;
}

.wb-modal-form-foot {
    flex-shrink: 0;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    border-top: 1px solid #f1f5f9;
    background: #fff;
}

.wb-points-est {
    margin: 0 0 0.65rem;
    font-size: 0.8125rem;
    color: #64748b;
    text-align: center;
}

.wb-points-est strong {
    color: #dc4a3f;
    font-weight: 700;
}

.wb-drop {
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    padding: 1rem;
    text-align: center;
    min-height: 220px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wb-drop.has-files {
    border-style: solid;
    border-color: rgba(220, 74, 63, 0.25);
    background: rgba(220, 74, 63, 0.03);
    align-items: flex-start;
}

.wb-previews--large img {
    width: 100%;
    max-width: 140px;
    height: auto;
    aspect-ratio: 1;
}

.wb-module-section {
    margin-bottom: 1.25rem;
}

.wb-module-section-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
}

.wb-module-section-title small {
    font-weight: 400;
    color: #94a3b8;
    margin-left: 0.35rem;
}

.wb-modal-body--detail,
.wb-modal-body--stack {
    margin-top: 0.25rem;
}

/* 商品套图弹窗 */
.wb-main-modal {
    padding: 1.25rem 1.35rem;
}

.wb-main-modal-head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding-bottom: 0.85rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #f0f2f5;
}

.wb-main-modal-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: contain;
    background: var(--primary-soft);
    padding: 8px;
    flex-shrink: 0;
}

.wb-main-modal-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.wb-main-modal-sub {
    margin: 0;
    font-size: 0.8125rem;
    color: #94a3b8;
    margin-top: 0.2rem;
}

.wb-modal-body--main {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: stretch;
}

.wb-main-media-label {
    margin: 0 0 0.65rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
}

.wb-main-media-label small {
    font-weight: 400;
    color: #94a3b8;
    margin-left: 0.35rem;
}

.wb-main-upload {
    flex: 1 1 auto;
    min-height: 180px;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
    padding: 0;
    border: 2px dashed #d1d5db;
    border-radius: 16px;
    background: #fafbfd;
    transition: all 0.2s ease;
}

.wb-main-upload:hover {
    border-color: rgba(var(--primary-rgb), 0.35);
    background: rgba(var(--primary-rgb), 0.02);
}

.wb-main-upload-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.wb-main-upload-label strong {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
}

.wb-main-upload-label small {
    font-size: 0.7rem;
    color: #94a3b8;
}

.wb-main-upload-row {
    display: grid;
    grid-template-columns: minmax(132px, 25%) minmax(0, 1fr);
    gap: 0.65rem;
    align-items: stretch;
    min-height: 168px;
}

.wb-main-preview-panel {
    position: relative;
    min-height: 168px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fafbfc;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.wb-main-preview-empty {
    display: none;
    margin: 0;
    height: 100%;
    min-height: 180px;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    color: #94a3b8;
}

.wb-main-preview-panel.is-empty .wb-main-preview-empty {
    display: flex;
}

.wb-main-preview-panel.is-empty .wb-main-preview-strip {
    display: none;
}

.wb-main-upload-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    width: 100%;
    height: 100%;
    min-height: 140px;
    padding: 0.35rem;
    text-align: center;
}

.wb-main-upload-text {
    font-size: 0.75rem;
    line-height: 1.35;
    color: #64748b;
}

.wb-main-upload-plus {
    font-size: 1.75rem;
    line-height: 1;
    color: #94a3b8;
    font-weight: 300;
}

.wb-main-upload.is-full {
    opacity: 0.72;
    cursor: default;
}

.wb-main-preview-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    padding: 0.5rem;
    margin: 0;
}

.wb-main-preview-strip > img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    display: block;
}

.wb-main-preview-item {
    position: relative;
}

.wb-main-preview-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    display: block;
}

.wb-main-preview-remove {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.wb-main-preview-remove:hover {
    background: rgba(15, 23, 42, 0.9);
}

/* Unified in-zone upload (empty trigger + inline previews) */
.wb-upload-zone {
    width: 100%;
    min-height: 140px;
    padding: 1rem;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    background: #fafbfd;
    transition: border-color 0.2s ease, background 0.2s ease;
    cursor: pointer;
}

.wb-upload-zone:hover {
    border-color: rgba(var(--primary-rgb), 0.35);
    background: rgba(var(--primary-rgb), 0.02);
}

.wb-upload-zone.dragover {
    border-color: rgba(var(--primary-rgb), 0.55);
    background: rgba(var(--primary-rgb), 0.04);
}

.wb-upload-zone.has-files {
    border-style: solid;
    border-color: #e2e8f0;
    background: #fff;
    cursor: default;
}

.wb-upload-zone.wb-drop {
    display: block;
    text-align: center;
    min-height: 140px;
    align-items: stretch;
    justify-content: flex-start;
}

.wb-upload-zone.has-files .wb-upload-zone-empty {
    display: none !important;
}

.wb-upload-zone:not(.has-files) .wb-upload-zone-filled {
    display: none !important;
}

.wb-upload-zone-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 108px;
    text-align: center;
}

.wb-upload-zone-filled {
    display: none;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: flex-start;
}

.wb-upload-zone.has-files .wb-upload-zone-filled {
    display: flex;
}

.wb-upload-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.42rem 0.9rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.wb-upload-trigger:hover {
    border-color: rgba(var(--primary-rgb), 0.35);
    background: #fff;
}

.wb-upload-trigger-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='17 8 12 3 7 8'/%3E%3Cline x1='12' y1='3' x2='12' y2='15'/%3E%3C/svg%3E") center / contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='17 8 12 3 7 8'/%3E%3Cline x1='12' y1='3' x2='12' y2='15'/%3E%3C/svg%3E") center / contain no-repeat;
}

.wb-upload-hint {
    margin: 0;
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.4;
}

.wb-upload-preview-item {
    position: relative;
    flex: 0 0 auto;
    width: 88px;
    height: 88px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.wb-upload-preview-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wb-upload-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.wb-upload-preview-remove:hover {
    background: rgba(15, 23, 42, 0.9);
}

.wb-upload-add-tile {
    flex: 0 0 auto;
    width: 88px;
    height: 88px;
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    background: #fafbfd;
    color: #94a3b8;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.wb-upload-add-tile:hover {
    border-color: rgba(var(--primary-rgb), 0.35);
    color: #64748b;
}

.wb-clone-media--side .wb-upload-zone {
    min-height: 120px;
}

.wb-clone-media--side .wb-upload-preview-item,
.wb-clone-media--side .wb-upload-add-tile {
    width: 76px;
    height: 76px;
}

.wb-main-settings-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.wb-main-settings-row--triple {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wb-main-settings-row--quad {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 900px) {
    .wb-main-settings-row--triple,
    .wb-main-settings-row--quad {
        grid-template-columns: 1fr;
    }
}

.wb-main-settings .wb-field > span,
.wb-field-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.wb-main-structure {
    margin-top: 0.15rem;
}

.wb-main-mode-cards {
    display: grid;
    gap: 0.55rem;
    margin-bottom: 0.35rem;
}

.wb-mode-card {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.9rem 1rem;
    border: 1.5px solid #eef2f6;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
}

.wb-mode-card:hover {
    border-color: #dde1e8;
    background: #fafbfd;
}

.wb-mode-card.is-active {
    background: rgba(var(--primary-rgb), 0.04);
    border-color: rgba(var(--primary-rgb), 0.3);
}

.wb-mode-card input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.wb-mode-radio {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    box-sizing: border-box;
}

.wb-mode-card.is-active .wb-mode-radio {
    border-color: var(--primary);
}

.wb-mode-radio::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    border-radius: 50%;
    background: transparent;
}

.wb-mode-card.is-active .wb-mode-radio::after {
    background: var(--primary);
}

.wb-mode-copy {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.wb-mode-copy strong {
    font-size: 0.875rem;
    color: #1e293b;
    font-weight: 600;
}

.wb-mode-copy small {
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.35;
}

.wb-main-custom-panel {
    margin-top: 0.35rem;
    padding: 0.15rem 0.95rem 0.35rem;
    border: 1px solid #eef2f6;
    border-radius: 12px;
    background: #fafbfc;
}

.wb-main-type-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid #eef2f6;
}

.wb-main-type-row:last-child {
    border-bottom: none;
}

.wb-main-type-copy {
    min-width: 0;
}

.wb-main-type-copy strong {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 0.875rem;
    color: #1e293b;
}

.wb-main-type-copy small {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.6875rem;
    color: #94a3b8;
    line-height: 1.35;
}

.wb-main-type-badge {
    font-size: 0.625rem;
    font-weight: 600;
    color: #fff;
    background: #1e293b;
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
}

.wb-stepper {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}

.wb-stepper-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: #eef2f6;
    color: #475569;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.wb-stepper-btn:hover {
    background: #e2e8f0;
}

.wb-stepper-val {
    min-width: 1.25rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
}

.wb-main-generate-wrap {
    position: relative;
    z-index: 2;
    margin: 0;
    padding: 0;
}

.wb-flow-modal-foot {
    flex-shrink: 0;
    margin-top: 0;
    padding-top: 0.85rem;
    border-top: 1px solid #eef2f7;
    background: #fff;
}

.wb-flow-modal-foot .wb-points-est {
    margin: 0 0 0.65rem;
}

.wb-flow-modal-foot .wb-long-skip-link {
    display: block;
    margin-top: 0.65rem;
}

.wb-flow-modal-foot .wb-clone-points,
.wb-flow-modal-foot .wb-retouch-points {
    margin: 0 0 0.65rem;
    font-size: 0.8125rem;
    color: #64748b;
}

.wb-flow-modal .wb-modal-inner,
.wb-clone-modal.wb-flow-modal .wb-clone-inner,
.wb-retouch-modal.wb-flow-modal .wb-retouch-inner,
.wb-tplset-modal.wb-flow-modal .wb-tplset-inner {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.wb-clone-media .wb-main-upload-row + .wb-clone-custom-label,
.wb-clone-media .wb-main-upload-row {
    margin-bottom: 0;
}

.wb-clone-custom-label {
    margin-top: 1rem;
}

.wb-clone-config {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

/* 产品替换 / 爆款复刻 — 按内容缩窄缩短，勿固定高大卡片 */
.wb-clone-modal.wb-flow-modal.wb-modal-panel {
    --wb-modal-width: 720px;
    width: min(var(--wb-modal-width), 100%);
    height: auto;
    max-height: min(88vh, calc(100vh - 2rem));
}

.wb-clone-modal.wb-flow-modal .wb-main-modal-head {
    flex-shrink: 0;
}

.wb-clone-modal.wb-flow-modal .wb-clone-inner {
    flex: 0 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.wb-clone-modal.wb-flow-modal .wb-clone-body {
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
}

.wb-clone-modal .wb-clone-config {
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
}

.wb-clone-modal .wb-main-settings--tool {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 0;
}

.wb-clone-modal .wb-main-settings--tool .wb-field {
    margin-bottom: 0;
}

.wb-clone-modal .wb-clone-config > .wb-field {
    margin-bottom: 0;
}

.wb-clone-media--side {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.wb-clone-upload-slot {
    min-width: 0;
}

.wb-clone-media--side .wb-main-media-label {
    margin-bottom: 0.5rem;
}

.wb-clone-media--side .wb-main-upload-row {
    min-height: 140px;
}

@media (max-width: 720px) {
    .wb-clone-media--side {
        grid-template-columns: 1fr;
    }
}

.wb-retouch-upload {
    min-height: 0;
}

.wb-main-settings {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: visible;
}

.wb-main-credit {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 0.75rem;
}

.wb-main-generate-btn {
    width: 100%;
    border: none;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.25), 0 1px 3px rgba(var(--primary-rgb), 0.1);
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

.wb-main-generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.3), 0 2px 6px rgba(var(--primary-rgb), 0.15);
}

.wb-main-generate-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

.wb-main-generate-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    background: url("/static/images/home-design/sparkles.svg") center / contain no-repeat;
    filter: brightness(0) invert(1);
}

.wb-main-generate-spinner {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wb-spin 0.7s linear infinite;
}

/* 商品套图 / A+ 详情 — 左右分栏 + 右侧示例区 */
.wb-mainset-modal.wb-flow-modal.wb-modal-panel,
.wb-detail-modal.wb-flow-modal.wb-modal-panel {
    --wb-modal-width: var(--wb-modal-width-split);
    --wb-modal-height: min(88vh, 780px);
    height: min(88vh, 780px);
    max-height: min(88vh, 780px);
}

.wb-modal-inner--split {
    display: grid;
    grid-template-columns: minmax(280px, 36%) minmax(0, 64%);
    gap: 1.25rem;
    align-items: stretch;
    overflow: hidden;
    min-height: 0;
    flex: 1 1 auto;
}

.wb-mainset-modal.wb-flow-modal .wb-modal-inner.wb-modal-inner--split,
.wb-detail-modal.wb-flow-modal .wb-modal-inner.wb-modal-inner--split {
    flex: 1 1 0%;
    min-height: 0;
    overflow: hidden;
    overflow-y: hidden;
    display: grid;
    margin: 0;
    padding: 0 0.15rem;
}

.wb-flow-form {
    min-width: 0;
    min-height: 0;
    max-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 0.45rem;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.wb-mainset-modal .wb-flow-form,
.wb-detail-modal .wb-flow-form {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
    padding-right: 0;
}

.wb-mainset-modal .wb-flow-form > .wb-modal-body,
.wb-detail-modal .wb-flow-form > .wb-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 0.45rem;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.wb-flow-form-foot {
    flex: 0 0 auto;
    z-index: 2;
    padding: 0.75rem 0.45rem 0.1rem 0;
    margin-top: 0;
    border-top: 1px solid #e8edf3;
    background: #fff;
    box-shadow: 0 -8px 16px -12px rgba(15, 23, 42, 0.18);
}

.wb-flow-form-foot .wb-main-generate-wrap {
    width: 100%;
}

.wb-flow-form-foot .wb-main-generate-btn {
    width: 100%;
}

.wb-opt-switch {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    margin-top: 0.85rem;
    margin-bottom: 20px;
    padding: 0.8rem 0.95rem;
    border: 1px solid #e8edf3;
    border-radius: 12px;
    background: #f8fafc;
    cursor: pointer;
    user-select: none;
    overflow: clip;
}

.wb-opt-switch-copy {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    pointer-events: none;
}

.wb-opt-switch-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: #0f172a;
}

.wb-opt-switch-hint {
    font-size: 0.78rem;
    line-height: 1.4;
    color: #64748b;
}

/* Cover the whole row so focus/scrollIntoView stays inside the switch — never jumps the modal. */
.wb-opt-switch-input {
    position: absolute;
    inset: 0;
    z-index: 2;
    margin: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.wb-opt-switch-track {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: #94a3b8;
    transition: background 0.18s ease;
    pointer-events: none;
}

.wb-opt-switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
    transition: transform 0.18s ease;
}

.wb-opt-switch-input:checked + .wb-opt-switch-track {
    background: #ef6b5a;
}

.wb-opt-switch-input:checked + .wb-opt-switch-track::after {
    transform: translateX(18px);
}

.wb-opt-switch-input:focus-visible + .wb-opt-switch-track {
    outline: 2px solid rgba(239, 107, 90, 0.45);
    outline-offset: 2px;
}

.wb-studio-refs-titles-row {
    display: flex;
    align-items: stretch;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.wb-studio-refs-titles-row:not(:has(.wb-studio-refs-wrap:not([hidden]), .wb-studio-titles-panel:not([hidden]))) {
    display: none;
}

.wb-studio-refs-titles-row .wb-studio-refs-wrap {
    flex: 0 0 auto;
    margin-bottom: 0;
    max-width: 220px;
}

.wb-studio-refs-titles-row .wb-studio-titles-panel {
    flex: 1 1 auto;
    min-width: 0;
    margin-bottom: 0;
}

.wb-studio-titles-panel {
    margin: 0 0 1rem;
    padding: 0.75rem 0.95rem;
    border: 1px solid #e8edf3;
    border-radius: 14px;
    background: #f8fafc;
}

.wb-studio-titles-panel[hidden] {
    display: none !important;
}

.wb-studio-titles-panel-head {
    margin-bottom: 0.45rem;
}

.wb-studio-titles-panel-head .wb-studio-section-title {
    margin: 0;
    font-size: 0.8125rem;
}

@media (max-width: 720px) {
    .wb-studio-refs-titles-row {
        flex-direction: column;
    }

    .wb-studio-refs-titles-row .wb-studio-refs-wrap {
        max-width: none;
    }
}

.wb-studio-titles {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.wb-studio-title-card {
    padding: 0.75rem 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
}

.wb-studio-title-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.wb-studio-title-platform {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
}

.wb-studio-title-text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #0f172a;
    word-break: break-word;
}

.wb-studio-title-copy {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: #ef6b5a;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.wb-flow-example {
    position: static;
    min-width: 0;
    min-height: 0;
    height: 100%;
    padding: 0.5rem 0.35rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 0.85rem;
    overflow: hidden;
}

.wb-flow-example-lead {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #64748b;
}

.wb-flow-example-lead strong {
    color: #0f172a;
    font-weight: 700;
}

.wb-flow-example-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0;
    padding: 1.1rem 1rem;
    border-radius: 18px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e8edf3;
}

.wb-flow-example-flow {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    max-width: 100%;
}

.wb-flow-example-input,
.wb-flow-example-output {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    flex: 0 0 auto;
}

.wb-flow-example-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.wb-flow-example-thumb--product {
    width: 112px;
    height: 112px;
    padding: 0.5rem;
}

.wb-flow-example-thumb--product img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wb-flow-example-grid {
    display: grid;
    gap: 6px;
    padding: 6px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
}

.wb-flow-example-grid--4 {
    grid-template-columns: repeat(2, 1fr);
    width: 300px;
}

.wb-flow-example-grid--6 {
    grid-template-columns: repeat(3, 1fr);
    width: 360px;
}

.wb-flow-example-grid img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 4px;
}

/* 商品套图 / A+ 详情示例 — 统一标题区（靠上，灰底撑满剩余高度） */
.wb-flow-example--mainset,
.wb-flow-example--aplus {
    text-align: center;
    justify-content: flex-start;
    padding-top: 0.85rem;
    gap: 0.75rem;
}

.wb-flow-example--mainset .wb-flow-example-title,
.wb-flow-example--aplus .wb-flow-example-title {
    margin: 0;
    flex-shrink: 0;
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
    line-height: 1.2;
}

.wb-flow-example--mainset .wb-flow-example-lead,
.wb-flow-example--aplus .wb-flow-example-lead {
    flex-shrink: 0;
    font-size: 0.82rem;
    color: #64748b;
}

.wb-flow-example--mainset .wb-flow-example-lead strong,
.wb-flow-example--aplus .wb-flow-example-lead strong {
    color: #0f172a;
    font-weight: 700;
}

.wb-flow-example-flow--aplus .wb-flow-example-grid img {
    aspect-ratio: 970 / 600;
}

/* 商品套图 / A+ — 灰底撑满 + 白卡片内嵌（示例图不换） */
.wb-flow-example-stage--mainset,
.wb-flow-example-stage--aplus {
    background: #f3f5f8;
    border-color: #e8edf3;
    padding: 0.55rem;
    flex: 1 1 auto;
    min-height: 300px;
    align-items: stretch;
    justify-content: stretch;
}

.wb-flow-example-flow--mainset,
.wb-flow-example-flow--aplus {
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    width: 100%;
    max-width: none;
    min-height: 100%;
    flex: 1 1 auto;
    align-self: stretch;
    margin: 0;
    padding: 0.9rem 0.75rem;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #eef2f6;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.wb-flow-example-aplus-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex: 0 0 auto;
}

.wb-flow-example-aplus-col--upload {
    width: 84px;
}

.wb-flow-example-thumb--aplus {
    width: 72px;
    height: 72px;
    padding: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wb-flow-example-thumb--aplus img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

.wb-flow-example-aplus-col--long {
    width: 100px;
}

.wb-flow-example-aplus-col--mosaic {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
}

.wb-flow-example-long-strip {
    width: 100%;
    height: 260px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.wb-flow-example-long-strip img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.wb-flow-example-mosaic--6 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, auto);
    gap: 5px;
    width: 100%;
    padding: 5px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.wb-flow-example-mosaic--6 img {
    display: block;
    width: 100%;
    aspect-ratio: 970 / 600;
    object-fit: cover;
    border-radius: 3px;
}

.wb-flow-example-caption--pill {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    font-size: 0.62rem;
    color: #64748b;
    white-space: nowrap;
}

.wb-flow-example-flow--aplus .wb-flow-example-arrow {
    align-self: center;
    margin-bottom: 0;
}

.wb-flow-example-flow--aplus .wb-flow-example-badge {
    font-size: 0.62rem;
    max-width: 11em;
}

@media (max-width: 720px) {
    .wb-flow-example-flow--aplus {
        flex-wrap: wrap;
        max-width: 100%;
    }

    .wb-flow-example-aplus-col--mosaic {
        max-width: 100%;
        flex-basis: 100%;
    }

    .wb-flow-example-flow--aplus .wb-flow-example-arrow {
        transform: rotate(90deg);
        margin-bottom: 0;
    }
}

.wb-flow-example-caption {
    font-size: 0.72rem;
    color: #94a3b8;
    text-align: center;
    white-space: nowrap;
}

.wb-flow-example-badge {
    font-size: 0.68rem;
    color: #64748b;
    text-align: center;
    line-height: 1.4;
}

.wb-flow-example-arrow {
    flex: 0 0 auto;
    width: 28px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='16' viewBox='0 0 28 16' fill='none'%3E%3Cpath d='M1 8h22M19 2l6 6-6 6' stroke='%23cbd5e1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (max-width: 960px) {
    .wb-modal-inner--split {
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .wb-mainset-modal.wb-flow-modal .wb-modal-inner.wb-modal-inner--split,
    .wb-detail-modal.wb-flow-modal .wb-modal-inner.wb-modal-inner--split {
        overflow-y: auto;
    }

    .wb-flow-example {
        height: auto;
        justify-content: flex-start;
        order: 2;
    }

    .wb-mainset-modal .wb-flow-form,
    .wb-detail-modal .wb-flow-form {
        order: 1;
        height: auto;
        max-height: min(62vh, 520px);
        overflow: hidden;
    }
}

@media (max-width: 720px) {
    .wb-flow-example-flow {
        flex-direction: column;
        gap: 0.75rem;
    }

    .wb-flow-example-arrow {
        transform: rotate(90deg);
    }

    .wb-flow-example-grid--4 {
        width: min(300px, 100%);
    }

    .wb-flow-example-grid--6 {
        width: min(360px, 100%);
    }
}

/* A+ 详情页弹窗 — 固定三段布局，切换生成方式时勿整体上移 */
.wb-detail-modal.wb-flow-modal.wb-modal-panel {
    justify-content: flex-start;
    overflow: hidden;
    overscroll-behavior: none;
}

/* 商品套图弹窗 — 同 A+ 详情页，切换套图结构时勿整体上移 */
.wb-mainset-modal.wb-flow-modal.wb-modal-panel {
    justify-content: flex-start;
    overflow: hidden;
    overscroll-behavior: none;
}

.wb-mainset-modal.wb-flow-modal .wb-main-modal-head {
    flex-shrink: 0;
    position: relative;
    z-index: 3;
    background: #fff;
}

.wb-mainset-modal.wb-flow-modal .wb-modal-inner.wb-modal-inner--split,
.wb-detail-modal.wb-flow-modal .wb-modal-inner.wb-modal-inner--split {
    overflow-anchor: none;
}

.wb-mainset-modal.wb-flow-modal .wb-flow-form > .wb-modal-body--main {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.wb-mainset-modal .wb-main-media {
    flex-shrink: 0;
}

.wb-mainset-modal .wb-main-settings {
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
}

.wb-detail-modal.wb-flow-modal .wb-main-modal-head {
    flex-shrink: 0;
}

.wb-detail-modal.wb-flow-modal .wb-flow-form > .wb-modal-body--main {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.wb-detail-modal .wb-main-media {
    flex-shrink: 0;
}

.wb-main-settings--detail {
    display: flex;
    flex-direction: column;
    min-height: auto;
    flex: 0 0 auto;
    overflow: visible;
}

.wb-detail-custom-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    gap: 0.35rem;
}

.wb-detail-custom-panel[hidden],
.wb-detail-smart-panel[hidden] {
    display: none !important;
}

.wb-main-custom-panel[hidden] {
    display: none !important;
}

.wb-detail-modules {
    flex: 0 0 auto;
    min-height: auto;
    display: flex;
    flex-direction: column;
    margin-top: 0.25rem;
}

.wb-detail-modules .wb-module-head {
    flex-shrink: 0;
    margin-bottom: 0.45rem;
}

.wb-detail-modules-hint {
    font-weight: 400;
    color: #94a3b8;
    margin-left: 0.25rem;
}

.wb-detail-modal .wb-detail-modules-scroll {
    overflow: visible;
}

.wb-detail-modules-scroll {
    flex: 0 0 auto;
    overflow: visible;
}

.wb-detail-modal .wb-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    align-items: start;
}

/* v3 tier group label */
.wb-module-tier-label {
    grid-column: 1 / -1;
    font-size: 0.72rem;
    font-weight: 600;
    color: #8b8fa3;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.6rem 0 0.15rem 0.1rem;
    border-bottom: 1px solid #e8eaf0;
    margin-bottom: 0.15rem;
}
.wb-module-tier-label:first-child {
    padding-top: 0;
}

.wb-detail-modal .wb-module-card {
    padding: 0.55rem 0.65rem;
    gap: 0.5rem;
    align-items: start;
    min-height: 4.25rem;
}

.wb-detail-modal .wb-module-card-copy {
    min-height: 2.75rem;
}

.wb-detail-modal .wb-module-card-title-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-bottom: 0.15rem;
}

.wb-detail-modal .wb-module-card-title-row strong {
    margin-bottom: 0;
    line-height: 1.25;
}

.wb-detail-modal .wb-module-card-copy small {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.2em;
}

.wb-detail-generate-wrap {
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    border-top: none;
}

.wb-detail-points-est {
    margin: 0 0 0.55rem;
    font-size: 0.75rem;
    color: #64748b;
    text-align: center;
}

.wb-detail-points-est strong {
    color: #1e293b;
    font-weight: 600;
}

.wb-detail-analyze-status {
    margin: 0.75rem 0 0;
    padding: 0.75rem 1rem;
    background: rgba(220, 74, 63, 0.06);
    color: var(--primary-dark);
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    text-align: center;
}

.wb-detail-plan-notes {
    margin: 0.5rem 0 0;
    padding: 0.65rem 0.85rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    color: #475569;
    font-size: 0.75rem;
    line-height: 1.45;
}

.wb-detail-plan-notes strong {
    color: #334155;
    font-weight: 600;
}

.wb-detail-structure {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wb-detail-plan-preview-hint {
    margin: 0;
    color: #64748b;
    font-size: 0.75rem;
}

.wb-detail-plan-preview {
    margin: 0;
    padding: 0.65rem 0.85rem 0.65rem 1.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    color: #334155;
    font-size: 0.8125rem;
    line-height: 1.5;
    max-height: 10rem;
    overflow-y: auto;
}

.wb-detail-plan-preview li {
    margin: 0.15rem 0;
}

.wb-detail-plan-preview li strong {
    font-weight: 600;
}

@media (max-width: 768px) {
    .wb-main-settings--detail {
        max-height: none;
    }
}

.wb-settings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.wb-modal-settings .wb-field:last-child {
    margin-bottom: 0;
}

.wb-drop--compact {
    min-height: 160px;
}

.wb-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 20; /* 叠在标题栏 / 示例区之上，避免被挡住 */
    border: none;
    background: #f1f5f9;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.wb-modal-close:hover {
    background: #e2e8f0;
    color: #334155;
}

.wb-modal-title {
    margin: 0 0 0.35rem;
    font-size: 1.25rem;
}

.wb-modal-lead {
    margin: 0 0 1.25rem;
    font-size: 0.8125rem;
    color: #64748b;
}

.wb-drop.dragover {
    border-color: #dc4a3f;
    background: rgba(220, 74, 63, 0.03);
}

.wb-drop-label {
    font-weight: 600;
    margin: 0 0 0.25rem;
}

.wb-drop-hint {
    font-size: 0.75rem;
    color: #94a3b8;
    margin: 0 0 0.75rem;
}

.wb-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.wb-previews img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.wb-field {
    display: block;
    margin-bottom: 0.75rem;
}

.wb-field > span {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.wb-field > span small,
.wb-field > span .wb-optional-hint {
    font-weight: 400;
    font-size: 0.6875rem;
    color: #a0aec0;
    margin-left: 0.2rem;
}

.wb-field input,
.wb-field select,
.wb-field textarea,
.wb-field .ui-select-trigger {
    width: 100%;
    font: inherit;
    font-size: 0.875rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.55rem 0.75rem;
    background: #fff;
    color: #0f172a;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.wb-field .ui-select-trigger {
    padding-right: 2rem;
    min-height: auto;
}

.wb-field input:focus,
.wb-field select:focus,
.wb-field textarea:focus,
.wb-field .ui-select-trigger[aria-expanded="true"],
.wb-field .ui-select-trigger:focus-visible {
    outline: none;
    border-color: rgba(var(--primary-rgb), 0.4);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.08);
}

.wb-field select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    padding-right: 2rem;
}

.wb-field input::placeholder {
    color: #a0aec0;
}

.wb-field textarea::placeholder {
    color: #a0aec0;
}

#wbMainExtra,
#wbDetailExtra {
    font-size: 0.75rem; /* 相对默认 0.875rem 再减 2px，便于阅读分析结果 */
}

#wbMainExtra::placeholder,
#wbDetailExtra::placeholder {
    font-size: 0.8125rem;
}

.wb-mode-field {
    border: none;
    margin: 0 0 0.75rem;
    padding: 0;
}

.wb-radio {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    font-size: 0.8125rem;
    color: #475569;
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.wb-type-grid {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.wb-type-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.65rem;
    background: #f8fafc;
    border-radius: 10px;
    font-size: 0.8125rem;
}

.wb-type-row label {
    flex: 1;
}

.wb-type-row small {
    display: block;
    color: #94a3b8;
    font-size: 0.6875rem;
}

.wb-type-row input[type="checkbox"] {
    margin-right: 0.35rem;
}

.wb-module-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.wb-link-btn {
    border: none;
    background: none;
    color: #dc4a3f;
    font-size: 0.75rem;
    cursor: pointer;
}

.wb-module-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

@media (min-width: 900px) {
    .wb-module-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.wb-module-grid--main {
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
    .wb-module-grid--main {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .wb-settings-grid {
        grid-template-columns: 1fr;
    }
}

.wb-module-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.65rem;
    align-items: center;
    padding: 0.55rem 0.65rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    background: #fff;
    text-align: left;
    transition: border-color 0.15s, background 0.15s;
}

.wb-module-card:hover {
    border-color: rgba(220, 74, 63, 0.25);
}

.wb-module-card.is-checked {
    border-color: #dc4a3f;
    background: rgba(220, 74, 63, 0.03);
}

.wb-module-card.is-recommended:not(.is-checked) {
    border-color: #e8c4c2;
}

.wb-module-card-copy strong {
    display: block;
    font-size: 0.8125rem;
    color: #1e293b;
    margin-bottom: 0.15rem;
}

.wb-module-card-copy small {
    display: block;
    font-size: 0.6875rem;
    color: #94a3b8;
    line-height: 1.35;
}

.wb-module-card input {
    width: 16px;
    height: 16px;
    accent-color: #dc4a3f;
}

.wb-module-badge {
    font-size: 0.625rem;
    color: #b83328;
    background: rgba(220, 74, 63, 0.08);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    width: fit-content;
    flex-shrink: 0;
}

.wb-module-card.is-checked .wb-module-badge {
    display: none;
}

.wb-module-count {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0 0 0.75rem;
}

.wb-primary-btn {
    width: 100%;
    border: none;
    background: linear-gradient(135deg, #dc4a3f, #b83328);
    color: #fff;
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    cursor: pointer;
}

.wb-primary-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.wb-primary-btn--link {
    display: block;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}

.wb-launcher-grid {
    display: grid;
    gap: 0.65rem;
}

.wb-launcher-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.wb-launcher-item:hover {
    border-color: rgba(220, 74, 63, 0.25);
    box-shadow: 0 4px 16px rgba(220, 74, 63, 0.08);
}

.wb-launcher-item-copy strong {
    display: block;
    font-size: 0.9375rem;
    color: #1e293b;
    margin-bottom: 0.2rem;
}

.wb-launcher-item-copy small {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
}

.wb-launcher-item-badge,
.wb-launcher-badge {
    flex-shrink: 0;
    font-size: 0.625rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-weight: 600;
}

.wb-launcher-card {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.wb-launcher-visual {
    width: 120px;
    flex-shrink: 0;
    border-radius: 12px;
}

.wb-launcher-copy strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.35rem;
    color: #1e293b;
}

.wb-launcher-copy p {
    margin: 0 0 0.5rem;
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.45;
}

/* Unified tool-modal shell */
.wb-tool-modal-head {
    flex-shrink: 0;
    margin-bottom: 0.85rem;
}

.wb-tool-modal-head .wb-modal-title {
    margin-bottom: 0.25rem;
}

.wb-tool-modal-head .wb-modal-lead {
    margin-bottom: 0;
}

.wb-tool-modal-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    gap: 0.75rem;
    overflow-y: auto;
}

.wb-tool-modal-foot {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wb-tool-modal {
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1.35rem;
}

.wb-tool-modal .wb-modal-inner {
    margin: 0;
    padding: 0;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.wb-tool-modal.is-region-tool .wb-tool-modal-head {
    margin-bottom: 0.35rem;
}

.wb-tool-modal.is-region-tool .wb-modal-lead {
    display: none;
}

.wb-tool-composer {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wb-tool-composer-bar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wb-tool-composer-send-icon {
    display: none;
}

.wb-tool-modal:not(.is-region-tool) .wb-tool-composer-send .wb-tool-composer-send-label {
    display: inline;
}

.wb-tool-modal.is-region-tool .wb-tool-modal-foot {
    display: block;
    flex: 0 0 auto;
    flex-shrink: 0;
    padding-top: 0.45rem;
    margin-top: 0;
    border-top: none;
}

.wb-tool-modal.is-region-tool .wb-tool-composer {
    border: 1px solid #e5e5ea;
    border-radius: 22px;
    padding: 0.7rem 0.95rem 0.55rem;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.wb-tool-modal.is-region-tool .wb-tool-modal-prompt {
    margin: 0;
}

.wb-tool-modal.is-region-tool .wb-tool-modal-prompt > span {
    display: none;
}

.wb-tool-modal.is-region-tool .wb-tool-modal-prompt textarea,
.wb-tool-modal.is-region-tool .wb-tool-modal-prompt textarea:focus {
    width: 100%;
    min-height: 64px;
    max-height: 93px;
    height: 64px;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    resize: none;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #1c1c1e;
    overflow-y: auto;
}

.wb-tool-modal.is-region-tool .wb-tool-composer-bar {
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.15rem;
}

.wb-tool-modal.is-region-tool .wb-tool-composer-points {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0;
    font-size: 0.9375rem;
    color: #3a3a3c;
}

.wb-tool-modal.is-region-tool .wb-tool-composer-points::before {
    content: "";
    width: 18px;
    height: 18px;
    background: url("/static/images/home-design/sparkles.svg") center / contain no-repeat;
    flex-shrink: 0;
}

.wb-tool-modal.is-region-tool .wb-tool-points-num {
    font-weight: 600;
}

.wb-tool-modal.is-region-tool .wb-tool-composer-send-label {
    display: none;
}

.wb-tool-modal.is-region-tool .wb-tool-composer-send-icon {
    display: block;
}

.wb-tool-modal.is-region-tool #wbToolSubmit {
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 0;
    border-radius: 14px;
    background: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.25);
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.wb-tool-modal.is-region-tool #wbToolSubmit:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.3);
}

.wb-tool-modal.is-region-tool #wbToolSubmit.is-busy {
    opacity: 0.55;
}

.wb-tool-modal.is-region-tool .wb-tool-modal-body {
    flex: 1;
    min-height: 0;
    gap: 0.65rem;
}

.wb-tool-modal.is-region-tool #wbToolRegionPanel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: minmax(0, 1fr);
    gap: 0.65rem 0.75rem;
    flex: 1;
    min-height: 0;
    align-items: stretch;
}

.wb-tool-modal.is-region-tool .wb-region-workspace {
    grid-column: 1;
    grid-row: 1;
    flex: none;
    min-width: 0;
    min-height: 0;
    align-self: stretch;
}

.wb-tool-modal.is-region-tool .wb-region-workspace.has-image .wb-re-stage {
    min-height: 100%;
    height: 100%;
    padding: 0;
}

.wb-tool-modal.is-region-tool #wbReToolbar.wb-re-toolbar {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 7.75rem;
    max-width: 7.75rem;
    max-height: 100%;
    margin: 0;
    padding: 0.7rem 0.55rem;
    border-radius: 18px;
    gap: 0.45rem;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 6;
}

.wb-tool-modal.is-region-tool #wbReToolbar .wb-re-tool {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.wb-tool-modal.is-region-tool #wbReToolbar .wb-re-brush-size {
    width: 100%;
    margin: 0;
    padding: 0.35rem 0.15rem;
    border-left: none;
    border-right: none;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.wb-tool-modal.is-region-tool #wbReToolbar .wb-re-zoom {
    flex-direction: column;
    width: 100%;
    gap: 0.3rem;
    align-items: center;
    border-left: none;
    padding: 0.35rem 0 0;
    margin: 0;
    border-top: 1px solid #e2e8f0;
}

.wb-tool-modal.is-region-tool #wbReToolbar .wb-re-zoom .wb-re-tool {
    width: 100%;
}

.wb-tool-modal.is-region-tool #wbReToolbar .wb-re-history {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    padding: 0.35rem 0 0;
    margin: 0;
    border-left: none;
    border-top: 1px solid #e2e8f0;
}

.wb-tool-modal.is-canvas-util #wbToolParams,
.wb-tool-modal.is-canvas-util #wbToolResult {
    display: none;
}

.wb-tool-modal.is-canvas-util .wb-modal-lead,
.wb-tool-modal.is-canvas-util .wb-tool-modal-foot {
    display: none;
}

.wb-tool-modal.is-canvas-util .wb-tool-modal-head {
    margin-bottom: 0.35rem;
}

.wb-tool-modal.is-canvas-util .wb-tool-modal-body {
    flex: 1;
    min-height: 0;
    gap: 0;
}

.wb-tool-modal.is-canvas-util #wbToolStandardPanel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 280px;
    align-items: center;
}

.wb-tool-modal.is-canvas-util .wb-util-workspace {
    flex: 1;
    min-height: 280px;
}

.wb-util-workspace {
    position: relative;
    width: 100%;
    min-height: 280px;
    border-radius: 18px;
    background: #f7f7f8;
    overflow: hidden;
}

.wb-util-workspace.has-image .wb-drop-empty {
    display: none !important;
}

.wb-util-workspace.has-image .wb-drop {
    display: none !important;
}

.wb-util-workspace:not(.has-image) .wb-util-stage {
    display: none !important;
}

.wb-cutout-viewport {
    flex: 1;
    width: 100%;
    min-height: 240px;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 1rem;
    box-sizing: border-box;
    display: flex;
    align-items: safe center;
    justify-content: safe center;
    background: #f7f7f8;
    border-radius: 18px;
}

.wb-cutout-viewport .wb-util-stack {
    margin: 0;
    flex-shrink: 0;
}

.wb-util-stack {
    position: relative;
    display: inline-block;
    line-height: 0;
}

.wb-util-stack .wb-util-image {
    display: block;
    max-width: none;
    height: auto;
}

.wb-cutout-mask {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: crosshair;
    touch-action: none;
    pointer-events: none;
}

.wb-tool-modal.is-cutout-manual .wb-cutout-mask {
    pointer-events: auto;
}

.wb-cutout-toolbar.wb-re-toolbar {
    flex-wrap: wrap;
    max-width: calc(100% - 1.5rem);
}

.wb-cutout-mode {
    display: inline-flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.wb-cutout-manual-tools {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.wb-cutout-manual-tools[hidden] {
    display: none !important;
}

.wb-crop-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
    border-radius: inherit;
}

.wb-crop-box {
    position: absolute;
    box-sizing: border-box;
    border: 2px solid #fff;
    box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.45);
    cursor: move;
    pointer-events: auto;
    touch-action: none;
}

.wb-crop-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.35);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.2);
    pointer-events: auto;
}

.wb-crop-handle[data-wb-crop-handle="nw"] { left: -6px; top: -6px; cursor: nwse-resize; }
.wb-crop-handle[data-wb-crop-handle="ne"] { right: -6px; top: -6px; cursor: nesw-resize; }
.wb-crop-handle[data-wb-crop-handle="sw"] { left: -6px; bottom: -6px; cursor: nesw-resize; }
.wb-crop-handle[data-wb-crop-handle="se"] { right: -6px; bottom: -6px; cursor: nwse-resize; }

.wb-crop-toolbar.wb-re-toolbar {
    flex-wrap: wrap;
    max-width: calc(100% - 1.5rem);
    gap: 0.45rem;
    margin: 0.75rem auto 0.35rem;
    z-index: 6;
}

.wb-crop-ratio-wrap,
.wb-crop-smart-size {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0;
}

.wb-crop-smart-size[hidden] {
    display: none !important;
}

.wb-crop-dim {
    width: 4.25rem;
    border: none;
    background: transparent;
    font: inherit;
    font-size: 0.875rem;
    padding: 0.2rem 0.35rem;
    text-align: center;
}

.wb-crop-dim-x {
    color: #94a3b8;
    font-size: 0.85rem;
}

/* 裁切：左侧画布 + 右侧竖向工具栏，底部仅保留发送条 */
.wb-tool-modal.is-canvas-util.is-crop-active #wbToolStandardPanel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 0.65rem 0.75rem;
    flex: 1;
    min-height: 0;
    align-items: stretch;
}

.wb-tool-modal.is-canvas-util.is-crop-active .wb-util-workspace {
    grid-column: 1;
    grid-row: 1;
    flex: none;
    min-width: 0;
    min-height: 0;
    align-self: stretch;
}

.wb-tool-modal.is-canvas-util.is-crop-active .wb-util-workspace.has-image .wb-util-stage {
    display: flex !important;
    min-height: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    border-radius: 0;
    background: transparent;
}

.wb-tool-modal.is-canvas-util.is-crop-active .wb-cutout-viewport {
    flex: 1;
    min-height: 240px;
    max-height: none;
    border-radius: 0;
    overflow: auto;
}

.wb-tool-modal.is-canvas-util.is-crop-active .wb-util-stack {
    max-width: 100%;
    max-height: 100%;
}

.wb-tool-modal.is-canvas-util.is-crop-active .wb-util-image {
    max-width: none;
    max-height: none;
}

.wb-tool-modal.is-canvas-util.is-crop-active .wb-crop-toolbar.wb-re-toolbar {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 7.75rem;
    max-width: 7.75rem;
    max-height: 100%;
    margin: 0;
    padding: 0.7rem 0.55rem;
    border-radius: 18px;
    gap: 0.55rem;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 6;
}

.wb-tool-modal.is-canvas-util.is-crop-active .wb-crop-toolbar .wb-cutout-mode {
    flex-direction: column;
    width: 100%;
    gap: 0.35rem;
}

.wb-tool-modal.is-canvas-util.is-crop-active .wb-crop-toolbar .wb-cutout-mode .wb-re-tool {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.wb-tool-modal.is-canvas-util.is-crop-active .wb-crop-ratio-wrap {
    width: 100%;
    justify-content: center;
    padding: 0.15rem 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: none;
}

.wb-tool-modal.is-canvas-util.is-crop-active.is-crop-smart .wb-crop-ratio-wrap {
    border-bottom: 1px solid #e2e8f0;
}

.wb-tool-modal.is-canvas-util.is-crop-active .wb-crop-ratio-wrap .wb-util-size-select {
    width: 100%;
    text-align: center;
}

.wb-tool-modal.is-canvas-util.is-crop-active .wb-crop-smart-size {
    flex-direction: column;
    width: 100%;
    gap: 0.2rem;
}

.wb-tool-modal.is-canvas-util.is-crop-active .wb-crop-dim {
    width: 100%;
    box-sizing: border-box;
}

.wb-tool-modal.is-canvas-util.is-crop-active .wb-crop-toolbar .wb-re-zoom {
    flex-direction: column;
    width: 100%;
    gap: 0.3rem;
    align-items: center;
    border-left: none;
    padding: 0.35rem 0 0;
    margin: 0;
    border-top: 1px solid #e2e8f0;
}

.wb-tool-modal.is-canvas-util.is-crop-active .wb-crop-toolbar .wb-re-zoom .wb-re-tool {
    width: 100%;
    justify-content: center;
}

.wb-tool-modal.is-canvas-util.is-crop-active .wb-util-floatbar {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0 auto;
    justify-self: center;
}

.wb-crop-toolbar[hidden],
.wb-crop-overlay[hidden] {
    display: none !important;
}

.wb-util-stage {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 280px;
    width: 100%;
    padding: 1.5rem;
    box-sizing: border-box;
}

.wb-tool-clear-image {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 5;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.wb-tool-clear-image:hover {
    background: rgba(15, 23, 42, 0.9);
}

/* 去背景：左侧画布 + 右侧竖向工具栏 */
.wb-tool-modal.is-canvas-util.is-cutout-active #wbToolStandardPanel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 0.65rem 0.75rem;
    flex: 1;
    min-height: 0;
    align-items: stretch;
}

.wb-tool-modal.is-canvas-util.is-cutout-active .wb-util-workspace {
    grid-column: 1;
    grid-row: 1;
    flex: none;
    min-width: 0;
    min-height: 0;
    align-self: stretch;
}

.wb-tool-modal.is-canvas-util.is-cutout-active .wb-util-workspace.has-image .wb-util-stage {
    display: flex !important;
    min-height: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    border-radius: 0;
    background: transparent;
}

.wb-tool-modal.is-canvas-util.is-cutout-active .wb-cutout-viewport {
    flex: 1;
    min-height: 240px;
    max-height: none;
    border-radius: 0;
}

.wb-tool-modal.is-canvas-util.is-cutout-active .wb-cutout-toolbar.wb-re-toolbar {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 8.25rem;
    max-width: 8.25rem;
    max-height: 100%;
    margin: 0;
    padding: 0.7rem 0.55rem;
    border-radius: 18px;
    gap: 0.45rem;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 6;
}

.wb-tool-modal.is-canvas-util.is-cutout-active .wb-cutout-toolbar .wb-cutout-mode {
    flex-direction: column;
    width: 100%;
    gap: 0.35rem;
}

.wb-tool-modal.is-canvas-util.is-cutout-active .wb-cutout-toolbar .wb-re-tool {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.wb-tool-modal.is-canvas-util.is-cutout-active .wb-cutout-manual-tools {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
    gap: 0.4rem;
    padding-top: 0.35rem;
    border-top: 1px solid #e2e8f0;
}

.wb-tool-modal.is-canvas-util.is-cutout-active .wb-cutout-toolbar .wb-re-brush-size {
    width: 100%;
    margin: 0;
    padding: 0.35rem 0.15rem;
    border-left: none;
    border-right: none;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.wb-tool-modal.is-canvas-util.is-cutout-active .wb-cutout-toolbar .wb-re-zoom {
    flex-direction: column;
    width: 100%;
    gap: 0.3rem;
    align-items: center;
    border-left: none;
    padding: 0.35rem 0 0;
    margin: 0;
    border-top: 1px solid #e2e8f0;
}

.wb-tool-modal.is-canvas-util.is-cutout-active .wb-cutout-toolbar .wb-re-history {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    padding: 0.35rem 0 0;
    margin: 0;
    border-left: none;
    border-top: 1px solid #e2e8f0;
}

.wb-cutout-toolbar[hidden] {
    display: none !important;
}

.wb-tool-modal.is-canvas-util.is-cutout-active .wb-util-floatbar {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0 auto;
    justify-self: center;
}

.wb-tool-modal.is-canvas-util .wb-util-stage {
    min-height: 100%;
    height: 100%;
    padding: 0;
    flex-direction: column;
    align-items: stretch;
}

.wb-tool-modal.is-canvas-util:not(.is-cutout-active) .wb-cutout-viewport {
    overflow: hidden;
    max-height: none;
    flex: none;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wb-tool-modal:not(.is-canvas-util) .wb-util-image {
    max-width: 100%;
    max-height: 420px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.wb-tool-modal.is-canvas-util .wb-util-image {
    display: block;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
    cursor: pointer;
}

.wb-util-floatbar {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    width: fit-content;
    margin: -3rem auto 0.85rem;
    padding: 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
    position: relative;
    z-index: 2;
    align-self: center;
}

.wb-util-floatbar[hidden] {
    display: none !important;
}

.wb-util-floatbar--solo {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.wb-util-floatbar--solo .wb-util-float-send {
    border-radius: 999px;
    padding: 0.5rem 0.75rem 0.5rem 0.85rem;
}

.wb-util-float-opt {
    margin: 0;
}

.wb-util-float-opt[hidden] {
    display: none !important;
}

.wb-util-float-size {
    margin: 0;
}

.wb-util-size-select {
    border: none;
    background: transparent;
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1c1c1e;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.55rem center;
    padding-right: 1.75rem;
}

.ui-select--wb-util-size-select .ui-select-trigger {
    border: none;
    background: transparent;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1c1c1e;
    padding: 0.55rem 0.85rem;
    padding-right: 1.75rem;
    border-radius: 999px;
    min-height: auto;
    box-shadow: none;
}

.ui-select--wb-util-size-select .ui-select-trigger:hover:not(:disabled) {
    background: rgba(15, 23, 42, 0.04);
    border-color: transparent;
}

.ui-select--wb-util-size-select .ui-select-trigger[aria-expanded="true"],
.ui-select--wb-util-size-select .ui-select-trigger:focus-visible {
    border-color: transparent;
    box-shadow: none;
    background: rgba(15, 23, 42, 0.06);
}

.wb-util-size-select:focus {
    outline: none;
}

.wb-util-float-send {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: none;
    outline: none;
    background: var(--primary);
    color: #fff;
    border-radius: 14px;
    padding: 0.45rem 0.55rem 0.45rem 0.65rem;
    cursor: pointer;
    min-height: 42px;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.2);
}

.wb-util-float-send:focus,
.wb-util-float-send:focus-visible {
    outline: none;
    box-shadow: none;
}

.wb-util-float-send:hover:not(:disabled) {
    background: #1c1c1e;
}

.wb-util-float-send:disabled,
.wb-util-float-send.is-busy {
    opacity: 0.55;
    cursor: not-allowed;
}

.wb-util-float-points {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
}

.wb-util-float-points::before {
    content: "";
    width: 16px;
    height: 16px;
    background: url("/static/images/home-design/sparkles.svg") center / contain no-repeat;
    flex-shrink: 0;
}

.wb-util-float-send-icon {
    display: block;
    flex-shrink: 0;
}

.wb-tool-modal-media {
    min-height: 0;
}

.wb-tool-modal .wb-drop {
    flex: 1;
    min-height: 280px;
    border: none;
    border-radius: 18px;
    background: #f7f7f8;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.wb-tool-modal .wb-drop[hidden],
.wb-tool-modal .wb-drop.is-dismissed {
    display: none !important;
}

.wb-tool-modal .wb-drop.has-files::after,
.wb-tool-modal .wb-drop.is-dismissed::after {
    display: none !important;
    content: none !important;
}

.wb-region-workspace {
    position: relative;
    min-height: 280px;
    border-radius: 18px;
    background: #f7f7f8;
    overflow: hidden;
}

.wb-region-workspace.has-image .wb-tool-region-empty {
    display: none !important;
}

.wb-region-workspace.has-image .wb-re-stage {
    display: flex !important;
    min-height: 280px;
    margin: 0;
    border-radius: 0;
    background: transparent;
}

.wb-region-workspace:not(.has-image) .wb-re-stage {
    display: none !important;
}

.wb-re-stage[hidden] + .wb-re-toolbar,
.wb-re-toolbar[hidden] {
    display: none !important;
}

.wb-tool-modal .wb-drop-label {
    font-size: clamp(1.65rem, 4vw, 2.4rem);
    font-weight: 800;
    color: #080808;
    margin-bottom: 1.15rem;
}

.wb-tool-modal .wb-drop-hint {
    font-size: 1rem;
    color: #777;
    margin: 0;
}

.wb-tool-modal .wb-drop::after {
    content: "上传图片";
    display: inline-flex;
    align-self: center;
    margin-top: 1.1rem;
    padding: 0.8rem 1.45rem;
    border-radius: 16px;
    background: var(--primary);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.2);
}

.wb-tool-modal-prompt {
    margin-bottom: 0;
}

.wb-tool-modal-prompt textarea {
    width: 100%;
    font: inherit;
    font-size: 0.95rem;
    border: none;
    border-radius: 18px;
    padding: 1rem 1.05rem;
    background: #f8fafc;
    resize: vertical;
}

.wb-retouch-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.65rem 0.85rem;
}

.wb-retouch-modal .wb-main-modal-head {
    margin-bottom: 0.25rem;
}

.wb-retouch-inner {
    padding-top: 0.25rem;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.wb-retouch-body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: stretch;
}

.wb-retouch-media .wb-main-media-label {
    margin-bottom: 0.65rem;
}

.wb-retouch-section-label {
    margin: 0 0 0.65rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
}

.wb-retouch-options {
    margin-bottom: 0.85rem;
}

.wb-retouch-options.wb-main-mode-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.wb-retouch-option-card {
    margin-bottom: 0;
    align-items: flex-start;
    padding: 0.65rem 0.75rem;
    gap: 0.55rem;
}

.wb-retouch-option-card .wb-mode-copy strong {
    font-size: 0.8125rem;
}

.wb-retouch-option-card .wb-mode-copy small {
    font-size: 0.6875rem;
    line-height: 1.35;
}

@media (max-width: 820px) {
    .wb-retouch-options.wb-main-mode-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .wb-retouch-options.wb-main-mode-cards {
        grid-template-columns: 1fr;
    }
}

.wb-retouch-extra {
    margin-bottom: 0.85rem;
}

.wb-retouch-advanced {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #eef2f7;
}

.wb-retouch-advanced-hint {
    margin: 0 0 0.75rem;
    font-size: 0.75rem;
    color: #94a3b8;
}

.wb-retouch-chip {
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 12px;
    padding: 0.65rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.wb-retouch-chip:hover {
    border-color: rgba(220, 74, 63, 0.25);
    background: rgba(220, 74, 63, 0.03);
    box-shadow: 0 4px 14px rgba(220, 74, 63, 0.08);
}

/* 产品精修弹窗 — 勿继承 flow 弹窗 flex:1 压缩，否则配置区被挤扁后与「高级工具」重叠 */
.wb-retouch-modal.wb-flow-modal .wb-main-modal-head {
    flex-shrink: 0;
}

.wb-retouch-modal.wb-flow-modal .wb-retouch-inner {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.wb-retouch-modal.wb-flow-modal .wb-retouch-body {
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
}

.wb-retouch-modal.wb-flow-modal .wb-retouch-config {
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.wb-retouch-modal.wb-flow-modal .wb-retouch-advanced {
    flex-shrink: 0;
}

.wb-retouch-modal .wb-main-settings--tool {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 0;
}

.wb-retouch-modal .wb-main-settings--tool .wb-field {
    margin-bottom: 0;
}

.wb-main-settings--tool {
    margin-bottom: 0.15rem;
}

.wb-main-settings--tool .wb-field > span {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
}

/* Workbench tool modal */
.wb-tool-preview {
    width: 100%;
    text-align: center;
}

.wb-tool-preview-hint {
    margin: 0.5rem 0 0;
    font-size: 0.75rem;
    color: #94a3b8;
}

.wb-drop.has-files.wb-drop--compact {
    min-height: 0;
    padding: 0.75rem;
    justify-content: center;
}

.wb-tool-preview img {
    max-width: 100%;
    max-height: 420px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.wb-tool-opts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.65rem;
    margin-top: 0.85rem;
}

.wb-tool-result {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid #f1f5f9;
}

.wb-tool-result-label {
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
}

.wb-tool-result img {
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.wb-re-stage {
    position: relative;
    margin-top: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    background: #f7f7f8;
    border-radius: 18px;
    border: none;
    min-height: 280px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.wb-re-viewport {
    flex: 1;
    width: 100%;
    min-height: 240px;
    max-height: min(52vh, 520px);
    overflow: auto;
    overscroll-behavior: contain;
    padding: 1rem;
    box-sizing: border-box;
    display: flex;
    align-items: safe center;
    justify-content: safe center;
}

.wb-re-viewport .wb-re-stack {
    margin: 0;
    flex-shrink: 0;
}

.wb-region-workspace .wb-re-stack img {
    max-width: none;
    max-height: none;
}

.wb-re-stack img {
    display: block;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
}

.wb-re-stack {
    position: relative;
    display: inline-block;
    line-height: 0;
}

.wb-re-stack canvas {
    position: absolute;
    inset: 0;
    cursor: crosshair;
    border-radius: 8px;
}

.wb-re-toolbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    width: fit-content;
    gap: 0.5rem;
    margin: -3.2rem auto 0.8rem;
    padding: 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
    position: relative;
    z-index: 2;
}

.wb-re-brush-size {
    display: inline-flex;
    align-items: center;
    width: 7.5rem;
    padding: 0 0.35rem 0 0.65rem;
    margin: 0 0.1rem;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
}

.wb-re-brush-size[hidden] {
    display: none !important;
}

.wb-re-brush-slider {
    --fill: 24%;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 1.5rem;
    background: transparent;
    cursor: pointer;
}

.wb-re-brush-slider:focus {
    outline: none;
}

.wb-re-brush-slider:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.12);
}

.wb-re-brush-slider::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(to right, #0f172a 0%, #0f172a var(--fill), #d1d5db var(--fill), #d1d5db calc(100% - 1px), #94a3b8 calc(100% - 1px), #94a3b8 100%);
}

.wb-re-brush-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    margin-top: -7px;
    border: none;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
}

.wb-re-brush-slider::-moz-range-track {
    height: 4px;
    border: none;
    border-radius: 999px;
    background: #d1d5db;
}

.wb-re-brush-slider::-moz-range-progress {
    height: 4px;
    border-radius: 999px 0 0 999px;
    background: #0f172a;
}

.wb-re-brush-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
}

.wb-re-brush-sizes {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0 0.15rem;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    margin: 0 0.1rem;
}

.wb-re-brush-sizes[hidden] {
    display: none !important;
}

.wb-re-zoom {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0 0.15rem 0 0.5rem;
    margin: 0 0.1rem;
    border-left: 1px solid #e2e8f0;
}

.wb-re-zoom-label {
    min-width: 3.25rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.wb-brush-size-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}

.wb-brush-size-btn:hover {
    border-color: rgba(220, 74, 63, 0.25);
    background: rgba(220, 74, 63, 0.03);
}

.wb-brush-size-btn.active {
    border-color: #dc4a3f;
    box-shadow: 0 0 0 2px rgba(220, 74, 63, 0.15);
    background: rgba(220, 74, 63, 0.06);
}

.wb-brush-size-dot {
    display: block;
    border-radius: 50%;
    background: #475569;
}

.wb-brush-size-btn[data-brush="10"] .wb-brush-size-dot {
    width: 8px;
    height: 8px;
}

.wb-brush-size-btn[data-brush="18"] .wb-brush-size-dot {
    width: 12px;
    height: 12px;
}

.wb-brush-size-btn[data-brush="32"] .wb-brush-size-dot {
    width: 18px;
    height: 18px;
}

.wb-re-tool {
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.8125rem;
    cursor: pointer;
    color: #475569;
}

@media (max-width: 820px) {
    .wb-page {
        --wb-modal-height: calc(100vh - 1.5rem);
    }

    .wb-main-upload-row {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .wb-main-preview-panel,
    .wb-main-upload {
        min-height: 160px;
    }

    .wb-tool-modal {
        padding: 1rem;
        border-radius: 20px;
    }

    .wb-tool-modal .wb-drop,
    .wb-re-stage,
    .wb-util-workspace,
    .wb-region-workspace {
        min-height: 220px;
    }

    .wb-tool-modal-foot {
        gap: 0.4rem;
    }
}

.wb-re-tool.is-active {
    border-color: #dc4a3f;
    background: #fef2f1;
    color: #b83328;
    font-weight: 600;
}

.wb-re-tool--ghost {
    background: transparent;
}

.wb-re-history {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0 0.35rem;
    margin: 0 0.1rem;
    border-left: 1px solid #e2e8f0;
}

.wb-re-history-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.wb-re-history-btn:hover:not(:disabled) {
    background: #f1f5f9;
    color: #334155;
}

.wb-re-history-btn.is-active {
    background: #eef2f6;
    color: #0f172a;
}

.wb-re-history-btn:disabled {
    cursor: default;
    opacity: 1;
}

.wb-status {
    font-size: 0.8125rem;
    color: #dc4a3f;
    margin-top: 0.75rem;
}

.wb-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    padding: 0.65rem 1.1rem;
    border-radius: 999px;
    font-size: 0.875rem;
    z-index: 1300;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.wb-toast[hidden] {
    display: none;
}

/* ── Post-generate studio workspace ── */
body.wb-page--studio {
    overflow: hidden;
}

.wb-studio {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: #f3f4f6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.wb-studio[hidden] {
    display: none !important;
}

.wb-studio-top {
    position: relative;
    z-index: 1500;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    background: #fff;
    border-bottom: 1px solid #e8ecf0;
}

.wb-studio-back {
    border: none;
    background: none;
    font: inherit;
    font-size: 0.875rem;
    color: #475569;
    cursor: pointer;
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
}

.wb-studio-back:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.wb-studio-date {
    font-size: 0.8125rem;
    color: #94a3b8;
}

.wb-studio-layout {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 0;
}

@media (max-width: 900px) {
    .wb-studio-layout {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
    }
}

.wb-studio-main {
    min-height: 0;
    overflow-y: auto;
    padding: 1.25rem 1.5rem 2rem;
}

.wb-studio-side {
    background: #fff;
    border-left: 1px solid #e8ecf0;
    padding: 1.25rem 1.15rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

@media (max-width: 900px) {
    .wb-studio-side {
        border-left: none;
        border-top: 1px solid #e8ecf0;
        max-height: 40vh;
    }
}

.wb-studio-task-label {
    margin: 0 0 0.25rem;
    font-size: 0.75rem;
    color: #94a3b8;
}

.wb-studio-task-title {
    margin: 0 0 0.35rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
}

.wb-studio-status {
    margin: 0 0 1.1rem;
    font-size: 0.8125rem;
    color: #64748b;
}

.wb-studio-section-title,
.wb-studio-side-title {
    margin: 0 0 0.65rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475569;
}

.wb-studio-refs-wrap {
    margin-bottom: 0;
}

.wb-studio-refs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.wb-studio-refs img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.wb-long-hint {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    line-height: 1.45;
    color: #64748b;
}

.wb-stability-notice {
    margin: 0.5rem 0 0;
    padding: 0.55rem 0.7rem;
    font-size: 0.75rem;
    line-height: 1.5;
    color: #9a3412;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
}

.wb-main-modal-head .wb-stability-notice {
    max-width: 42rem;
}

.wb-studio-task-head .wb-stability-notice {
    margin-top: 0.65rem;
}

.wb-long-generate-wrap {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
}

.wb-long-skip-link {
    display: block;
    text-align: center;
    font-size: 0.75rem;
    color: #64748b;
    text-decoration: none;
}

.wb-long-skip-link:hover {
    color: #334155;
    text-decoration: underline;
}

.wb-main-settings--long {
    max-height: none;
}

.wb-studio-results-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.wb-studio-history-preview {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e8ecf0;
}

.wb-studio-history-preview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.wb-studio-section-eyebrow {
    margin: 0 0 0.2rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
}

.wb-studio-history-preview-status {
    margin: 0.35rem 0 0;
    font-size: 0.8125rem;
    color: #64748b;
}

.wb-studio-history-preview-close {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    color: #64748b;
    font-size: 1.125rem;
    line-height: 1;
    cursor: pointer;
}

.wb-studio-history-preview-close:hover {
    border-color: #cbd5e1;
    color: #334155;
    background: #f8fafc;
}

.wb-studio-grid--history {
    opacity: 0.96;
}

.wb-studio-toolbar-btn {
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    cursor: pointer;
}

.wb-studio-toolbar-btn:hover:not(:disabled) {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.wb-studio-toolbar-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.wb-studio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}

.wb-studio-grid[hidden] {
    display: none !important;
}

.wb-studio-grid.is-video-single {
    grid-template-columns: minmax(200px, 360px);
}

.wb-studio-grid.is-long-single {
    grid-template-columns: minmax(200px, 300px);
}

.wb-studio-card--long img {
    max-height: 420px;
    object-fit: contain;
    object-position: top center;
}

.wb-studio-card-zoom-hint {
    flex-shrink: 0;
    font-size: 0.6875rem;
    color: #64748b;
}

.wb-studio-card.is-video .wb-studio-video-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    background: #0f172a;
}

.wb-studio-card.is-video .wb-studio-placeholder {
    width: 100%;
}

.wb-studio-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e8ecf0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.wb-studio-card img {
    width: 100%;
    height: auto;
    display: block;
    background: #f8fafc;
}

.wb-studio-card.is-ready img {
    object-fit: contain;
}

.wb-studio-card-actions {
    position: absolute;
    right: 0.45rem;
    bottom: 0.45rem;
    left: 0.45rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity 0.15s;
}

.wb-studio-card.is-failed .wb-studio-card-actions {
    position: static;
    opacity: 1;
    justify-content: center;
    padding: 0 0.5rem 0.55rem;
}

.wb-studio-card:hover .wb-studio-card-actions,
.wb-studio-card:focus-within .wb-studio-card-actions {
    opacity: 1;
}

.wb-studio-dl {
    display: inline-block;
    padding: 0.25rem 0.55rem;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    font-size: 0.6875rem;
    text-decoration: none;
}

.wb-studio-dl:hover {
    background: rgba(15, 23, 42, 0.92);
}

.wb-studio-action {
    display: inline-block;
    margin-right: 0.25rem;
    padding: 0.25rem 0.55rem;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    color: #1e293b;
    font: inherit;
    font-size: 0.6875rem;
    font-weight: 600;
    cursor: pointer;
}

.wb-studio-action:hover {
    background: #fff;
}

.wb-studio-action--retry {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
}

.wb-studio-video-wrap {
    margin-top: 0.5rem;
    border-radius: 16px;
    background: #0f172a;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    gap: 1rem;
}

.wb-studio-video-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: #e2e8f0;
    font-size: 0.875rem;
}

.wb-studio-video-player {
    width: min(100%, 880px);
    max-height: min(56vh, 520px);
    border-radius: 12px;
    background: #000;
}

.wb-studio-video-actions {
    display: flex;
    gap: 0.5rem;
}

.wb-studio-lightbox-tool {
    border: none;
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    cursor: pointer;
}

.wb-studio-lightbox-tool:hover {
    background: rgba(255, 255, 255, 0.22);
}

.wb-scene-card--core .wb-scene-visual {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: linear-gradient(145deg, #fef2f1 0%, #f8fafc 55%, #fff 100%);
}

.wb-scene-card--hit-clone .wb-scene-visual,
.wb-scene-card--product-retouch .wb-scene-visual,
.wb-scene-card--product-replace .wb-scene-visual {
    object-fit: cover;
    object-position: center;
    padding: 0;
    background: #eef1f5;
}

.wb-studio-meta {
    margin: 0 0 1rem;
}

.wb-studio-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.8125rem;
}

.wb-studio-meta-row dt {
    color: #94a3b8;
    font-weight: 500;
}

.wb-studio-meta-row dd {
    margin: 0;
    color: #1e293b;
    font-weight: 500;
    text-align: right;
}

.wb-studio-extra {
    flex-shrink: 0;
    margin-bottom: 0.85rem;
}

.wb-studio-extra-title {
    margin: 0 0 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.wb-studio-extra-text {
    margin: 0;
    font-size: 0.8125rem;
    color: #475569;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.wb-studio-collapsible-body:not(.is-expanded) .wb-studio-extra-text {
    max-height: calc(0.8125rem * 1.45 * 5);
    overflow: hidden;
}

.wb-studio-collapsible-body.is-expanded .wb-studio-extra-text {
    max-height: none;
    overflow: visible;
}

.wb-studio-collapsible-toggle {
    margin: 0.35rem 0 0;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary);
    cursor: pointer;
}

.wb-studio-collapsible-toggle:hover {
    text-decoration: underline;
}

.wb-studio-history {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid #f1f5f9;
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.wb-studio-history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
    flex-shrink: 0;
}

.wb-studio-history-title {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475569;
}

.wb-studio-history-count {
    font-size: 0.6875rem;
    color: #94a3b8;
}

.wb-studio-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    overflow-y: auto;
    min-height: 0;
    max-height: min(42vh, 360px);
    padding-right: 0.1rem;
}

.wb-studio-history-item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 0.55rem;
    align-items: center;
    width: 100%;
    padding: 0.45rem 0.5rem;
    border: 1px solid #e8ecf0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, background 0.15s;
}

.wb-studio-history-item:hover {
    border-color: #f9b8b4;
    background: #fafafa;
}

.wb-studio-history-item.is-active {
    border-color: #dc4a3f;
    background: #f5f3ff;
}

.wb-studio-history-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wb-studio-history-thumb img,
.wb-studio-history-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wb-studio-history-thumb.is-video {
    color: #dc4a3f;
    font-size: 0.875rem;
    background: #fef2f1;
}

.wb-studio-history-thumb.is-empty {
    background: #f8fafc;
}

.wb-studio-history-copy {
    min-width: 0;
}

.wb-studio-history-copy strong {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wb-studio-history-copy span {
    display: block;
    margin-top: 0.12rem;
    font-size: 0.6875rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wb-studio-history-empty {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
    padding: 0.75rem 0.25rem;
}

.wb-studio-card.is-pending {
    border-style: dashed;
    border-color: #dbe3ec;
    background: #f8fafc;
    box-shadow: none;
}

.wb-studio-card.is-active {
    border-color: #f9b8b4;
    background: #f5f3ff;
}

.wb-studio-card.is-failed {
    border-color: #fecaca;
    background: #fef2f2;
}

.wb-studio-placeholder {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.75rem;
    text-align: center;
}

.wb-studio-card.is-active .wb-studio-placeholder {
    background: linear-gradient(
        110deg,
        #f5f3ff 8%,
        #ede9fe 18%,
        #f5f3ff 33%
    );
    background-size: 200% 100%;
    animation: wb-studio-shimmer 1.4s ease-in-out infinite;
}

@keyframes wb-studio-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.wb-studio-spinner {
    width: 22px;
    height: 22px;
    border: 2px solid #ddd6fe;
    border-top-color: #dc4a3f;
    border-radius: 50%;
    animation: wb-studio-spin 0.75s linear infinite;
}

@keyframes wb-studio-spin {
    to { transform: rotate(360deg); }
}

.wb-studio-placeholder-index {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #64748b;
    font-size: 0.8125rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wb-studio-placeholder-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #fee2e2;
    color: #dc2626;
    font-size: 0.875rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wb-studio-placeholder-text {
    font-size: 0.6875rem;
    color: #94a3b8;
}

.wb-studio-card.is-active .wb-studio-placeholder-text {
    color: #dc4a3f;
    font-weight: 500;
}

.wb-studio-card.is-failed .wb-studio-placeholder-text {
    color: #dc2626;
}

.wb-studio-card.is-ready.is-clickable {
    cursor: zoom-in;
}

.wb-studio-card.is-ready.is-clickable img {
    cursor: zoom-in;
}

.wb-studio-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1400;
    background: rgba(15, 23, 42, 0.88);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 3rem 2rem 1rem;
}

.wb-studio-lightbox[hidden] {
    display: none !important;
}

body.wb-page--lightbox {
    overflow: hidden;
}

.wb-studio-lightbox-stage {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    flex: 1;
    min-height: 0;
    width: min(960px, calc(100vw - 6rem));
    max-height: calc(100vh - 7rem);
}

.wb-studio-lightbox-viewport {
    position: relative;
    flex: 1;
    min-height: 180px;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.22);
    touch-action: none;
    cursor: grab;
}

.wb-studio-lightbox-viewport.is-dragging {
    cursor: grabbing;
}

.wb-studio-lightbox-zoom-hint {
    margin: 0;
    text-align: center;
    font-size: 0.75rem;
    color: rgba(248, 250, 252, 0.62);
    line-height: 1.35;
}

.wb-studio-lightbox-caption {
    margin: 0;
    align-self: center;
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #f8fafc;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.3;
    text-align: center;
    backdrop-filter: blur(8px);
}

.wb-studio-lightbox-caption:empty {
    display: none;
}

.wb-studio-lightbox-img {
    position: absolute;
    top: 0;
    left: 0;
    max-width: none;
    max-height: none;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
    background: #fff;
    transform-origin: 0 0;
    will-change: transform;
    user-select: none;
    -webkit-user-drag: none;
}

.wb-studio-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.wb-studio-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.24);
}

.wb-studio-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}

.wb-studio-lightbox-nav:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.24);
}

.wb-studio-lightbox-nav:disabled {
    opacity: 0.25;
    cursor: default;
}

.wb-studio-lightbox-prev {
    left: 1rem;
}

.wb-studio-lightbox-next {
    right: 1rem;
}

.wb-studio-card.is-ready .wb-studio-card-cap,
.wb-studio-card.is-failed .wb-studio-card-cap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    padding: 0.45rem 0.55rem;
    background: #fff;
    border-top: 1px solid #eef2f6;
}

.wb-studio-card.is-pending .wb-studio-card-cap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.55rem;
    border-top: 1px solid #eef2f6;
}

.wb-studio-card.is-pending .wb-studio-card-label {
    flex: unset;
    text-align: center;
}

.wb-studio-card-cap.is-muted {
    background: #f8fafc;
}

.wb-studio-card-label {
    flex: 1;
    min-width: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wb-studio-cap-dl {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    color: #64748b;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.wb-studio-cap-dl:hover {
    background: #f1f5f9;
    color: #334155;
}

.wb-studio-cap-retry {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: #dc4a3f;
    font: inherit;
    font-size: 0.6875rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.15rem 0.25rem;
}

.wb-studio-cap-retry:hover:not(:disabled) {
    color: var(--primary-dark);
}

.wb-studio-cap-retry:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.wb-studio-card-cap.is-muted .wb-studio-card-label {
    color: #64748b;
    font-weight: 500;
}

.wb-studio-lightbox-foot {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    width: min(920px, calc(100% - 2rem));
    pointer-events: none;
    flex-shrink: 0;
}

.wb-studio-lightbox-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 0.75rem;
    pointer-events: auto;
}

.wb-studio-lightbox-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
}

.wb-studio-lightbox-dl {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: #1e293b;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.wb-studio-lightbox-dl:hover {
    background: #fff;
}

.wb-studio-lightbox-counter {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8125rem;
}

.wb-recent-projects {
    margin: 0 0 2.5rem;
}

.wb-recent-projects-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.wb-recent-projects-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
}

.wb-recent-projects-all {
    border: none;
    background: transparent;
    padding: 0;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
}

.wb-recent-projects-all:hover {
    color: #1e293b;
}

.wb-recent-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

@media (max-width: 900px) {
    .wb-recent-projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .wb-recent-projects-grid {
        grid-template-columns: 1fr;
    }
}

.wb-recent-project-card {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.wb-recent-project-card:hover .wb-recent-project-mosaic {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.wb-recent-project-mosaic {
    display: grid;
    gap: 3px;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #f1f5f9;
    border: 1px solid var(--wb-card-border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.wb-recent-project-mosaic.is-single {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

.wb-recent-project-mosaic.is-duo {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 1fr;
}

.wb-recent-project-mosaic.is-trio {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

.wb-recent-project-mosaic.is-trio .wb-recent-project-cell:first-child {
    grid-row: 1 / 3;
}

.wb-recent-project-mosaic.is-quad {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

.wb-recent-project-cell {
    position: relative;
    overflow: hidden;
    background: #e2e8f0;
}

.wb-recent-project-cell img,
.wb-recent-project-cell video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.wb-recent-project-cell.is-empty {
    background: #f8fafc;
}

.wb-recent-project-cell.is-active {
    background: linear-gradient(110deg, #f5f3ff 8%, #ede9fe 18%, #f5f3ff 33%);
    background-size: 200% 100%;
    animation: wb-studio-shimmer 1.4s ease-in-out infinite;
}

.wb-recent-project-cell.is-active::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 18px;
    height: 18px;
    border: 2px solid #ddd6fe;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: wb-studio-spin 0.75s linear infinite;
}

.wb-recent-project-cell.is-failed {
    background: #fef2f2;
}

.wb-recent-project-title {
    margin: 0.55rem 0 0.15rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wb-recent-project-meta {
    margin: 0;
    font-size: 0.75rem;
    color: #94a3b8;
}

.wb-recent-project-meta.is-running {
    color: #dc4a3f;
}

.wb-recent-project-meta.is-done {
    color: #059669;
}

.wb-recent-project-meta.is-failed {
    color: #dc2626;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* 爆款复刻 */
.wb-clone-inner {
    padding: 0;
}

.wb-clone-body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: stretch;
}

.wb-clone-upload--compact {
    min-height: 120px;
    position: relative;
    overflow: hidden;
    padding: 0;
}

.wb-clone-upload--compact .wb-main-upload-inner {
    padding: 1.25rem 1rem;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wb-clone-upload--compact.has-file {
    border-style: solid;
    border-color: #e2e8f0;
}

.wb-clone-drop-preview {
    position: relative;
    width: 100%;
    min-height: 120px;
}

.wb-clone-drop-preview img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.wb-clone-custom-label {
    margin-top: 1rem;
}

.wb-clone-preview {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
}

.wb-clone-preview img {
    width: 100%;
    display: block;
    object-fit: cover;
    max-height: 220px;
}

.wb-clone-preview--compact img {
    max-height: 120px;
}

.wb-clone-replace {
    position: absolute;
    right: 0.5rem;
    bottom: 0.5rem;
    border: none;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    cursor: pointer;
}

.wb-clone-preview-actions {
    position: absolute;
    right: 0.5rem;
    bottom: 0.5rem;
    display: flex;
    gap: 0.35rem;
}

.wb-clone-replace--ghost {
    background: rgba(255, 255, 255, 0.92);
    color: #334155;
}

.wb-clone-section-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475569;
    margin: 0 0 0.65rem;
}

.wb-clone-template-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.85rem;
    max-height: 220px;
    overflow: auto;
}

.wb-clone-tpl {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.35rem;
    background: #fff;
    cursor: pointer;
    text-align: left;
}

.wb-clone-tpl.is-active {
    border-color: #dc4a3f;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.wb-clone-tpl-visual {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #f8fafc;
}

.wb-clone-tpl-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wb-clone-tpl-title {
    font-size: 0.72rem;
    color: #334155;
    line-height: 1.3;
    padding: 0 0.15rem 0.2rem;
}

.wb-clone-submit-wrap {
    margin-top: 0.75rem;
}

.wb-clone-points {
    font-size: 0.8125rem;
    color: #64748b;
    margin: 0 0 0.65rem;
}

@media (max-width: 860px) {
    .wb-clone-upload--compact {
        min-height: 100px;
    }
}

.wb-tplset-screen-strip {
    display: flex;
    gap: 0.65rem;
    overflow-x: auto;
    padding: 0.25rem 0 0.75rem;
    margin-bottom: 0.5rem;
    scroll-snap-type: x mandatory;
}

/* 灵感模板弹窗 — 效果图 2×3 + 商品套图式上传 */
.wb-tplset-modal.wb-flow-modal {
    --wb-modal-width: 720px;
}

.wb-tplset-modal.wb-flow-modal .wb-tplset-inner {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

/* 勿继承套图弹窗的 flex:1 压缩：配置区被挤扁后效果图会叠上下拉框 */
.wb-tplset-modal.wb-flow-modal .wb-tplset-body {
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wb-tplset-modal.wb-flow-modal .wb-tplset-settings.wb-main-settings {
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
}

.wb-tplset-inner {
    padding: 0 1.25rem 1rem;
}

.wb-tplset-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wb-tplset-effect {
    flex-shrink: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.28);
    padding-top: 1.1rem;
    margin-top: 0.15rem;
}

.wb-tplset-settings {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.wb-tplset-section-title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #334155;
    text-align: left;
}

.wb-tplset-screen-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 0.75rem;
}

.wb-tplset-screen-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.wb-tplset-screen-action-btn {
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.wb-tplset-screen-action-btn:hover {
    border-color: rgba(220, 74, 63, 0.35);
    color: #dc4a3f;
    background: rgba(220, 74, 63, 0.04);
}

.wb-tplset-effect-preview {
    display: block;
    width: 100%;
}

.wb-tplset-effect-preview--grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.wb-tplset-screen-thumb {
    position: relative;
    margin: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #f8fafc;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.wb-tplset-screen-thumb.is-selected {
    border-color: #dc4a3f;
    box-shadow: 0 0 0 1px rgba(220, 74, 63, 0.22);
    background: rgba(220, 74, 63, 0.03);
}

.wb-tplset-screen-thumb.is-unselected {
    opacity: 0.72;
}

.wb-tplset-screen-check {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 1;
    width: 16px;
    height: 16px;
    accent-color: #dc4a3f;
    cursor: pointer;
}

.wb-tplset-screen-thumb-visual {
    height: 240px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #eef2f6;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.wb-tplset-screen-thumb-visual::-webkit-scrollbar {
    display: none;
}

.wb-tplset-screen-thumb img {
    display: block;
    width: 100%;
    height: auto;
    min-height: 100%;
    object-fit: contain;
    object-position: top center;
}

.wb-tplset-screen-thumb figcaption {
    padding: 6px 8px;
    font-size: 12px;
    color: #475569;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wb-tplset-long-preview {
    width: 100%;
    max-height: none;
    overflow: visible;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #f8fafc;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
    text-align: center;
}

.wb-tplset-long-preview.is-fill {
    width: 100%;
    max-height: none;
}

.wb-tplset-long-preview img {
    width: auto;
    max-width: 100%;
    height: auto;
    display: inline-block;
    vertical-align: top;
}

.wb-tplset-long-preview.is-pixel-perfect img {
    width: auto;
    max-width: 100%;
    height: auto;
    display: inline-block;
    vertical-align: top;
    image-rendering: auto;
}

.wb-tplset-effect-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 1rem;
}

.wb-tplset-effect-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.wb-tplset-effect-visual {
    display: block;
    width: 100%;
    aspect-ratio: 960 / 700;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #f8fafc;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}

.wb-tplset-effect-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wb-tplset-effect-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #475569;
    text-align: center;
    line-height: 1.35;
}

.wb-tplset-upload .wb-main-upload-row {
    margin-bottom: 0.85rem;
}

.wb-tplset-preview-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
    width: 100%;
}

.wb-main-preview-panel:has(.wb-tplset-preview-strip) {
    overflow-x: auto;
    overflow-y: hidden;
}

.wb-tplset-preview-strip .wb-main-preview-item img {
    aspect-ratio: 1;
}

.wb-tplset-extra {
    margin-top: 0;
}

.wb-tplset-generate-wrap {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    width: 100%;
}

.wb-tplset-points {
    margin: 0;
    font-size: 0.8125rem;
    color: #64748b;
    text-align: center;
}

.wb-tplset-points strong {
    color: #1e293b;
    font-weight: 600;
}

@media (max-width: 640px) {
    .wb-tplset-effect-grid {
        gap: 0.65rem 0.75rem;
    }

    .wb-tplset-effect-label {
        font-size: 0.75rem;
    }
}

.wb-tplset-screen {
    flex: 0 0 108px;
    scroll-snap-align: start;
}

.wb-tplset-screen-visual {
    display: block;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #f8fafc;
}

.wb-tplset-screen-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wb-tplset-screen-title {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.72rem;
    line-height: 1.3;
    color: #64748b;
    text-align: center;
}
