.cutout-page-body {
    margin: 0;
    padding: 0;
    height: auto;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: #f3f5f8;
    color: #1f2430;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    overflow-y: auto;
}

[hidden] {
    display: none !important;
}

.cutout-header-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.cutout-workbench {
    flex: 0 0 auto;
    width: 100%;
    height: calc(100dvh - 61px);
    min-height: 520px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    padding: 24px;
    box-sizing: border-box;
}

.cutout-upload-zone {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cutout-dropzone {
    cursor: pointer;
}

.cutout-dropzone.upload-empty-card {
    flex: 0 0 auto;
    opacity: 1;
}

.cutout-dropzone input {
    display: none;
}

.cutout-dropzone.is-disabled {
    opacity: 1;
    cursor: not-allowed;
}

.cutout-dropzone.is-disabled:hover {
    border-color: #d4d6e0;
    box-shadow: 0 2px 16px rgba(42, 44, 53, 0.04);
}

.cutout-dropzone.is-dragover {
    border-color: #1EBE9B;
    background: rgba(30, 190, 155, 0.03);
    box-shadow: 0 10px 26px rgba(30, 190, 155, 0.16);
}

.cutout-workspace {
    width: 100%;
    max-width: 1360px;
    height: 100%;
    min-height: 0;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    align-items: stretch;
}

.cutout-stage-panel,
.cutout-side-panel {
    background: #ffffff;
    border: 1px solid #e4eaf1;
    box-shadow: 0 10px 34px rgba(15, 23, 42, 0.05);
}

.cutout-stage-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    min-width: 0;
}

.cutout-stage-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid #eef2f7;
    min-width: 0;
}

.cutout-toolbar-left,
.cutout-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.cutout-toolbar-right {
    margin-left: auto;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.cutout-file-meta,
.cutout-toolbar-hint {
    font-size: 12px;
    color: #6d7685;
    white-space: nowrap;
}

.cutout-stage-shell {
    position: relative;
    flex: 1;
    min-height: 0;
    background: #f6f8fb;
    padding: 20px;
    overflow: hidden;
}

.cutout-stage-frame {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0 auto;
    overflow: hidden;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.cutout-stage-checker,
.cutout-stage-background,
.cutout-stage-placeholder,
.cutout-stage-image,
.cutout-foreground-layer {
    position: absolute;
    inset: 0;
}

.cutout-stage-checker {
    background-image:
        linear-gradient(45deg, #edf2f7 25%, transparent 25%),
        linear-gradient(-45deg, #edf2f7 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #edf2f7 75%),
        linear-gradient(-45deg, transparent 75%, #edf2f7 75%);
    background-size: 24px 24px;
    background-position: 0 0, 0 12px, 12px -12px, -12px 0;
}

.cutout-stage-background {
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.cutout-stage-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    pointer-events: none;
}

.cutout-stage-image-original {
    background: #ffffff;
}

.cutout-foreground-layer {
    inset: auto;
    transform-origin: center center;
    cursor: grab;
    user-select: none;
}

.cutout-foreground-layer.is-draggable {
    pointer-events: auto;
}

.cutout-foreground-layer.is-dragging {
    cursor: grabbing;
}

.cutout-stage-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    color: #768092;
    font-size: 14px;
    background: #ffffff;
}

.cutout-stage-placeholder strong {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    color: #1f2430;
}

.cutout-transform-badge {
    position: absolute;
    right: 14px;
    bottom: 14px;
    height: 28px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    background: rgba(17, 24, 39, 0.75);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

.cutout-processing-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(243, 245, 248, 0.72);
    backdrop-filter: blur(2px);
}

.cutout-processing-overlay:not([hidden]) {
    display: flex;
}

.cutout-processing-card {
    width: min(420px, calc(100% - 32px));
    padding: 22px 20px;
    background: #ffffff;
    border: 1px solid #e4eaf1;
    box-shadow: 0 10px 34px rgba(15, 23, 42, 0.08);
}

.cutout-processing-title {
    font-size: 16px;
    font-weight: 700;
    color: #171b24;
}

.cutout-processing-progress-text {
    margin-top: 8px;
    color: #697282;
    font-size: 13px;
}

.cutout-progress {
    margin-top: 14px;
    height: 8px;
    background: #edf1f6;
    overflow: hidden;
}

.cutout-progress-bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #1ebe9b, #16a987);
    transition: width 0.2s ease;
}

.cutout-stage-footer {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding: 16px 18px;
    border-top: 1px solid #eef2f7;
}

.cutout-stage-footer-left,
.cutout-stage-footer-right,
.cutout-side-tabs,
.cutout-size-inputs {
    display: flex;
    align-items: center;
}

.cutout-stage-footer-left,
.cutout-stage-footer-right {
    gap: 10px;
    flex-wrap: wrap;
}

.cutout-side-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding: 18px;
}

.cutout-side-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
}

.cutout-side-title {
    font-size: 14px;
    font-weight: 700;
    color: #171b24;
}

.cutout-side-desc {
    margin: 6px 0 0;
    color: #70798a;
    font-size: 12px;
    line-height: 1.6;
}

.cutout-side-tabs {
    gap: 8px;
    margin-top: 18px;
}

.cutout-side-tab {
    flex: 1;
    appearance: none;
    border: 1px solid #e3e9f0;
    background: #f7f9fc;
    color: #556173;
    height: 38px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.cutout-side-tab.is-active {
    background: #1ebe9b;
    border-color: #1ebe9b;
    color: #ffffff;
}

.cutout-side-content {
    margin-top: 16px;
    min-height: 0;
    flex: 1 1 auto;
    overflow: auto;
}

.cutout-side-scroll {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-bottom: 4px;
}

.cutout-bg-section-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: baseline;
    margin-bottom: 10px;
}

.cutout-bg-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #232833;
}

