        .feature-icon {
            width: 100%;
            height: 100%;
            padding: 0.5rem;
            object-fit: contain;
        }
        html,body{
            overflow-x: hidden;
            font-family: "Segoe UI", "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        }
        .container {
            padding-top: 2rem;
        }
        .web-ai-container {
            margin-top: 68px;
            padding: 0;
            width: 100%;
            height: 100%;
            display: inline-block;
            background-color: #dddddd;
        }
        .web-ai-main {
            display: inline-flex;
            flex-direction: row;
            height: 100%;
            width: 100vw;
            justify-content: center;
        }
        .wam-op {
            width: 20vw;
            margin-top: 2vw;
            margin-bottom: 2vw;
            margin-right: 1vw;
            background-color: white;
            border-radius: 1vw;
            padding: 2vw;
            display: flex;
            flex-direction: column;
            height: calc(100vh - 4vw - 68px);
            padding-top: .5vw;
            min-height: 0;
        }
        .title-star {
            color: #1256e0;
            font-size: .8vw;
            font-weight: bold;
            margin-right: 4px;
        }
        .wam-op .new-panel-title.screenshot-title-gap {
            position: sticky;
            top: 0;
            background-color: white;
            z-index: 10;
            padding-top: 0.33em;
            padding-bottom: 0.55vw;
            margin-bottom: 0;
            flex-shrink: 0;
            margin-top: 0;
        }
		.wamo-1 > .new-panel-title.screenshot-title-gap {
			position: sticky !important;
			top: 0 !important;
			z-index: 10 !important;
			background-color: #fff !important;
			margin-top: 0 !important;
			padding-top: 0.33em !important;
		}
		.wamo-1 > .new-panel-title.screenshot-title-gap {
			cursor: pointer;
			display: flex;
			align-items: center;
		}
		.wamo-1 > .new-panel-title.screenshot-title-gap .back-top-icon {
			display: none;
			width: 1em;
			height: 1em;
			color: #4285f4;
			margin-left: .3em;
			opacity: .85;
		}
		.wamo-1 > .new-panel-title.screenshot-title-gap.show-back-top .back-top-icon {
			display: inline-block;
		}
		.wamo-1 > .new-panel-title.screenshot-title-gap:hover .back-top-icon {
			opacity: 1;
		}
        .wamo-1 {
            display: flex;
            flex-direction: column;
            flex: 1 1 auto;
            min-height: 0;
            overflow-y: auto;
            padding-bottom: 4vw;
        }
        .wamo-2 {
            height: 3.5vw;
            flex-shrink: 0;
        }
        .wam-result {
            width: 50vw;
            margin-top: 2vw;
            margin-bottom: 2vw;
            background-color: white;
            border-radius: 1vw;
            display: flex;
            flex-direction: column;
            height: calc(100vh - 4vw - 68px);
        }
        .wam-result img{
            max-height: 100%;
        }
        .min-h-screen {
            display: flex;
            flex-direction: column;
        }
        .min-h-screen {
            min-height: initial;
        }
        .wo-style-box {
            display: flex;
            flex-direction: row;
            margin-top: .5vw;
            justify-content: space-between;
        }
        .wsb-item {
            width: 30%;
            cursor: pointer;
        }
        .wsb-item img {
            border-radius: .5vw;
        }
        .wsb-item.active > img,
        .wsb-item:hover > img {
            border: .2vw solid #1256e0;
        }
        .wsb-item.active > .wsbi,
        .wsb-item:hover > .wsbi {
            color: #1256e0;
        }
        .wsbi {
            display: flex;
            flex-direction: row;
            width: 100%;
            text-align: center;
            justify-content: center;
            margin-top: .2vw;
        }
        .wsbi > div {
            font-size: .6vw;
            margin-left: .2vw;
        }
        .wo-picture {
            height: 13.25vh;
            font-size: .6vw;
            display: flex;
            flex-direction: column;
            justify-content: center;
            text-align: center;
            background: #f0f0f0;
            border-radius: .6vw;
            color: #adacac;
            margin-top: .333vw;
            flex-shrink: 0;
        }
        .wo-picture .wopo-btn-add {
            width: 1.5vw;
            height: 1.5vw;
            margin-left: auto;
            margin-right: auto;
        }
        .wo-title {
            margin-top: .5vw;
        }
        .wo-title.head{
            font-weight: bold;
            font-size: .8vw;
        }
        .wo-param {
            margin-top: .5vw;
            display: flex;
            flex-direction: row;
        }
        .wop-title {
            width: 4vw;
            flex-shrink: 0;
            height: 2vw;
            line-height: 2vw;
            font-size: .7vw;
        }
        .wop-param {
            width: 100%;
            text-align: center;
            background: #f0f0f0;
            height: 2vw;
            border-radius: .2vw;
            font-size: .7vw;
        }
        .wo-prompt textarea {
            background: #f0f0f0;
            width: 100%;
            height: 10vh;
            padding: .5vw;
            border-radius: .3vw;
        }
        .wo-prompt {
            margin-top: .222vw;
        }
        .switch {
            position: relative;
            display: inline-block;
            width: 60px;
            height: 15px;
        }
        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        .slider {
            position: absolute;
            cursor: pointer;
            background-color: #d9d9d9;
            border-radius: 15px;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            transition: background-color 0.3s;
        }
        .slider::before {
            content: "";
            position: absolute;
            width: 30px;
            height: 15px;
            background-color: #1256e0;
            border-radius: 15px;
            transition: transform 0.3s;
            left: 0;
            top: 0;
        }
        .switch input:checked + .slider::before {
            transform: translateX(30px);
        }
        .upload-ref,
        .wo-prompt-container{
            display: flex;
            flex-direction: row;
            height: 2.5vw;
            margin-top: .333vw;
        }
        .upload-ref .wo-title,
        .wo-prompt-container .wo-title{
            width: 8vw;
            flex-shrink: 0;
            font-size: .7vw;
        }
        .wo-switch {
            height: 2vw;
            margin-top: .65vw;
            width: 100%;
            text-align: right;
        }
        .wamo2-btn {
            height: 2.5vw;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: .5vw;
            color: white;
            font-size: .65vw;
            cursor: pointer;
            background: linear-gradient(to right, #0491e8, #1c1fd8);
        }
        .wamo2-btn:hover{
            background: linear-gradient(to right, #027dc9, #181abb);
        }
        .wamo2-help {
            font-size: .433vw;
            text-align: center;
            margin-top: .5vw;
            margin-bottom: .5vw;
            color: #888888;
        }
        .wr-title {
            text-align: center;
            height: 3vw;
            line-height: 3vw;
            flex-shrink: 0;
            font-weight: bold;
            font-size: .8vw;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        .tab-buttons {
            display: flex;
            gap: 0;
            justify-content: center;
            align-items: center;
        }
        .fullscreen-btn {
            position: absolute;
            right: 1.5vw;
            top: 1.5vw;
            background: white;
            color: black;
            border: none;
            padding: 0.33vw 0.67vw;
            border-radius: 0.3vw;
            font-size: 0.47vw;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.2vw;
            transition: all 0.2s;
            z-index: 100;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        }
        .fullscreen-btn:hover {
            background: #f0f0f0;
            box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
        }
        .fullscreen-btn svg {
            width: 0.53vw;
            height: 0.53vw;
        }
        @media (max-width: 768px) {
            .fullscreen-btn {
                padding: 0.67vw 1.33vw;
                font-size: 1.33vw;
                right: 2vw;
                top: 2vw;
            }
            .fullscreen-btn svg {
                width: 1.33vw;
                height: 1.33vw;
            }
        }
        .wr-lists {
            border-radius: .5vw;
            padding: 1vw;
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }
        .wr-lists.hide{
            display: none;
        }
        .wr-lists .img-container {
            width: calc((100% - 40px) / 5);
            aspect-ratio: 1;
            background: #f8f8f8;
            border-radius: 8px;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            position: relative;
            transition: all 0.3s ease;
        }
        .wr-lists.history .img-container .img-hover-actions {
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            background: rgba(0, 0, 0, 0.45);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            opacity: 0;
            transition: opacity 0.2s ease;
            pointer-events: none;
        }
        .wr-lists.history .img-container:hover .img-hover-actions {
            opacity: 1;
            pointer-events: auto;
        }
        .wr-lists.history .img-container .img-hover-actions button {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: 1px solid rgba(255, 255, 255, 0.5);
            background: rgba(255, 255, 255, 0.18);
            color: #fff;
            font-size: 18px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(4px);
            transition: background 0.2s ease, transform 0.2s ease;
        }
        .wr-lists.history .img-container .img-hover-actions button:hover {
            background: rgba(255, 255, 255, 0.35);
            transform: scale(1.06);
        }
        .wr-lists .img-container:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }
        .wr-lists img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
            display: block;
            transition: all 0.3s ease;
        }
        .wr-lists .img-container:hover img {
            transform: scale(1.05);
        }
        .wr-lists-box {
            margin: 1vw;
            border: .1vw dashed #dddddd;
            height: 100%;
            overflow-y: auto;
            margin-top: 0;
            border-radius: 0.5vw;
            position: relative;
        }
        .fullscreen-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: #000;
            z-index: 99999;
            animation: fadeIn 0.3s ease;
        }
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        .fullscreen-modal.active {
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .fullscreen-content {
            position: relative;
            width: 90vw;
            height: 90vh;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .fullscreen-close {
            position: absolute;
            top: 20px;
            right: 20px;
            background: rgba(255, 255, 255, 0.15);
            color: white;
            border: 1px solid rgba(255, 255, 255, 0.3);
            width: 44px;
            height: 44px;
            border-radius: 50%;
            font-size: 26px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 100001;
            transition: all 0.2s;
            backdrop-filter: blur(4px);
        }
        .fullscreen-close:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: scale(1.1);
        }
        .fullscreen-download {
            position: absolute;
            top: 20px;
            right: 76px;
            background: rgba(255, 255, 255, 0.15);
            color: white;
            border: 1px solid rgba(255, 255, 255, 0.3);
            width: 44px;
            height: 44px;
            border-radius: 50%;
            font-size: 20px;
            cursor: pointer;
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 100001;
            transition: all 0.2s;
            backdrop-filter: blur(4px);
        }
        .fullscreen-download:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: scale(1.1);
        }
        .fullscreen-gallery-nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(255, 255, 255, 0.15);
            color: #fff;
            border: none;
            width: 48px;
            height: 48px;
            border-radius: 50%;
            font-size: 24px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 100001;
            transition: background 0.2s ease;
            backdrop-filter: blur(4px);
        }
        .fullscreen-gallery-nav:hover {
            background: rgba(255, 255, 255, 0.3);
        }
        .fullscreen-gallery-nav.prev {
            left: 20px;
        }
        .fullscreen-gallery-nav.next {
            right: 20px;
        }
        .fullscreen-gallery-counter {
            position: absolute;
            bottom: 24px;
            left: 50%;
            transform: translateX(-50%);
            color: rgba(255, 255, 255, 0.7);
            font-size: 14px;
            z-index: 100001;
        }
        .fullscreen-image-wrapper {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            cursor: grab;
        }
        .fullscreen-image-wrapper.dragging {
            cursor: grabbing;
        }
        .fullscreen-image-wrapper img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
            transition: transform 0.1s ease-out;
            user-select: none;
        }
        .fullscreen-compare-container {
            position: relative;
            width: 90vw;
            height: 90vh;
            overflow: hidden;
            cursor: grab;
        }
        .fullscreen-compare-container.dragging {
            cursor: grabbing;
        }
        .fullscreen-compare-before,
        .fullscreen-compare-after {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .fullscreen-compare-before img,
        .fullscreen-compare-after img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
            transition: transform 0.1s ease-out;
            user-select: none;
        }
        .fullscreen-compare-after {
            clip-path: inset(0 0 0 50%);
        }
        .fullscreen-compare-slider {
            position: absolute;
            top: 0;
            left: 50%;
            width: 4px;
            height: 100%;
            background: #fff;
            cursor: ew-resize;
            z-index: 100000;
            transform: translateX(-50%);
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
        }
        .fullscreen-compare-slider::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 50px;
            height: 50px;
            background: #fff;
            border: 3px solid #007bff;
            border-radius: 50%;
            transform: translate(-50%, -50%);
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        }
        .fullscreen-compare-slider::after {
            content: '⇔';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: #007bff;
            font-size: 20px;
            font-weight: bold;
            z-index: 1;
        }
        .fullscreen-toggle-buttons {
            position: absolute;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 10px;
            z-index: 100001;
        }
        .fullscreen-toggle-btn {
            background: rgba(74, 74, 74, 0.9);
            color: white;
            border: none;
            padding: 7px 13px;
            border-radius: 4px;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .fullscreen-toggle-btn:hover {
            background: #333;
        }
        .fullscreen-toggle-btn.active {
            background: #007bff;
        }
        .zoom-indicator {
            position: absolute;
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(74, 74, 74, 0.9);
            color: white;
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 14px;
            z-index: 100002;
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.3s;
        }
        .zoom-indicator.show {
            opacity: 1;
        }
        .wamo2-help a {
            color: #1365df;
        }
        #upload-picture {
            display: none;
        }
        .wop-preview {
            display: none;
            height: 13.25vh;
            position: relative;
        }
        .preview {
            height: 100%;
            margin-left: auto;
            margin-right: auto;
        }
        .preview-close-btn {
            position: absolute;
            top: 5px;
            right: 5px;
            width: 20px;
            height: 20px;
            background: rgba(0, 0, 0, 0.6);
            color: white;
            border: none;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: bold;
            z-index: 10;
            transition: all 0.3s ease;
        }
        .preview-close-btn:hover {
            background: rgba(255, 0, 0, 0.8);
            transform: scale(1.1);
        }
        .preview-close-btn:active {
            transform: scale(0.95);
        }
        .hide{
            display: none;
        }
        .wamo-1 {
            overflow-y: scroll;
            scrollbar-width: none;
            -ms-overflow-style: none;
        }
        .wamo-1::-webkit-scrollbar {
            display: none;
        }
        .load-more{
            width: 100%;
            text-align: center;
            margin-top: 1vw;
            color: gray;
        }
        .gen-tab {
            background: #e0e0e0;
            color: black;
            border: none;
            padding: 0.28125vw 0.75vw;
            font-size: 0.525vw;
            font-weight: normal;
            cursor: pointer;
            transition: all 0.3s ease;
            border-radius: 0.28125vw;
            height: auto;
            line-height: 1.2;
        }
        .gen-tab:hover {
            background: #d0d0d0;
        }
        .gen-tab.active {
            background: #333333;
            color: white;
            font-weight: bold;
        }
        .progress {
            position: absolute;
            width: 50%;
            height: 2vw;
            background: #383838;
            border-radius: 0.5vw;
            left: 50%;
            top: 50%;
            margin-top: -1.0vw;
            margin-left: -25%;
            display: none;
            z-index: 9999;
        }
        .progress.active {
            display: block;
        }
        .p-mask {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.6);
            z-index: 10001;
            border-radius: 0.5vw;
        }
        .p-title {
            position: relative;
            z-index: 10002;
            font-size: 1em;
            height: 2vw;
            line-height: 2vw;
            text-align: center;
            color: #ffffff;
            width: 100%;
        }
        .p-bg-progress {
            position: absolute;
            z-index: 10001;
            height: 2vw;
            background: linear-gradient(to right, #0490e8, #1c21d8);
            border-radius: 0.5vw;
            transition: width 0.3s ease;
            width: 0%;
            left: 0;
            top: 0;
        }
        .wr-lists.result{
            height: 100%;
        }
        .wr-lists.result img{
            width: 100%;
            margin-top: auto;
            margin-bottom: auto;
        }
        .floating-buttons {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 10px;
            z-index: 10;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        .wr-lists-box:hover .floating-buttons.show-on-hover {
            opacity: 1;
        }
        .wr-lists-box.draw-layout-active .floating-buttons {
            opacity: 1;
        }
        .floating-buttons.force-hide {
            opacity: 0 !important;
        }
        .floating-btn {
            padding: 8px 16px;
            border-radius: 6px;
            border: none;
            cursor: pointer;
            font-size: 0.467vw;
            color: white;
            font-weight: 500;
            transition: all 0.3s ease;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
            min-width: 60px;
			text-align: center;
			display: inline-flex;
			align-items: center;
			justify-content: center;
			line-height: 1;
        }
        .floating-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        }
        .video-intro-popup {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            z-index: 10000;
            display: flex;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(5px);
        }
        .video-intro-content {
            background: white;
            border-radius: 16px;
            padding: 24px;
            max-width: 400px;
            width: 90%;
            position: relative;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
            animation: videoIntroSlideIn 0.3s ease-out;
        }
        @keyframes videoIntroSlideIn {
            from {
                opacity: 0;
                transform: scale(0.9) translateY(-20px);
            }
            to {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }
        .video-intro-close {
            position: absolute;
            top: -16px;
            right: -16px;
            background: rgba(255, 255, 255, 0.9);
            border: 2px solid #e0e0e0;
            font-size: 20px;
            color: #666;
            cursor: pointer;
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: all 0.2s ease;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        }
        .video-intro-close:hover {
            background: white;
            color: #333;
            border-color: #ccc;
            transform: scale(1.1);
        }
        .video-intro-video {
            width: 100%;
            margin-bottom: 16px;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }
        .video-intro-video video {
            width: 100%;
            height: auto;
            display: block;
        }
        .video-intro-text {
            text-align: center;
            font-size: 16px;
            color: #333;
            margin-bottom: 20px;
            line-height: 1.5;
        }
        .video-intro-btn {
            width: 100%;
            padding: 12px 24px;
            background: linear-gradient(135deg, #4285f4 0%, #8e44ad 100%);
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 16px;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .video-intro-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(66, 133, 244, 0.4);
        }
        @media screen {
            .floating-btn {
                font-size: 0.467vw !important;
                padding: 8px 16px !important;
                min-width: 60px !important;
                display: inline-flex !important;
                align-items: center !important;
                justify-content: center !important;
            }
            .floating-btn .btn-icon {
                width: 1em !important;
                height: 1em !important;
                margin-right: 0.4em !important;
            }
            .new-param-row {
                display: flex !important;
                align-items: center !important;
                justify-content: space-between !important;
                margin-bottom: 0.67vw !important;
            }
            .new-param-label {
                white-space: nowrap !important;
                flex-shrink: 0 !important;
            }
            .new-constraint-buttons {
                display: flex !important;
                gap: 0.5vw !important;
                flex: 1 !important;
                margin-left: 1vw !important;
            }
            .constraint-btn-wrapper {
                flex: 1 !important;
                display: flex !important;
                align-items: center !important;
            }
            .new-constraint-btn {
                flex: 1 !important;
                min-width: 0 !important;
                white-space: nowrap !important;
                overflow: hidden !important;
                text-overflow: ellipsis !important;
            }
            .wam-op .new-panel-title.screenshot-title-gap {
                position: sticky !important;
                top: 0 !important;
                background-color: white !important;
                z-index: 10 !important;
                padding-top: 0.33em !important;
                padding-bottom: 0.55vw !important;
                margin-bottom: 0 !important;
                flex-shrink: 0 !important;
                margin-top: 0 !important;
            }
        }
        @media (max-width: 768px) {
            .video-intro-content {
                max-width: 350px;
                padding: 20px;
            }
            .video-intro-text {
                font-size: 14px;
            }
            .video-intro-btn {
                font-size: 14px;
                padding: 10px 20px;
            }
        }
        .btn-icon {
            width: 12px;
            height: 12px;
            margin-right: 5px;
			display: inline-block;
			vertical-align: middle;
			position: static;
			top: 0;
        }
        .compare-btn {
            background: #333333;
        }
        .compare-btn:hover {
            background: #555555;
        }
        .compare-btn.active {
            background: #007bff;
        }
        .compare-btn.active:hover {
            background: #0056b3;
        }
        .download-btn {
            background: #333333;
        }
        .download-btn:hover {
            background: #555555;
        }
        .draw-btn {
            background: #333333;
        }
        .draw-btn:hover {
            background: #555555;
        }
        .draw-btn.active {
            background: #28a745;
        }
        .draw-btn.active:hover {
            background: #218838;
        }
        .draw-btn.hidden {
            display: none;
        }
        .draw-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 20;
        }
        .draw-overlay.active {
            pointer-events: all;
            cursor: crosshair;
        }
        .annotation-box {
            position: absolute;
            background: rgba(0, 0, 0, 0.5);
            border: 2px solid #fff;
            border-radius: 8px;
            cursor: move;
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 150px;
            min-height: 75px;
            color: white;
            font-size: 30px;
            font-weight: bold;
            text-align: center;
            padding: 8px;
            box-sizing: border-box;
            z-index: 25;
            pointer-events: all;
        }
        .annotation-box:hover {
            border-color: #007bff;
        }
        .resize-handle {
            position: absolute;
            bottom: -4px;
            right: -4px;
            width: 12px;
            height: 12px;
            background: #007bff;
            border: 2px solid #fff;
            border-radius: 50%;
            cursor: se-resize;
            z-index: 25;
            opacity: 0;
            transition: opacity 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .resize-handle::before {
            content: '';
            width: 6px;
            height: 6px;
            background: linear-gradient(-45deg, transparent 40%, white 40%, white 60%, transparent 60%);
            border-radius: 1px;
        }
        .annotation-box:hover .resize-handle {
            opacity: 1;
        }
        .delete-handle {
            position: absolute;
            top: -8px;
            right: -8px;
            width: 20px;
            height: 20px;
            background: #dc3545;
            border: 2px solid #fff;
            border-radius: 50%;
            cursor: pointer;
            z-index: 25;
            opacity: 0;
            transition: opacity 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: bold;
            color: white;
            line-height: 1;
        }
        .annotation-box:hover .delete-handle {
            opacity: 1;
        }
        .delete-handle:hover {
            background: #c82333;
            transform: scale(1.1);
        }
        .annotation-input {
            background: transparent;
            border: none;
            color: white;
            font-size: 30px;
            font-weight: bold;
            text-align: center;
            width: 100%;
            outline: none;
            resize: none;
            cursor: text;
            pointer-events: all;
        }
        .annotation-input::placeholder {
            color: rgba(255, 255, 255, 0.7);
        }
        .draw-hint {
            position: absolute;
            bottom: 80px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0, 123, 255, 0.9);
            color: white;
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 500;
            z-index: 15;
            display: none;
        }
        .draw-hint.show {
            display: block;
        }
        @media (max-width: 1400px) {
            .web-ai-main {
                padding: 0 0.5vw;
            }
            .wam-op {
                width: 20vw;
                min-width: 280px;
                margin-top: 1vw;
                margin-bottom: 1vw;
                margin-right: 0.5vw;
                height: calc(100vh - 2vw - 68px);
            }
            .wam-result {
                width: 50vw;
                margin-top: 1vw;
                margin-bottom: 1vw;
                height: calc(100vh - 2vw - 68px);
            }
            .video-modal {
                width: 46vw;
                left: 52vw;
                top: 50%;
                transform: translateY(-50%);
            }
        }
        @media (max-width: 1000px) {
            .upload-tip-main {
                font-size: 1vw;
            }
            .ref-upload-container .upload-tips {
                margin-top: 2.4vw;
            }
        }
        @media (max-width: 900px) {
            .web-ai-main {
                padding: 0 0.25vw;
            }
            .wam-op {
                width: 20vw;
                min-width: 250px;
                margin-top: 1vw;
                margin-bottom: 1vw;
                margin-right: 0.5vw;
                height: calc(100vh - 2vw - 68px);
            }
            .wam-result {
                width: 50vw;
                margin-top: 1vw;
                margin-bottom: 1vw;
                height: calc(100vh - 2vw - 68px);
            }
        }
        @media (max-width: 768px) {
            .web-ai-main {
                flex-direction: column;
                width: 100%;
                padding: 0 1vw;
            }
            .wam-op {
                width: 100%;
                margin-right: 0;
                margin-bottom: 2vw;
                height: auto;
                min-height: auto;
                padding: 3vw;
            }
            .wam-result {
                width: 100%;
                margin-top: 0;
                height: 60vh;
            }
            .floating-btn {
                font-size: 8px;
                padding: 6px 12px;
                min-width: 50px;
            }
            .video-modal {
                width: 95%;
                left: 2.5%;
                top: 50%;
                transform: translateY(-50%);
                padding: 16px;
                max-width: none;
            }
            .video-prompt-input {
                height: 60px;
                font-size: 12px;
            }
            .video-controls-row {
                flex-direction: column;
                gap: 12px;
            }
            .video-dropdown-btn {
                padding: 10px 16px;
                font-size: 12px;
            }
            .video-generate-btn {
                padding: 10px 24px;
                font-size: 14px;
            }
            .video-dropdown-btn,
            .video-generate-btn {
                height: 40px;
            }
            .floating-buttons {
                gap: 10px;
                bottom: 15px;
            }
            .draw-hint {
                bottom: 70px;
                font-size: 10px;
                padding: 6px 12px;
            }
            .new-panel-title {
                font-size: 3vw;
            }
            .new-upload-container {
                aspect-ratio: 10/9;
                padding: 2vw;
            }
            .ref-upload-container .new-upload-container {
                aspect-ratio: 1.5/1.25;
                min-height: 112.5px;
                max-height: 135px;
                padding: 1.5vw;
            }
            .ref-upload-container .new-upload-default {
                justify-content: center;
                align-items: center;
                height: 100%;
                padding: 3vw 0 0 0;
                gap: 2vw;
            }
            .ref-upload-container .upload-buttons {
                justify-content: center;
                margin: 0;
                transform: translateY(-1.5vw);
            }
            .ref-upload-container .new-upload-tip {
                font-size: 1.8vw;
                margin-top: 0;
                position: absolute;
                bottom: 1.5vw;
                left: 50%;
                transform: translateX(-50%);
                text-align: center;
                width: 90%;
            }
            .new-upload-btn {
                font-size: 2.5vw;
                padding: 1.5vw 2.5vw;
                min-width: auto;
                white-space: nowrap;
                gap: 0.6vw;
            }
            .new-upload-tip {
                font-size: 2vw;
            }
            .example-img {
                width: 15vw;
                height: 10vw;
            }
            .new-close-btn {
                width: 7.5vw;
                height: 7.5vw;
                font-size: 3.75vw;
                top: 1vw;
                right: 1vw;
            }
            .new-param-label {
                font-size: 2.5vw;
            }
            .new-constraint-btn {
                font-size: 2vw;
                padding: 1.5vw 2.5vw;
            }
            .new-style-btn {
                font-size: 2vw;
                padding: 1.5vw 2vw;
                width: calc(50% - 0.25vw);
                box-sizing: border-box;
            }
            .new-switch-label {
                width: 45px;
                height: 11.25px;
            }
            .new-switch-label::after {
                width: 22.5px;
                height: 11.25px;
                top: 0;
                left: 0;
            }
            .new-switch input[type="checkbox"]:checked + .new-switch-label::after {
                transform: translateX(22.5px);
            }
            .new-prompt-input {
                font-size: 2vw;
            }
            .new-prompt-input.show {
                max-height: 60vh;
            }
            .wamo2-help {
                font-size: 2.5vw;
            }
            .wo-picture {
                height: 15vh;
                margin-top: 2vw;
            }
            .wo-picture .upload-buttons {
                flex-direction: column;
                gap: 1vw;
            }
            .wo-picture .upload-btn {
                font-size: 2.5vw;
                padding: 1.5vw 2vw;
                min-width: 80%;
            }
            .wo-picture .upload-tip-main {
                font-size: 2vw;
            }
            .ref-upload-container .upload-tips {
                margin-top: 4.8vw;
            }
        }
        @media (max-width: 1000px) and (min-width: 769px) {
            .wo-title.head {
                font-size: 0.9vw;
            }
            .wsbi > div {
                font-size: 0.7vw;
            }
            .wop-title {
                font-size: 0.8vw;
                width: 5vw;
            }
            .wop-param {
                font-size: 0.8vw;
            }
        }
        .image-compare-container {
            position: relative;
            width: 100%;
            height: 100%;
            max-width: 100%;
            margin: 0 auto;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), 0 4px 16px rgba(0, 0, 0, 0.15);
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .image-compare-container img {
            width: 100%;
            height: 100%;
            display: block;
            object-fit: contain;
        }
        .compare-image-before,
        .compare-image-after {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .compare-image-before {
            z-index: 1;
        }
        .compare-image-after {
            z-index: 2;
            clip-path: inset(0 0 0 50%);
        }
        .compare-image-before img,
        .compare-image-after img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            max-width: 100%;
            max-height: 100%;
        }
        .compare-slider {
            position: absolute;
            top: 0;
            left: 50%;
            width: 4px;
            height: 100%;
            background: #fff;
            cursor: ew-resize;
            z-index: 3;
            transform: translateX(-50%);
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.4), 0 0 8px rgba(0, 0, 0, 0.6);
        }
        .compare-slider::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 40px;
            height: 40px;
            background: #fff;
            border: 3px solid #007bff;
            border-radius: 50%;
            transform: translate(-50%, -50%);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
        }
        .compare-slider::after {
            content: '⇔';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: #007bff;
            font-size: 16px;
            font-weight: bold;
            z-index: 1;
        }
        .compare-labels {
            position: absolute;
            bottom: 20px;
            left: 20px;
            right: 20px;
            display: flex;
            justify-content: space-between;
            z-index: 4;
            pointer-events: none;
        }
        .compare-label {
            background: rgba(0, 0, 0, 0.8);
            color: white;
            padding: 6px 12px;
            border-radius: 15px;
            font-size: 12px;
            font-weight: 500;
            backdrop-filter: blur(5px);
            border: 1px solid rgba(255, 255, 255, 0.2);
        }
        .compare-instructions {
            text-align: center;
            margin-bottom: 20px;
            color: #666;
            font-size: 14px;
        }
        .example-hint {
            position: absolute;
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0, 123, 255, 0.9);
            color: white;
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 500;
            z-index: 5;
            animation: fadeInOut 3s ease-in-out;
        }
        @keyframes fadeInOut {
            0%, 100% { opacity: 0; }
            20%, 80% { opacity: 1; }
        }
        /* draw feature hidden */
        .draw-layout-ele,
        .draw-layout-ele.show,
        .draw-btn,
        .draw-overlay,
        .draw-hint {
            display: none !important;
        }
        .new-panel-title {
            font-size: .8vw;
            font-weight: bold;
            color: #333;
            margin-bottom: 1vw;
        }
        .new-panel-title:first-child {
            margin-top: 12px;
        }
        .new-upload-container {
            background: #f8f8f8;
            border: 2px dashed #ccc;
            border-radius: 0.8vw;
            padding: 1.5vw;
            width: 100%;
            aspect-ratio: 10/9;
            position: relative;
            overflow: hidden;
        }
        #uploadContainer {
            flex-shrink: 0;
        }
        .new-upload-container:hover {
            border-color: #007bff;
        }
        .ref-upload-container .new-upload-container {
            aspect-ratio: auto;
            height: clamp(108px, 12.6vh, 162px);
            min-height: initial;
            max-height: initial;
            padding: 1vw;
        }
        .ref-upload-container .new-upload-default {
            gap: 1.5vw;
            justify-content: center;
            align-items: center;
            height: 100%;
            padding: 1vw 0 0 0;
        }
            .ref-upload-container .upload-buttons {
                margin: 0;
                justify-content: center;
                position: relative;
                z-index: 1;
                transform: translateY(-0.35vw);
            }
            .ref-upload-container .ref-buttons-wrap {
                display: inline-flex;
                flex-direction: column;
                align-items: center;
                width: max-content;
                gap: 0.6vw;
                position: relative;
            }
            .ref-upload-container .new-upload-tip {
                font-size: 0.45vw;
                line-height: 1.2;
                margin-top: 0.3vw;
                position: absolute;
                bottom: 0.6vw;
                left: 50%;
                transform: translateX(-50%);
                text-align: center;
                width: 100%;
                z-index: 0;
            }
        .new-upload-default {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100%;
        }
        .new-upload-btn {
            background: #fff;
            border: 1px solid #ddd;
            border-radius: 0.4vw;
            padding: 0.3vw 0.7vw;
            font-size: .6vw;
            color: #333;
            display: flex;
            align-items: center;
            gap: 0.2vw;
            cursor: pointer;
            margin-bottom: 0.8vw;
            transition: all 0.2s ease;
            min-width: auto;
            white-space: nowrap;
            justify-content: center;
        }
        .new-upload-btn:hover {
            background: #f5f5f5;
            border-color: #007bff;
        }
        .upload-tips {
            text-align: center;
            color: #999;
            margin-top: 1.13vw;
        }
        .upload-tip-main {
            font-size: 0.45vw;
            line-height: 1.4;
        }
        .new-upload-tip {
            color: #999;
            font-size: .55vw;
            margin-bottom: 1vw;
            text-align: center;
        }
        .new-examples {
            display: flex;
            gap: 0.3vw;
            justify-content: center;
        }
        .example-img {
            width: 2.8vw;
            height: 2vw;
            object-fit: cover;
            border-radius: 0.25vw;
            cursor: pointer;
            opacity: 0.7;
            transition: all 0.2s ease;
            border: 1px solid #ddd;
        }
        .example-img:hover {
            opacity: 1;
            transform: scale(1.05);
            border-color: #007bff;
        }
        .new-upload-preview {
            position: absolute;
            inset: 0.6vw;
            background: #fff;
            border-radius: 0.6vw;
            overflow: hidden;
            box-sizing: border-box;
        }
        .new-close-btn {
            position: absolute;
            top: 0.5vw;
            right: 0.5vw;
            width: 1.875vw;
            height: 1.875vw;
            background: rgba(0, 0, 0, 0.6);
            color: white;
            border: none;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1vw;
            font-weight: bold;
            z-index: 10;
            transition: all 0.2s ease;
        }
        .new-close-btn:hover {
            background: rgba(255, 0, 0, 0.8);
            transform: scale(1.1);
        }
        .new-param-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.67vw;
        }
        .new-param-label {
            font-size: .7vw;
            color: #333;
            font-weight: 500;
        }
        .new-constraint-buttons {
            display: flex;
            gap: 0.5vw;
        }
        .new-style-buttons {
            display: flex;
            gap: 0.5vw;
            width: 100%;
        }
        .new-constraint-btn {
            background: #f5f5f5;
            border: 2px solid #ddd;
            border-radius: 0.4vw;
            padding: 0.32vw 0.8vw;
            font-size: .7vw;
            color: #666;
            cursor: pointer;
            font-weight: 500;
            position: relative;
            overflow: hidden;
            transition: background-color 0.25s ease, 
                        border-color 0.25s ease, 
                        color 0.25s ease,
                        font-weight 0.25s ease,
                        transform 0.15s ease;
            will-change: background-color, border-color, color, font-weight;
        }
        .new-constraint-btn:hover {
            background: #e9ecef;
            border-color: #bbb;
        }
        .new-constraint-btn.active {
            background: #fff;
            border-color: #333;
            color: #000;
            font-weight: 600;
        }
        .new-constraint-btn:disabled {
            pointer-events: none;
            opacity: 1;
        }
        .new-style-btn {
            background: #f5f5f5;
            border: 2px solid #ddd;
            border-radius: 0.4vw;
            padding: 0.32vw 0.8vw;
            font-size: .7vw;
            color: #666;
            cursor: pointer;
            font-weight: 500;
            position: relative;
            overflow: hidden;
            transition: background-color 0.25s ease, 
                        border-color 0.25s ease, 
                        color 0.25s ease,
                        font-weight 0.25s ease,
                        transform 0.15s ease;
            will-change: background-color, border-color, color, font-weight;
            width: calc(50% - 0.25vw);
            box-sizing: border-box;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .new-style-btn .api-badge {
            position: absolute;
            top: -0.25vw;
            left: calc(-0.325vw - 2ch);
            padding: 0.075vw 0.525vw 0.075vw calc(0.525vw + 2ch);
            height: 1.05vw;
            pointer-events: none;
            line-height: 0.9vw;
            background: linear-gradient(90deg, #22c55e, #2563eb);
            color: #fff;
            border-radius: 999px;
            font-weight: 700;
            font-size: 0.45vw;
            letter-spacing: 0.02em;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        .new-style-btn .new-badge {
            position: absolute;
            top: -0.25vw;
            left: calc(-0.325vw - 2.5ch);
            padding: 0.075vw 0.525vw 0.075vw calc(0.525vw + 2.5ch);
            height: 1.05vw;
            line-height: 0.9vw;
            background: linear-gradient(90deg, #ff6b35, #ffd700);
            color: #fff;
            border-radius: 999px;
            font-weight: 700;
            font-size: 0.45vw;
            letter-spacing: 0.02em;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            pointer-events: auto;
        }
        .new-style-btn:hover {
            background: #e9ecef;
            border-color: #bbb;
        }
        .new-style-btn.active {
            background: #fff;
            border-color: #333;
            color: #000;
            font-weight: 600;
        }
        .new-style-btn:disabled {
            pointer-events: none;
            opacity: 1;
        }
        .new-switch {
            position: relative;
        }
        .new-switch input[type="checkbox"] {
            display: none;
        }
        .new-switch-label {
            display: block;
            width: 45px;
            height: 11.25px;
            background: #d9d9d9;
            border-radius: 11.25px;
            cursor: pointer;
            position: relative;
            transition: background-color 0.3s;
        }
        .new-switch-label::after {
            content: '';
            position: absolute;
            width: 22.5px;
            height: 11.25px;
            background: #1256e0;
            border-radius: 11.25px;
            top: 0;
            left: 0;
            transition: transform 0.3s;
        }
        .new-switch input[type="checkbox"]:checked + .new-switch-label {
            background: #d9d9d9;
        }
        .new-switch input[type="checkbox"]:checked + .new-switch-label::after {
            transform: translateX(22.5px);
        }
        .new-switch input[type="checkbox"]:disabled + .new-switch-label {
            cursor: not-allowed;
            opacity: 0.6;
        }
        .new-switch input[type="checkbox"]:disabled + .new-switch-label::after {
            background: #666;
        }
        .new-param-label.disabled {
            color: #999;
            cursor: not-allowed !important;
        }
        .new-prompt-input {
            background: #f0f0f0;
            width: 100%;
            height: 12vh;
            min-height: 12vh;
            padding: .5vw;
            border-radius: .3vw;
            border: none;
            font-size: .6vw;
            color: #333;
            resize: vertical;
            margin-top: .25vw;
            max-height: 0;
            opacity: 0;
            overflow-y: auto;
            transition: none;
            display: none;
        }
        .new-prompt-input.show {
            max-height: 60vh;
            opacity: 1;
            display: block;
        }
        .new-prompt-input.compact-height {
            height: 8vh;
            min-height: 8vh;
        }
        .prompt-inline {
            background: #f0f0f0;
            width: 100%;
            padding: .5vw;
            border-radius: .3vw .3vw 0 0;
            border: none;
            font-size: .6vw;
            color: #999;
            display: none;
            margin-top: .25vw;
            margin-bottom: 0;
            box-sizing: border-box;
        }
        .new-prompt-input.with-inline {
            border-top-left-radius: 0;
            border-top-right-radius: 0;
            margin-top: 0;
            padding-top: .2vw;
        }
        .new-prompt-input::placeholder {
            color: #999;
        }
        .prompt-inline.tight-gap {
            padding-bottom: .1vw;
        }
        .prompt-inline {
            position: relative;
        }
        .model-tip-bubble {
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            margin-top: .3vw;
            background: #333;
            color: #fff;
            padding: .35vw .6vw;
            border-radius: .3vw;
            font-size: .6vw;
            white-space: nowrap;
            display: none;
            align-items: center;
            gap: .5vw;
            z-index: 100;
            box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        }
        .model-tip-bubble::before {
            content: '';
            position: absolute;
            top: -.3vw;
            left: 50%;
            transform: translateX(-50%);
            border-left: .35vw solid transparent;
            border-right: .35vw solid transparent;
            border-bottom: .35vw solid #333;
        }
        .model-tip-bubble.show {
            display: flex;
        }
        .model-tip-bubble .tip-text {
            color: #fff;
        }
        .model-tip-bubble .tip-btn {
            background: #fff;
            color: #333;
            border: none;
            padding: .2vw .5vw;
            border-radius: .2vw;
            font-size: .55vw;
            cursor: pointer;
            font-weight: 500;
            transition: background 0.2s;
        }
        .model-tip-bubble .tip-btn:hover {
            background: #f0f0f0;
        }
        @keyframes chip-pulse {
            0%, 100% {
                box-shadow: 0 0 0 0 rgba(18, 86, 224, 0.4);
            }
            50% {
                box-shadow: 0 0 0 6px rgba(18, 86, 224, 0);
            }
        }
        .space-type-chip {
            display: inline-flex;
            align-items: center;
            gap: 0.4vw;
            padding: .1vw .8vw;
            border-radius: 999px;
            background: #ffffff;
            color: #1256e0;
            cursor: pointer;
            border: 1.5px solid #1256e0;
            transition: all 0.2s ease;
            box-shadow: 0 1px 3px rgba(18, 86, 224, 0.15);
            vertical-align: baseline;
            animation: chip-pulse 1.5s ease-in-out 3;
        }
        .space-type-chip:hover {
            background: #f8f9fa;
            box-shadow: 0 2px 6px rgba(18, 86, 224, 0.25);
            border-color: #0d47c9;
        }
        .space-type-chip .space-icon {
            width: 1em;
            height: 1em;
            flex-shrink: 0;
        }
        .space-type-chip .dropdown-arrow {
            width: 0.6em;
            height: 0.6em;
            flex-shrink: 0;
            opacity: 0.6;
            transition: transform 0.2s ease;
        }
        .space-type-chip:hover .dropdown-arrow {
            opacity: 1;
        }
        .space-type-menu {
            position: absolute;
            background: #fff;
            border: 1px solid #e5e5e5;
            border-radius: .3vw;
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
            padding: .25vw 0;
            display: none;
            z-index: 10;
			box-sizing: border-box;
        }
        .space-type-menu.has-groups {
            flex-direction: row;
            gap: 0;
            width: auto !important;
            min-width: auto !important;
            padding: .5vw .4vw;
        }
        .space-type-menu .menu-group {
            flex: 1;
            min-width: 8vw;
            display: flex;
            flex-direction: column;
        }
        .space-type-menu .menu-group:not(:first-child) {
            border-left: 1px solid #e5e5e5;
            padding-left: .6vw;
            margin-left: .6vw;
        }
        .space-type-menu .menu-group-label {
            padding: .3vw .6vw .25vw .6vw;
            font-size: .55vw;
            color: #999;
            font-weight: 600;
            white-space: nowrap;
            user-select: none;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: .25vw;
            text-align: center;
            margin-bottom: .2vw;
        }
        .space-type-menu .menu-group-label .group-icon {
            width: 1em;
            height: 1em;
            flex: 0 0 auto;
            opacity: .9;
        }
        .space-type-menu .menu-item {
            padding: .4vw .6vw;
            font-size: .6vw;
            cursor: pointer;
            white-space: nowrap;
            transition: background 0.15s ease;
            border-radius: .2vw;
            margin: .1vw .2vw;
        }
        .space-type-menu:not(.has-groups) .menu-item {
            padding: .35vw .75vw;
            margin: 0;
            border-radius: 0;
        }
        .space-type-menu .menu-item:hover {
            background: #f0f7ff;
            color: #1256e0;
        }
        .space-type-menu:not(.has-groups) .menu-item:hover {
            background: #f5f5f5;
            color: inherit;
        }
        .upload-buttons {
            display: flex;
            flex-direction: row;
            gap: 0.4vw;
            justify-content: center;
            align-items: center;
            margin-bottom: 0.8vw;
        }
        .wo-picture {
            height: 13.25vh;
            font-size: .6vw;
            display: flex;
            flex-direction: column;
            justify-content: center;
            text-align: center;
            background: #f0f0f0;
            border-radius: .6vw;
            color: #adacac;
            margin-top: .333vw;
            flex-shrink: 0;
            border: 2px dashed #ddd;
        }
        .wo-picture:hover {
            border-color: #007bff;
        }
        .wo-picture .wop-op {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100%;
        }
        .wo-picture .wop-preview {
            display: none;
            height: 13.25vh;
            position: relative;
        }
        .wo-picture .preview {
            height: 100%;
            margin-left: auto;
            margin-right: auto;
        }
        .material-library-modal {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            border-radius: 0.6vw;
        }
        .material-library-modal.show {
            display: flex;
        }
        .modal-content {
            background: white;
            border-radius: 0.5vw;
            width: 95%;
            height: auto;
            max-width: 700px;
            max-height: 120vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        }
        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1vw;
            border-bottom: 1px solid #eee;
            background: #f8f9fa;
            border-radius: 0.5vw 0.5vw 0 0;
        }
        .modal-title {
            font-size: 0.8vw;
            font-weight: bold;
            color: #333;
        }
        .modal-close {
            background: none;
            border: none;
            font-size: 1.2vw;
            cursor: pointer;
            color: #666;
            width: 2vw;
            height: 2vw;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: all 0.2s ease;
        }
        .modal-close:hover {
            background: #f0f0f0;
            color: #333;
        }
        .modal-tabs {
            display: flex;
            border-bottom: 1px solid #eee;
            background: #f8f9fa;
        }
        .modal-tab {
            flex: 1;
            padding: 0.8vw;
            text-align: center;
            font-size: 0.65vw;
            cursor: pointer;
            border: none;
            background: none;
            color: #666;
            transition: all 0.2s ease;
            border-bottom: 2px solid transparent;
        }
        .modal-tab.active {
            color: #007bff;
            border-bottom-color: #007bff;
            background: white;
        }
        .modal-tab:hover {
            color: #007bff;
            background: rgba(0, 123, 255, 0.05);
        }
        .modal-body {
            flex: 1;
            overflow: visible;
            padding: 1vw;
            min-height: auto;
        }
        .tab-content {
            display: none;
        }
        .tab-content.active {
            display: block;
        }
        .material-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 0.6vw;
            padding: 0.3vw;
            max-height: none;
        }
        .material-item {
            aspect-ratio: 1;
            border-radius: 0.3vw;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.3s ease;
            border: 2px solid transparent;
            background: #f5f5f5;
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 80px;
        }
        .material-item:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            border-color: #007bff;
        }
        .material-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
        #refMaterialModal .modal-body::-webkit-scrollbar {
            width: 8px;
        }
        #refMaterialModal .modal-body::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 4px;
        }
        #refMaterialModal .modal-body::-webkit-scrollbar-thumb {
            background: #c1c1c1;
            border-radius: 4px;
        }
        #refMaterialModal .modal-body::-webkit-scrollbar-thumb:hover {
            background: #a1a1a1;
        }
        .material-placeholder {
            color: #999;
            font-size: 0.5vw;
            text-align: center;
        }
        #pasteBtn {
            position: relative;
        }
        #pasteBtn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }
        #pasteBtn:disabled:hover {
            background-color: #f5f5f5 !important;
            border-color: #ddd !important;
            transform: none !important;
        }
        .upload-btn {
            display: flex;
            align-items: center;
            gap: 0.2vw;
            padding: 0.3vw 0.6vw;
            border-radius: 0.25vw;
            border: none;
            font-size: 0.55vw;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            min-width: auto;
            justify-content: center;
            flex: 0 0 auto;
            white-space: nowrap;
        }
        .upload-btn svg {
            width: 0.5vw;
            height: 0.5vw;
        }
        .upload-btn-primary {
            background-color: #f5f5f5;
            color: #333;
            border: 1px solid #ddd;
        }
        .upload-btn-primary:hover {
            background-color: #e9e9e9;
            border-color: #ccc;
        }
        .upload-btn-secondary {
            background-color: #f5f5f5;
            color: #333;
            border: 1px solid #ddd;
        }
        .upload-btn-secondary:hover {
            background-color: #e9e9e9;
            border-color: #ccc;
        }
        .upload-tips {
            text-align: center;
            color: #999;
        }
        .upload-tip-main {
            font-size: 0.45vw;
            line-height: 1.4;
            margin-bottom: 0.2vw;
        }
        .upload-tip-format {
            font-size: 0.4vw;
            color: #bbb;
        }
        .comparison-container {
            position: relative;
            height: 100%;
            width: 100%;
        }
        .image-comparison {
            position: relative;
            width: 100%;
            height: 100%;
            overflow: hidden;
            border-radius: 12px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), 0 4px 16px rgba(0, 0, 0, 0.15);
        }
        .comparison-image {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }
        .comparison-image img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            display: block;
            margin-top: auto;
            margin-bottom: auto;
        }
        .comparison-after {
            clip-path: inset(0 0 0 50%);
            transition: clip-path 0.1s ease;
        }
        .comparison-slider {
            position: absolute;
            top: 0;
            left: 50%;
            width: 2px;
            height: 100%;
            background: #007bff;
            cursor: ew-resize;
            z-index: 10;
            transform: translateX(-50%);
            box-shadow: 0 0 20px rgba(0, 123, 255, 0.5), 0 0 8px rgba(0, 0, 0, 0.6);
        }
        .comparison-slider::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 40px;
            height: 40px;
            background: #007bff;
            border: 3px solid white;
            border-radius: 50%;
            transform: translate(-50%, -50%);
            cursor: ew-resize;
            box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4), 0 4px 16px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
        }
        .comparison-slider::after {
            content: '↔';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-size: 16px;
            font-weight: bold;
            pointer-events: none;
            z-index: 1;
        }
        .comparison-labels {
            position: absolute;
            top: 10px;
            width: 100%;
            display: flex;
            justify-content: space-between;
            padding: 0 20px;
            z-index: 5;
        }
        .comparison-label {
            background: rgba(0,0,0,0.7);
            color: white;
            padding: 5px 10px;
            border-radius: 15px;
            font-size: 0.6vw;
            font-weight: bold;
        }
        @media (max-width: 768px) {
            .modal-content {
                width: 98%;
                height: auto;
                max-height: 95vh;
            }
            .modal-title {
                font-size: 1.2vw;
            }
            .modal-close {
                font-size: 1.8vw;
                width: 3vw;
                height: 3vw;
            }
            .modal-tab {
                font-size: 1vw;
                padding: 1.2vw;
            }
            .material-grid {
                gap: 1vw;
                padding: 0.5vw;
            }
            .material-item {
                min-height: 60px;
            }
            .material-placeholder {
                font-size: 0.8vw;
            }
            .modal-body {
                padding: 0.8vw;
            }
        }
        .prompt-row {
            min-height: 1.25vw;
            height: 1.25vw;
            margin-bottom: 0.25vw !important;
        }
        .param-title-gap {
            margin-bottom: 0.55vw !important;
        }
        .wamo-1 > .new-panel-title.param-title-gap {
            position: static !important;
            top: auto !important;
            background: transparent !important;
            z-index: auto !important;
        }
        .screenshot-title-gap {
            margin-bottom: 0.55vw !important;
        }
        .wamo-1 > .new-panel-title.screenshot-title-gap {
            position: -webkit-sticky !important;
            position: sticky !important;
            top: 0 !important;
            z-index: 10 !important;
            background-color: #fff !important;
            margin-top: 0 !important;
            padding-top: 0.33em !important;
            will-change: transform !important;
        }
        .custom-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 9999;
        }
        .custom-modal-content {
            background: white;
            border-radius: 16px;
            padding: 0;
            max-width: 420px;
            width: 88%;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            animation: modalFadeIn 0.3s ease-out;
            min-height: auto;
        }
        @keyframes modalFadeIn {
            from {
                opacity: 0;
                transform: scale(0.8) translateY(-20px);
            }
            to {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }
        .custom-modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 24px 16px 24px;
            border-bottom: none;
        }
        .custom-modal-header h3 {
            margin: 0;
            font-size: 17px;
            font-weight: 500;
            color: #333;
        }
        .custom-modal-close {
            background: none;
            border: none;
            font-size: 22px;
            color: #999;
            cursor: pointer;
            padding: 0;
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: all 0.2s ease;
        }
        .custom-modal-close:hover {
            background-color: #f8f9fa;
            color: #495057;
        }
        .custom-modal-body {
            padding: 0 24px 20px 24px;
        }
        .custom-modal-body p {
            margin: 0;
            font-size: 16px;
            line-height: 1.5;
            color: #666;
            text-align: left;
        }
        .custom-modal-footer {
            padding: 0 24px 24px 24px;
            display: flex;
            justify-content: flex-end;
            gap: 12px;
        }
        .custom-modal-btn {
            background: linear-gradient(to right, #1890ff, #40a9ff);
            color: white;
            border: none;
            padding: 12px 32px;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 2px 4px rgba(24, 144, 255, 0.3);
            min-width: 80px;
        }
        .custom-modal-btn:hover {
            background: linear-gradient(to right, #096dd9, #1890ff);
            box-shadow: 0 3px 8px rgba(24, 144, 255, 0.4);
        }
        .custom-modal-btn:active {
            transform: translateY(0);
        }
        .custom-modal-btn.secondary {
            background: #6c757d;
            box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
        }
        .custom-modal-btn.secondary:hover {
            background: #5a6268;
            box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
        }
        .custom-toast {
            position: fixed;
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
            background: white;
            color: #495057;
            padding: 16px 24px;
            border-radius: 8px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
            z-index: 10000;
            font-size: 16px;
            font-weight: 500;
            animation: toastSlideIn 0.3s ease-out;
            max-width: 400px;
            min-width: 200px;
            text-align: center;
            border-left: 4px solid #0491e8;
        }
        .custom-toast.success {
            border-left-color: #28a745;
        }
        .custom-toast.error {
            border-left-color: #dc3545;
        }
        .custom-toast.warning {
            border-left-color: #ffc107;
        }
        .custom-toast.loading {
            border-left-color: #6c757d;
        }
        @keyframes toastSlideIn {
            from {
                opacity: 0;
                transform: translateX(-50%) translateY(-20px);
            }
            to {
                opacity: 1;
                transform: translateX(-50%) translateY(0);
            }
        }
        @keyframes toastSlideOut {
            from {
                opacity: 1;
                transform: translateX(-50%) translateY(0);
            }
            to {
                opacity: 0;
                transform: translateX(-50%) translateY(-20px);
            }
        }
        .edit-btn {
            background: linear-gradient(135deg, #F5A623 0%, #F7C948 100%);
        }
        .edit-btn:hover {
            background: linear-gradient(135deg, #E09410 0%, #E5B830 100%);
            box-shadow: 0 4px 12px rgba(245, 166, 35, 0.3);
        }
        .edit-btn.disabled {
            background: #cccccc;
            cursor: not-allowed;
            opacity: 0.6;
        }
        .edit-btn.disabled:hover {
            background: #cccccc;
            transform: none;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        }
        .image-edit-modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            display: none;
            z-index: 10000;
            backdrop-filter: blur(2px);
        }
        .image-edit-modal {
            position: fixed;
            width: calc(20vw + 1vw + 50vw + 2vw);
            height: calc(100vh - 4vw - 68px + 2vw);
            left: 50%;
            top: calc(50% + 45px);
            transform: translate(-50%, -50%);
            background: #8c8c8c;
            border-radius: 1.2vw;
            overflow: visible;
            display: flex;
            flex-direction: row;
            gap: 1vw;
            padding: 1vw;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
            animation: imageEditModalSlideIn 0.3s ease-out;
        }
        @keyframes imageEditModalSlideIn {
            from {
                opacity: 0;
                transform: translate(-50%, -50%) scale(0.95);
            }
            to {
                opacity: 1;
                transform: translate(-50%, -50%) scale(1);
            }
        }
        .image-edit-modal-close {
            position: absolute;
            top: -1.2vw;
            right: -1.2vw;
            width: 2.4vw;
            height: 2.4vw;
            min-width: 32px;
            min-height: 32px;
            background: #4a4a4a;
            border: none;
            border-radius: 50%;
            font-size: 1.2vw;
            color: white;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 100;
            transition: all 0.2s ease;
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
        }
        .image-edit-modal-close:hover {
            background: #666666;
            color: white;
            transform: scale(1.1);
        }
        .image-edit-sidebar {
            width: 20vw;
            min-width: 320px;
            background: white;
            border-radius: 0.8vw;
            padding: 1.5vw;
            display: flex;
            flex-direction: column;
            gap: 0.5vw;
            overflow-y: auto;
            flex-shrink: 0;
        }
        .image-edit-func-btn {
            width: 100%;
            padding: 0.7vw 1vw;
            background: #f5f5f5;
            border: 2px solid transparent;
            border-radius: 0.5vw;
            font-size: 0.7vw;
            font-weight: 500;
            color: #333;
            cursor: pointer;
            text-align: center;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5vw;
            min-height: 2.2vw;
        }
        .image-edit-func-btn:hover {
            background: #eee;
            border-color: #ddd;
        }
        .image-edit-func-btn.active {
            background: white;
            border-color: #ff8c00;
            color: #ff8c00;
            font-weight: 600;
            box-shadow: 0 2px 8px rgba(255, 140, 0, 0.15);
        }
        .image-edit-func-btn.active .func-icon {
            stroke: #ff8c00;
        }
        .func-icon {
            width: 1vw;
            height: 1vw;
            min-width: 14px;
            min-height: 14px;
            stroke: #333;
            stroke-width: 2;
            fill: none;
            flex-shrink: 0;
        }
        .image-edit-preview {
            width: 50vw;
            background: white;
            border-radius: 0.8vw;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            position: relative;
            flex-shrink: 0;
        }
        .image-edit-preview-container {
            width: 100%;
            height: 100%;
            padding: 1.5vw;
            padding-bottom: 8.5vw;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .image-edit-preview-wrapper {
            position: relative;
            display: inline-block;
            max-width: 100%;
            max-height: 100%;
            overflow: visible;
        }
        .image-edit-preview-img {
            display: block;
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
            border-radius: 0.5vw;
            border: none;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
            pointer-events: none;
        }
        .image-edit-delete-btn {
            position: absolute;
            top: 8px;
            right: 8px;
            width: 32px;
            height: 32px;
            background: rgba(0, 0, 0, 0.6);
            border: none;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            z-index: 9999;
            pointer-events: auto;
        }
        .image-edit-delete-btn:hover {
            background: rgba(220, 53, 69, 0.9);
            transform: scale(1.1);
        }
        .image-edit-delete-btn svg {
            width: 16px;
            height: 16px;
            stroke: white;
        }
        .image-edit-upload-area {
            width: 100%;
            height: 100%;
            border: 2px dashed #ccc;
            border-radius: 0.8vw;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            background: #f8f8f8;
        }
        .image-edit-upload-area:hover {
            border-color: #ff8c00;
            background: #fff5eb;
        }
        .image-edit-upload-area.drag-over {
            border-color: #ff8c00;
            background: #fff5eb;
            border-style: solid;
        }
        .image-edit-upload-icon {
            width: 4vw;
            height: 4vw;
            min-width: 48px;
            min-height: 48px;
            margin-bottom: 1vw;
        }
        .image-edit-upload-icon svg {
            width: 100%;
            height: 100%;
            stroke: #999;
        }
        .image-edit-upload-area:hover .image-edit-upload-icon svg {
            stroke: #ff8c00;
        }
        .image-edit-upload-text {
            font-size: 0.9vw;
            color: #666;
            margin-bottom: 0.5vw;
        }
        .image-edit-upload-hint {
            font-size: 0.7vw;
            color: #999;
        }
        .image-edit-toolbar {
            position: absolute;
            bottom: 9vw;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 8px;
            background: rgba(255, 255, 255, 0.95);
            padding: 6px 10px;
            border-radius: 10px;
            box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
            z-index: 50;
        }
        .image-edit-tool-btn {
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 5px;
            padding: 6px 12px;
            background: transparent;
            border: 1px solid #e0e0e0;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s ease;
            color: #666;
        }
        .image-edit-tool-btn:hover {
            background: #fff5eb;
            border-color: #ff8c00;
            color: #ff8c00;
        }
        .image-edit-tool-btn:hover svg {
            stroke: #ff8c00;
        }
        .image-edit-tool-btn svg {
            width: 14px;
            height: 14px;
            stroke: #666;
            flex-shrink: 0;
        }
        .image-edit-tool-btn span {
            font-size: 13px;
            white-space: nowrap;
            line-height: 1;
        }
        .image-edit-bottom {
            position: absolute;
            bottom: 1vw;
            left: 1vw;
            right: 1vw;
            display: flex;
            flex-direction: row;
            gap: 0.6vw;
            background: white;
            border-radius: 0.75vw;
            padding: 0.8vw;
            box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.08);
            align-items: center;
            border: 1px solid #e8e8e8;
        }
        .image-edit-prompt-input {
            flex: 1;
            height: 4.4vw;
            min-height: 64px;
            padding: 0.8vw;
            border: 1px solid #ff8c00;
            border-radius: 0.5vw;
            font-size: 0.65vw;
            color: #333;
            background: #f8f8f8;
            outline: none;
            transition: all 0.2s ease;
        }
        .image-edit-prompt-input::placeholder {
            color: #999;
        }
        .image-edit-prompt-input:focus {
            border-color: #ff8c00;
            background: white;
            box-shadow: 0 0 0 2px rgba(255, 140, 0, 0.1);
        }
        .image-edit-submit-btn {
            height: 4.4vw;
            min-height: 64px;
            width: 10vw;
            min-width: 140px;
            max-width: 140px;
            padding: 0 1vw;
            background: linear-gradient(135deg, #ff8c00 0%, #ffd700 100%);
            border: none;
            border-radius: 0.5vw;
            font-size: 0.65vw;
            font-weight: 600;
            color: white;
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.3vw;
            flex-shrink: 0;
        }
        .image-edit-submit-btn .btn-text {
            flex-shrink: 0;
        }
        .image-edit-submit-btn .btn-cost {
            opacity: 0.85;
            font-size: 0.6vw;
            flex-shrink: 0;
        }
        .image-edit-submit-btn:hover {
            background: linear-gradient(135deg, #ff7700 0%, #ffc700 100%);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(255, 140, 0, 0.4);
        }
        .image-edit-submit-btn:active {
            transform: translateY(0);
        }
        .image-edit-submit-btn:disabled {
            background: #ccc;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }
        @media (max-width: 1200px) {
            .image-edit-modal {
                width: 90vw;
            }
            .image-edit-sidebar {
                min-width: 200px;
                width: 25%;
            }
            .image-edit-preview {
                width: auto;
                flex: 1;
            }
            .image-edit-func-btn {
                font-size: 12px;
                padding: 10px 8px;
            }
            .image-edit-prompt-input,
            .image-edit-submit-btn {
                font-size: 12px;
            }
        }
        @media (max-width: 900px) {
            .image-edit-modal {
                flex-direction: column;
                width: 95vw;
                height: 90vh;
                top: 50%;
            }
            .image-edit-sidebar {
                flex-direction: row;
                width: 100%;
                min-width: auto;
                height: auto;
                min-height: 60px;
                overflow-x: auto;
                gap: 8px;
                padding: 12px;
                flex-shrink: 0;
            }
            .image-edit-func-btn {
                flex-shrink: 0;
                width: auto;
                padding: 8px 16px;
            }
            .image-edit-preview {
                flex: 1;
                width: 100%;
            }
            .image-edit-bottom {
                position: relative;
                bottom: auto;
                left: auto;
                right: auto;
                margin: 1vw;
            }
            .image-edit-preview-container {
                padding-bottom: 1.5vw;
            }
        }
        .video-btn {
            background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
        }
        .video-btn:hover {
            background: linear-gradient(135deg, #3367d6 0%, #2e7d32 100%);
        }
        .video-btn.disabled {
            background: #cccccc;
            cursor: not-allowed;
            opacity: 0.6;
        }
        .video-btn.disabled:hover {
            background: #cccccc;
            transform: none;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        }
        .video-modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            display: none;
            z-index: 10000;
        }
        .video-modal {
            background: #f5f5f5;
            border: 3px solid #4285f4;
            border-radius: 20px;
            padding: 24px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            position: fixed;
            left: 0;
            top: 0;
            transform: none;
            width: auto;
            max-width: 700px;
            overflow: visible;
        }
        .video-modal-content {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }
        .video-prompt-section {
            width: 100%;
        }
        .video-prompt-input {
            width: 100%;
            height: 80px;
            padding: 16px;
            border: none;
            border-radius: 12px;
            font-size: 14px;
            color: #666;
            background: #e8e8e8;
            resize: none;
            box-sizing: border-box;
            font-family: inherit;
        }
        .video-prompt-input::placeholder {
            color: #999;
        }
        .video-prompt-input:focus {
            outline: none;
            background: #e0e0e0;
        }
        .video-controls-row {
            display: flex;
            gap: 20px;
            align-items: center;
        }
        .video-controls-row > .video-dropdown,
        .video-controls-row > #videoGenerateBtn {
            flex: 1 1 0;
        }
        .video-dropdown {
            position: relative;
            flex: 1;
        }
        .video-dropdown-btn {
            width: 100%;
            padding: 12px 20px;
            background: white;
            border: 1px solid #ddd;
            border-radius: 8px;
            font-size: 14px;
            color: #333;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: all 0.2s ease;
            box-sizing: border-box;
        }
        .video-dropdown-btn:hover {
            border-color: #4285f4;
            box-shadow: 0 2px 8px rgba(66, 133, 244, 0.1);
        }
        .video-dropdown-arrow {
            font-size: 12px;
            color: #666;
        }
        .video-dropdown-menu {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: white;
            border: 1px solid #ddd;
            border-top: none;
            border-radius: 0 0 8px 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            z-index: 1000;
            display: none;
            max-height: 200px;
            overflow-y: auto;
        }
        .video-dropdown-item {
            padding: 12px 20px;
            cursor: pointer;
            font-size: 14px;
            color: #333;
            transition: background-color 0.2s ease;
        }
        .video-dropdown-item:hover {
            background: #f8f9fa;
        }
        .video-dropdown-item.disabled {
            color: #ccc;
            cursor: not-allowed;
            background: #f5f5f5;
        }
        .video-dropdown-item.disabled:hover {
            background: #f5f5f5;
        }
        .video-generate-btn {
            padding: 12px 40px;
            background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 10.67px;
            font-weight: 600;
            cursor: pointer;
            transition: background-color 0.2s ease;
            white-space: nowrap;
            min-width: 0;
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
        }
        .video-generate-text { transform: translateY(1px); font-size: 1.25em; }
        .video-cost { font-size: 1.25em; color: #e5e7eb; padding-left: 3px; opacity: 1; }
        .video-generate-btn:hover {
            background: linear-gradient(135deg, #3367d6 0%, #2e7d32 100%);
        }
        .video-generate-btn:disabled {
            background: #cccccc;
            cursor: not-allowed;
        }
        .video-dropdown-btn,
        .video-generate-btn {
            height: 44px;
        }
        .video-generate-btn {
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .video-modal-close {
            position: absolute;
            top: -16px;
            right: -16px;
            background: #fff;
            border: none;
            font-size: 24px;
            color: #666;
            cursor: pointer;
            padding: 0;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: all 0.2s ease;
            box-shadow: 0 2px 8px rgba(0,0,0,0.15);
            border: 1px solid #e5e7eb;
        }
        .video-modal-close:hover {
            background: #e0e0e0;
            color: #333;
        }
        .edit-btn, .video-btn, .compare-btn, .download-btn {
            position: relative;
        }
        .constraint-btn-wrapper {
            position: relative;
            display: inline-block;
        }
        .constraint-tooltip {
            position: absolute;
            top: -8px;
            left: -8px;
            width: 20px;
            height: 20px;
            background: #1256e0;
            color: #fff;
            border-radius: 50%;
            font-size: 14px;
            font-weight: bold;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 2;
            box-shadow: 0 2px 8px rgba(18,86,224,0.15);
            transition: background 0.2s;
        }
        .constraint-tooltip:hover {
            background: #0d3ea6;
        }
        .constraint-tooltip::after {
            content: attr(data-tooltip);
            display: none;
            position: absolute;
            bottom: 130%;
            left: 50%;
            transform: translateX(-50%);
            background: #222;
            color: #fff;
            padding: 8px 16px;
            border-radius: 6px;
            font-size: 13px;
            white-space: pre-line;
            pointer-events: none;
            z-index: 10;
            opacity: 0;
            transition: opacity 0.2s;
            min-width: 180px;
            max-width: 260px;
            text-align: center;
            line-height: 1.5;
            box-sizing: border-box;
            word-break: break-all;
        }
        .constraint-tooltip:hover::after {
            display: block;
            opacity: 1;
        }
        .constraint-btn-wrapper .constraint-tooltip {
            display: none;
        }
        .constraint-btn-wrapper .new-constraint-btn.active + .constraint-tooltip {
            display: flex;
        }
        .ref-upload-container .new-upload-default {
            position: relative;
            height: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .ref-upload-container .upload-buttons {
            position: absolute;
            top: calc(50% - 0.7vw);
            left: 50%;
            transform: translate(-50%, -50%);
            justify-content: center;
            margin: 0;
        }
        .ref-upload-container .new-upload-tip {
            position: absolute;
            bottom: 1vw;
            left: 50%;
            transform: translateX(-50%);
            font-size: 0.45vw;
            text-align: center;
            width: 100%;
        }
        .ref-mode-buttons {
            display: flex;
            gap: 0;
            margin-top: -1px;
            position: relative;
            width: calc(100% - 1.6vw);
            z-index: 10;
            justify-content: center;
            padding: 0;
            margin-left: auto;
            margin-right: auto;
        }
        .ref-mode-btn {
            flex: 1;
            height: 21px;
            border: 1px solid #ddd;
            background: #fff;
            color: #666;
            font-size: 9px;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            font-weight: 500;
            padding: 0 8px;
            line-height: 19px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .ref-mode-btn svg {
            flex-shrink: 0;
        }
        .ref-mode-btn:hover {
            background: #f5f5f5;
            color: #333;
            border-color: #999;
        }
        .ref-mode-btn.active {
            background: #4a4a4a;
            color: white;
            font-weight: 600;
            border-color: transparent;
        }
        .ref-mode-btn.active:hover {
            background: #3a3a3a;
        }
        .ref-mode-left {
            border-radius: 0 0 0 6px;
            border-right: none;
        }
        .ref-mode-middle {
            border-right: none;
        }
        .ref-mode-right {
            border-radius: 0 0 6px 0;
            border-left: none;
        }
        .ref-mode-btn.active.ref-mode-left {
            border-color: transparent;
            border-right: none;
        }
        .ref-mode-btn.active.ref-mode-middle {
            border-color: transparent;
            border-right: none;
            border-left: none;
        }
        .ref-mode-btn.active.ref-mode-right {
            border-color: transparent;
            border-left: none;
        }
        @media (max-width: 900px) {
            .ref-mode-btn {
                height: 19px;
                font-size: 8px;
                padding: 0 8px;
                line-height: 17px;
            }
        }
        .video-item {
            margin-bottom: 20px;
            border: 1px solid #e0e0e0;
            border-radius: 12px;
            overflow: hidden;
            background: #fff;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            transition: box-shadow 0.3s ease;
        }
        .video-item:hover {
            box-shadow: 0 4px 16px rgba(0,0,0,0.15);
        }
        .video-container {
            position: relative;
        }
        .video-actions {
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        .video-container:hover .video-actions {
            opacity: 1;
        }
        .video-actions button {
            transition: all 0.2s ease;
        }
        .video-actions button:hover {
            transform: translateY(-1px);
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }
        .video-info {
            background: #f8f9fa;
            border-top: 1px solid #e0e0e0;
        }
        .layui-layer.video-success-alert {
            border-radius: 12px !important;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
        }
        .layui-layer.video-success-alert .layui-layer-content {
            background: #4a4a4a !important;
            color: white !important;
            padding: 30px 40px !important;
            text-align: center !important;
            font-size: 16px !important;
            line-height: 1.6 !important;
            border-radius: 12px 12px 0 0 !important;
        }
        .layui-layer.video-success-alert .layui-layer-btn {
            background: #4a4a4a !important;
            border-top: 1px solid #666 !important;
            text-align: center !important;
            border-radius: 0 0 12px 12px !important;
        }
        .layui-layer.video-success-alert .layui-layer-btn a {
            background: #666 !important;
            color: white !important;
            border: none !important;
            border-radius: 6px !important;
            padding: 10px 30px !important;
            margin: 12px auto !important;
            font-weight: 500 !important;
            font-size: 14px !important;
            line-height: 1.2 !important;
            transition: all 0.3s ease !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            width: fit-content !important;
            min-width: 80px !important;
            text-decoration: none !important;
        }
        .layui-layer.video-success-alert .layui-layer-btn a:hover {
            background: #777 !important;
            transform: translateY(-1px) !important;
        }

/* =====================================================================
   WIP: Sidebar floating panel override (only this page)
   All spacing uses fixed px via CSS vars for smooth resize
   ===================================================================== */
body[data-sidebar-active] {
    --dt-gs-width: 184px;
    --wip-header: 68px;
    --wip-gap: 1vw;
    --wip-edge: 56px;
    --wip-margin: 2vw;
    --wip-panel-h: calc(100vh - var(--wip-header) - var(--wip-margin) * 2);
    background-color: #dddddd !important;
}
body[data-sidebar-active] .dt-global-sidebar {
    top: calc(var(--wip-header) + var(--wip-margin)) !important;
    left: var(--wip-edge) !important;
    height: var(--wip-panel-h) !important;
    border: 0.5px solid var(--dt-gs-border) !important;
    border-right: none !important;
    border-radius: 0.67vw 0 0 0.67vw !important;
    background: #fff !important;
    box-shadow: -4px 4px 24px rgba(0,0,0,0.06) !important;
}
body[data-sidebar-active] .web-ai-container {
    margin-top: var(--wip-header) !important;
    margin-left: calc(var(--dt-gs-width) + var(--wip-edge)) !important;
    width: calc(100% - var(--dt-gs-width) - var(--wip-edge)) !important;
    height: auto !important;
    display: block !important;
    transition: margin-left 0.25s ease, width 0.25s ease !important;
}
body[data-sidebar-active] .web-ai-main {
    display: flex !important;
    width: 100% !important;
    justify-content: flex-start !important;
    padding: 0 var(--wip-edge) 0 0 !important;
    box-sizing: border-box !important;
    gap: var(--wip-gap) !important;
}
body[data-sidebar-active] .wam-op {
    width: 22vw !important;
    min-width: 384px !important;
    height: var(--wip-panel-h) !important;
    margin: var(--wip-margin) 0 !important;
    padding-left: 1.11vw !important;
    padding-right: 1.11vw !important;
    border-radius: 0 0.67vw 0.67vw 0 !important;
    border: 0.5px solid #e8e8ea !important;
    border-left: none !important;
}
body[data-sidebar-active] .wam-result {
    width: auto !important;
    flex: 1 !important;
    height: var(--wip-panel-h) !important;
    margin: var(--wip-margin) 0 !important;
    border-radius: 0.67vw !important;
}
body[data-sidebar-active] .dt-gs-abbr {
    display: none !important;
}
body[data-sidebar-active] .dt-gs-history-item {
    padding-left: 20px !important;
}
body[data-sidebar-active] .gen-tab.hide,
body[data-sidebar-active] .gen-tab[style*="display:none"],
body[data-sidebar-active] .gen-tab[style*="display: none"] {
    display: none !important;
}
body[data-sidebar-active] .gen-tab {
    border-radius: 4px !important;
    text-align: center !important;
    font-size: 12px !important;
    padding: clamp(4px, 0.28vw, 6px) clamp(10px, 0.72vw, 14px) !important;
    line-height: 1 !important;
}
body[data-sidebar-active] .new-panel-title {
    font-size: max(0.8vw, 14px) !important;
}
body[data-sidebar-active] .dt-gs-title-text {
    display: none !important;
}
body[data-sidebar-active] .new-panel-title:first-child {
    margin-top: 4px !important;
    margin-bottom: 5px !important;
}
body[data-sidebar-active] .screenshot-title-gap {
    margin-bottom: 5px !important;
}
/* ── Main upload window shorter (height ≈ 3/4 of original 10/9) ── */
body[data-sidebar-active] #uploadContainer.new-upload-container {
    aspect-ratio: 40/27 !important;
}
body[data-sidebar-active] .fullscreen-btn {
    font-size: 12px !important;
    padding: 6px 12px !important;
}
/* ── Readable minimum for param labels / mode cards when viewport narrows ── */
body[data-sidebar-active] .wsbi > div {
    font-size: max(0.6vw, 12px) !important;
}
body[data-sidebar-active] .wop-title,
body[data-sidebar-active] .wamo-title,
body[data-sidebar-active] .wamo-label,
body[data-sidebar-active] .wamo2-title {
    font-size: max(0.8vw, 13px) !important;
}
body[data-sidebar-active] .video-generate-btn,
body[data-sidebar-active] .video-dropdown-btn {
    font-size: max(0.85vw, 14px) !important;
}
/* ── Render Parameters mode / constraint buttons: radius 2/3 (0.4vw → 0.27vw) ── */
body[data-sidebar-active] .new-style-btn,
body[data-sidebar-active] .new-constraint-btn {
    border-radius: 0.27vw !important;
}
body[data-sidebar-active] .tab-buttons {
    border-radius: 4px !important;
    margin: 1px 0 2px !important;
}
/* ── Sidebar title: align with "Upload Image" title ── */
body[data-sidebar-active] .dt-gs-title {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    padding: 16px 12px 8px 16px !important;
    border-bottom: none !important;
}
/* ── Collapse button ── */
body[data-sidebar-active] .dt-gs-collapse-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 6px;
    color: #999;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
body[data-sidebar-active] .dt-gs-collapse-btn:hover {
    background: #f3f4f6;
    color: #333;
}

/* ── Collapsed state: sidebar hidden, layout reverts to original ── */
body[data-sidebar-active] .dt-global-sidebar.collapsed {
    transform: translateX(calc(-100% - var(--wip-edge))) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: transform 0.25s ease, opacity 0.2s ease !important;
}
body[data-sidebar-active] .dt-global-sidebar:not(.collapsed) {
    transform: translateX(0) !important;
    opacity: 1 !important;
    transition: transform 0.25s ease, opacity 0.2s ease !important;
}
body[data-sidebar-collapsed] .web-ai-container {
    margin-left: 0 !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    transition: margin-left 0.25s ease, width 0.25s ease !important;
}
body[data-sidebar-collapsed] .web-ai-main {
    display: inline-flex !important;
    width: 100vw !important;
    height: auto !important;
    justify-content: center !important;
    padding: 0 !important;
    gap: 1vw !important;
}
body[data-sidebar-collapsed] .wam-op {
    width: 22vw !important;
    min-width: 384px !important;
    flex: none !important;
    height: calc(100vh - 4vw - var(--wip-header)) !important;
    margin: 2vw 0 !important;
    padding-left: 1.67vw !important;
    padding-right: 1.67vw !important;
    border: none !important;
    border-radius: 1vw !important;
}
body[data-sidebar-collapsed] .wam-result {
    width: 56vw !important;
    flex: none !important;
    min-width: 0 !important;
    height: calc(100vh - 4vw - var(--wip-header)) !important;
    margin-top: 2vw !important;
    margin-bottom: 2vw !important;
    border-radius: 1vw !important;
}

/* ── Expand button (visible when collapsed) ── */
.dt-gs-expand-btn {
    display: none;
    position: fixed;
    left: 8px;
    top: calc(var(--wip-header, 68px) + 2vw);
    width: 36px;
    height: 36px;
    border: 1px solid #e8e8ea;
    background: #fff;
    border-radius: 1vw;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    color: #666;
    transition: background 0.15s, color 0.15s;
}
.dt-gs-expand-btn:hover {
    background: #f3f4f6;
    color: #333;
}
/* Track .wam-op's left edge as viewport changes. Formula depends on the
 * collapsed-state values above: .wam-op width 22vw / min-width 384px,
 * .wam-result width 56vw, .web-ai-main gap 1vw with justify-content:center.
 * If any of those change, recompute or the button will desync.
 * Constants: 57vw = 56vw (.wam-result) + 1vw (gap); 44px = 36 (button w) + 8 (gap).
 * Older browsers without CSS Math 4 (nested max inside calc) silently drop
 * this rule and fall back to base `left:8px` — not ideal but not broken.
 * imageforge-tool intentionally stays on base left:8px (per user 2026-04-22). */
body[data-sidebar-collapsed] .dt-gs-expand-btn {
    display: flex;
    left: max(8px, calc((100vw - max(22vw, 384px) - 57vw) / 2 - 44px));
}

/* ── Floating contact buttons (bottom-right, visible when sidebar collapsed) ── */
.dt-float-contact {
    display: none;
    position: fixed;
    right: 16px;
    bottom: 2vw;
    z-index: 50;
    flex-direction: column;
    gap: 6px;
}
body[data-sidebar-collapsed] .dt-float-contact {
    display: flex;
}
.dt-float-contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #fff;
    border: 1px solid #e8e8ea;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    color: #999;
    font-size: 10px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s, color 0.15s;
}
.dt-float-contact-btn:hover {
    background: #f9fafb;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #555;
}

/* QR modal z-index (above sidebar z-index 9998) */
.z-10001 { z-index: 10001; }

/* ── Hide expand btn & floating icons when viewport near square ── */
@media (max-aspect-ratio: 6/5) {
    body[data-sidebar-collapsed] .dt-gs-expand-btn {
        display: none !important;
    }
    body[data-sidebar-collapsed] .dt-float-contact {
        display: none !important;
    }
}