.cutout-bg-section-hint {
    font-size: 11px;
    color: #8791a1;
}

.cutout-bg-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.cutout-bg-item,
.cutout-size-item,
.cutout-tool-btn,
.cutout-btn {
    appearance: none;
}

.cutout-bg-item {
    position: relative;
    padding: 8px;
    border: 1px solid #e3e9f0;
    background: #ffffff;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cutout-bg-item:hover {
    border-color: #1ebe9b;
}

.cutout-bg-item.is-active {
    border-color: #1ebe9b;
    box-shadow: inset 0 0 0 1px #1ebe9b;
}

.cutout-bg-thumb {
    height: 68px;
    margin-bottom: 8px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.cutout-bg-thumb.is-checker {
    background-image:
        linear-gradient(45deg, #eef2f7 25%, transparent 25%),
        linear-gradient(-45deg, #eef2f7 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #eef2f7 75%),
        linear-gradient(-45deg, transparent 75%, #eef2f7 75%);
    background-size: 18px 18px;
    background-position: 0 0, 0 9px, 9px -9px, -9px 0;
}

.cutout-bg-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #4e596b;
}

.cutout-bg-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #1ebe9b;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.cutout-size-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#panelSize {
    padding-right: 2px;
}

.cutout-size-item {
    border: 1px solid #e3e9f0;
    background: #ffffff;
    padding: 12px 14px;
    cursor: pointer;
    text-align: left;
}

.cutout-size-item:hover {
    border-color: #1ebe9b;
}

.cutout-size-item.is-active {
    border-color: #1ebe9b;
    box-shadow: inset 0 0 0 1px #1ebe9b;
    background: #f3fcf8;
}

.cutout-size-name {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #1f2430;
}

.cutout-size-dim {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #70798a;
}

.cutout-size-custom {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #edf1f6;
}

.cutout-size-inputs {
    gap: 8px;
    margin-top: 10px;
}

.cutout-size-input {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #dde4ee;
    background: #ffffff;
    font-size: 13px;
    color: #1f2430;
    box-sizing: border-box;
}

.cutout-size-sep {
    color: #758092;
    font-weight: 700;
}

.cutout-tool-btn {
    border: 1px solid #dde4ee;
    background: #ffffff;
    color: #425063;
    height: 34px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.cutout-tool-btn.is-active {
    background: #1ebe9b;
    border-color: #1ebe9b;
    color: #ffffff;
}

.cutout-btn {
    border: 1px solid #dbe2ec;
    background: #ffffff;
    color: #1f2430;
    height: 42px;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.cutout-btn:hover:not(:disabled) {
    border-color: #1ebe9b;
    color: #159173;
}

.cutout-btn:disabled {
    background: #eef1f5;
    border-color: #eef1f5;
    color: #a4abba;
    cursor: not-allowed;
}

.cutout-btn-primary {
    background: #1ebe9b;
    border-color: #1ebe9b;
    color: #ffffff;
}

.cutout-btn-primary:hover:not(:disabled) {
    background: #18aa8b;
    color: #ffffff;
}

.cutout-btn-block {
    width: 100%;
    margin-top: 12px;
}

.cutout-btn.is-linklike {
    background: #ffffff;
}

.cutout-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.cutout-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cutout-switch-track {
    width: 46px;
    height: 28px;
    border-radius: 999px;
    background: #d6dde8;
    position: relative;
    transition: background 0.15s ease;
}

.cutout-switch-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    transition: transform 0.15s ease;
}

.cutout-switch input:checked + .cutout-switch-track {
    background: #1ebe9b;
}

.cutout-switch input:checked + .cutout-switch-track .cutout-switch-thumb {
    transform: translateX(18px);
}

.cutout-seo-section {
    flex: 0 0 auto;
    background: #ffffff;
    border-top: 1px solid #e9eef5;
}

.cutout-seo-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 48px 24px 64px;
}

.cutout-seo-head {
    max-width: 760px;
}

.cutout-seo-title,
.cutout-faq-title {
    margin: 0;
    font-size: 28px;
    line-height: 1.3;
    color: #171b24;
}

.cutout-seo-subtitle {
    margin: 12px 0 0;
    font-size: 15px;
    line-height: 1.8;
    color: #5f6b7a;
}

.cutout-seo-grid,
.cutout-seo-feature-list,
.cutout-faq-list {
    display: grid;
    gap: 16px;
}

.cutout-seo-grid {
    margin-top: 28px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cutout-seo-card,
.cutout-seo-feature,
.cutout-faq-item {
    border: 1px solid #e8edf4;
    background: #f9fbfd;
    padding: 18px 20px;
    box-sizing: border-box;
}

.cutout-seo-card h2,
.cutout-faq-item h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.4;
    color: #171b24;
}

.cutout-seo-card p,
.cutout-faq-item p,
.cutout-seo-feature span {
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.8;
    color: #617082;
}

.cutout-seo-feature-list {
    margin-top: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cutout-seo-feature strong {
    display: block;
    font-size: 16px;
    line-height: 1.4;
    color: #171b24;
}

.cutout-faq-block {
    margin-top: 36px;
}

.cutout-faq-list {
    margin-top: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1080px) {
    .cutout-workspace {
        grid-template-columns: 1fr;
        overflow: auto;
    }

    .cutout-side-panel {
        order: 2;
    }

    .cutout-seo-grid,
    .cutout-seo-feature-list,
    .cutout-faq-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .cutout-page-body {
        min-height: 100dvh;
        height: auto;
    }

    .cutout-workbench {
        height: calc(100dvh - 52px - env(safe-area-inset-top, 0px));
        min-height: 0;
        overflow: hidden;
        padding: 12px;
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }

    .cutout-workspace {
        gap: 12px;
        min-height: 0;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }

    .cutout-stage-toolbar,
    .cutout-stage-footer {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        align-items: center;
    }

    .cutout-toolbar-right,
    .cutout-stage-footer-right {
        margin-top: 0;
        width: 100%;
        justify-content: flex-start;
    }

    .cutout-stage-footer-right {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .cutout-stage-shell {
        min-height: 280px;
        padding: 12px;
    }

    .cutout-side-panel {
        padding: 12px;
    }

    .cutout-bg-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .cutout-btn {
        min-height: 44px;
    }

    .cutout-size-input {
        font-size: 16px;
        min-height: 42px;
    }

    .cutout-seo-inner {
        padding: 32px 16px 40px;
    }

    .cutout-seo-title,
    .cutout-faq-title {
        font-size: 22px;
    }

    .cutout-seo-grid,
    .cutout-seo-feature-list,
    .cutout-faq-list {
        grid-template-columns: 1fr;
    }
}
