        @import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;700;800&family=Noto+Sans+SC:wght@400;500;700&display=swap');

        :root {
            --bg-start: #eff6ff;
            --bg-end: #fff8ef;
            --ink: #0f172a;
            --ink-soft: #334155;
            --line: #d6e4f0;
            --brand: #0ea5a4;
            --brand-deep: #0b7a78;
            --accent: #ff8a3d;
            --ok: #14532d;
            --ok-bg: #dcfce7;
            --error: #7f1d1d;
            --error-bg: #fee2e2;
            --card: rgba(255, 255, 255, 0.9);
            --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
            --radius-lg: 18px;
            --radius-md: 12px;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: 'Manrope', 'Noto Sans SC', sans-serif;
            color: var(--ink);
            background: linear-gradient(145deg, var(--bg-start), var(--bg-end));
            min-height: 100vh;
            padding: 28px 16px 40px;
            position: relative;
            overflow-x: hidden;
        }

        body::before,
        body::after {
            content: '';
            position: fixed;
            z-index: -1;
            filter: blur(2px);
            border-radius: 999px;
        }

        body::before {
            width: 360px;
            height: 360px;
            background: radial-gradient(circle, rgba(14, 165, 164, 0.2), rgba(14, 165, 164, 0));
            top: -110px;
            left: -80px;
        }

        body::after {
            width: 420px;
            height: 420px;
            background: radial-gradient(circle, rgba(255, 138, 61, 0.24), rgba(255, 138, 61, 0));
            right: -130px;
            bottom: -140px;
        }

        .app {
            max-width: 1200px;
            margin: 0 auto;
        }

        .global-upload-card {
            margin-bottom: 0;
            padding: 8px 10px;
            border: 1px solid var(--line);
            border-radius: var(--radius-md);
            background: rgba(255, 255, 255, 0.9);
            box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
            flex: 0 0 auto;
            position: relative;
        }

        .global-upload-row {
            display: flex;
            align-items: center;
            gap: 10px;
            justify-content: flex-end;
            position: relative;
        }

        .global-upload-btn {
            height: 40px;
            padding: 0 16px;
            border: 1px solid #0ea5a4;
            border-radius: 10px;
            background: linear-gradient(135deg, #0ea5a4, #0b7a78);
            color: #fff;
            font-family: inherit;
            font-size: 0.88rem;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .global-upload-btn:hover {
            filter: brightness(1.04);
        }

        .global-bed-btn {
            height: 40px;
            padding: 0 12px;
            border: 1px solid #c7d8e7;
            border-radius: 10px;
            background: #e9f1f8;
            color: #1e3a4c;
            font-family: inherit;
            font-size: 0.82rem;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .global-bed-btn:hover {
            border-color: #97bdcf;
            background: #dcebf6;
        }

        .global-bed-btn[disabled] {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .global-upload-thumb {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            overflow: hidden;
            border: 1px solid #c7d8e7;
            background: #f4f9ff;
            display: flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 40px;
            cursor: zoom-in;
        }

        .global-upload-thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .global-upload-thumb span {
            color: #64748b;
            font-size: 0.74rem;
            font-weight: 700;
        }

        .global-upload-hover-preview {
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            width: min(42vw, 360px);
            border: 1px solid #c7d8e7;
            border-radius: 12px;
            background: #ffffff;
            box-shadow: 0 16px 30px rgba(15, 23, 42, 0.2);
            padding: 6px;
            opacity: 0;
            transform: translateY(-4px);
            pointer-events: none;
            transition: opacity 0.16s ease, transform 0.16s ease;
            z-index: 80;
        }

        .global-upload-hover-preview.active {
            opacity: 1;
            transform: translateY(0);
        }

        .global-upload-hover-preview img {
            display: block;
            width: 100%;
            max-height: 380px;
            object-fit: contain;
            border-radius: 8px;
            background: #f8fbff;
        }

        .global-bed-result {
            margin-top: 8px;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 6px;
            min-width: 0;
        }

        .global-bed-link {
            min-width: 0;
            max-width: min(52vw, 420px);
            font-size: 0.78rem;
            color: #0f766e;
            font-weight: 700;
            text-decoration: none;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .global-bed-link:hover {
            text-decoration: underline;
        }

        .global-bed-copy {
            height: 28px;
            padding: 0 10px;
            border: 1px solid #c7d8e7;
            border-radius: 8px;
            background: #f4f8fc;
            color: #1e3a4c;
            font-family: inherit;
            font-size: 0.76rem;
            font-weight: 700;
            cursor: pointer;
        }

        .global-bed-copy:hover {
            border-color: #97bdcf;
            background: #eaf1f8;
        }

        .global-bed-copy[disabled] {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .global-bed-status {
            margin-top: 6px;
            text-align: right;
            font-size: 0.76rem;
            color: #64748b;
            min-height: 1.15em;
        }

        .global-bed-status.error {
            color: #b91c1c;
        }

        .global-undo-status {
            margin-top: 4px;
            text-align: right;
            font-size: 0.74rem;
            color: #64748b;
            min-height: 1.1em;
        }

        .global-undo-status.error {
            color: #b91c1c;
        }

        .hero {
            margin-bottom: 22px;
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 14px;
            text-align: left;
            animation: rise-in 0.55s ease;
        }

        .hero-copy {
            min-width: 0;
            flex: 1 1 auto;
        }

        .hero-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 20px;
        }

        .video-link {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            color: var(--accent);
            font-size: 0.9rem;
            font-weight: 700;
            text-decoration: none;
            padding: 8px 14px;
            border-radius: 8px;
            transition: all 0.2s ease;
            white-space: nowrap;
        }

        .video-link:hover {
            background: rgba(255, 138, 61, 0.1);
            transform: translateY(-1px);
        }

        .video-link svg {
            flex-shrink: 0;
        }

        /* 响应式：小屏幕时链接移动到标题下方 */
        @media (max-width: 680px) {
            .hero-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 12px;
            }

            .video-link {
                align-self: flex-start;
            }
        }

        .hero h1 {
            font-size: clamp(1.9rem, 2.5vw, 2.8rem);
            letter-spacing: 0.02em;
            font-weight: 800;
        }

        .hero p {
            color: var(--ink-soft);
            margin-top: 8px;
            font-size: 0.96rem;
        }

        .tool-tabs {
            display: flex;
            justify-content: center;
            gap: 12px;
            flex-wrap: wrap;
            margin-bottom: 10px;
            animation: rise-in 0.65s ease;
        }

        .tool-tab {
            border: 1px solid transparent;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.88);
            color: var(--ink-soft);
            padding: 10px 18px;
            cursor: pointer;
            font-size: 0.92rem;
            font-weight: 700;
            transition: all 0.25s ease;
        }

        .tool-tab:hover {
            border-color: var(--line);
            transform: translateY(-1px);
        }

        .tool-tab.active {
            color: #fff;
            background: linear-gradient(135deg, var(--brand), var(--brand-deep));
            box-shadow: 0 12px 24px rgba(11, 122, 120, 0.3);
        }

        .tool-panel {
            display: none;
            background: var(--card);
            border: 1px solid rgba(214, 228, 240, 0.95);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow);
            padding: 24px;
            backdrop-filter: blur(6px);
            animation: panel-in 0.25s ease;
        }

        .tool-panel.active {
            display: block;
        }

        .panel-head {
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
            gap: 12px;
            margin-bottom: 18px;
            border-bottom: 1px solid var(--line);
            padding-bottom: 12px;
        }

        .panel-head h2 {
            font-size: 1.35rem;
            font-weight: 800;
        }

        .panel-head p {
            color: var(--ink-soft);
            font-size: 0.9rem;
        }

        .layout {
            display: grid;
            grid-template-columns: minmax(360px, 1fr) minmax(380px, 1fr);
            gap: 18px;
        }

        .watermark-layout {
            grid-template-columns: minmax(280px, 30%) minmax(0, 70%);
        }

        .compress-layout {
            grid-template-columns: minmax(280px, 30%) minmax(0, 70%);
        }

        .crop-layout {
            grid-template-columns: minmax(300px, 32%) minmax(0, 68%);
        }

        .cutout-layout {
            grid-template-columns: minmax(280px, 30%) minmax(0, 70%);
        }

        .exif-layout {
            grid-template-columns: minmax(280px, 30%) minmax(0, 70%);
        }

        .pdf-layout {
            grid-template-columns: minmax(280px, 30%) minmax(0, 70%);
        }

        .crop-controls-stack {
            align-content: start;
            grid-auto-rows: max-content;
        }

        .stack {
            display: grid;
            gap: 14px;
            min-width: 0;
        }

        .card {
            background: #ffffff;
            border: 1px solid var(--line);
            border-radius: var(--radius-md);
            padding: 14px;
            min-width: 0;
        }

        .card h3 {
            margin-bottom: 10px;
            font-size: 0.96rem;
            font-weight: 800;
        }

        .dropzone {
            border: 2px dashed #b7cadb;
            border-radius: var(--radius-md);
            padding: 16px;
            text-align: center;
            background: linear-gradient(135deg, #f8fafc, #f2f9ff);
            transition: all 0.24s ease;
            cursor: pointer;
        }

        .dropzone:hover,
        .dropzone.dragover {
            border-color: var(--brand);
            background: linear-gradient(135deg, #eaf8f7, #f4fbff);
        }

        .dropzone strong {
            display: block;
            font-size: 0.95rem;
        }

        .dropzone span {
            display: block;
            margin-top: 4px;
            color: #64748b;
            font-size: 0.83rem;
        }

        .input-file {
            display: none;
        }

        .field {
            margin-bottom: 10px;
        }

        .field:last-child {
            margin-bottom: 0;
        }

        .field label {
            display: block;
            font-size: 0.82rem;
            font-weight: 700;
            margin-bottom: 6px;
            color: var(--ink-soft);
        }

        .check-row {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 0;
            font-size: 0.84rem;
            font-weight: 700;
            color: var(--ink-soft);
            cursor: pointer;
            user-select: none;
        }

        .check-row input[type="checkbox"] {
            width: 16px;
            height: 16px;
            accent-color: var(--brand);
            cursor: pointer;
        }

        .field input[type="text"],
        .field input[type="number"],
        .field select {
            width: 100%;
            height: 38px;
            border: 1px solid #c7d8e7;
            border-radius: 10px;
            padding: 0 10px;
            font-family: inherit;
            font-size: 0.9rem;
            background: #fff;
        }

        .field input:focus,
        .field select:focus {
            outline: none;
            border-color: #7abec2;
            box-shadow: 0 0 0 3px rgba(14, 165, 164, 0.12);
        }

        .range-wrap {
            display: flex;
            align-items: center;
            gap: 10px;
            min-width: 0;
        }

        input[type="range"] {
            width: 100%;
            accent-color: var(--brand);
            min-width: 0;
            flex: 1 1 auto;
        }

        .range-value {
            min-width: 60px;
            text-align: right;
            color: var(--brand-deep);
            font-weight: 700;
            font-size: 0.86rem;
        }

        .wm-settings-card .field {
            margin-bottom: 8px;
        }

        .wm-field-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            margin-bottom: 4px;
        }

        .wm-field-head label {
            margin-bottom: 0;
        }

        .wm-field-value {
            color: var(--brand-deep);
            font-size: 0.82rem;
            font-weight: 700;
            line-height: 1.2;
        }

        .wm-settings-card .range-wrap {
            gap: 0;
        }

        .wm-settings-card .color-picker-row {
            grid-template-columns: minmax(0, 1fr) auto;
            align-items: center;
        }

        .wm-settings-card input[type="color"] {
            width: 100%;
            height: 36px;
            border: 1px solid #c7d8e7;
            border-radius: 10px;
            padding: 2px;
            background: #fff;
            cursor: pointer;
        }

        .wm-list {
            display: grid;
            gap: 10px;
        }

        .wm-item {
            border: 1px solid #d9e5ef;
            border-radius: 10px;
            padding: 10px;
            background: #f9fcff;
            display: grid;
            gap: 8px;
        }

        .wm-head-row {
            display: grid;
            grid-template-columns: minmax(0, 1fr) 28px;
            gap: 8px;
            align-items: center;
        }

        .wm-sub-row {
            display: grid;
            grid-template-columns: minmax(0, 1fr) 92px;
            gap: 8px;
            min-width: 0;
        }

        .wm-sub-row > * {
            min-width: 0;
        }

        .btn-row {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            min-width: 0;
        }

        .btn-row .btn {
            min-width: 0;
        }

        .mode-switch {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
        }

        .mode-btn {
            height: 38px;
            border: 1px solid #c7d8e7;
            border-radius: 10px;
            background: #f8fbff;
            color: #1f3b4d;
            font-family: inherit;
            font-size: 0.86rem;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.18s ease;
            min-width: 0;
            padding: 0 10px;
        }

        .mode-btn:hover {
            border-color: #97bdcf;
            background: #edf6fc;
        }

        .mode-btn.active {
            border-color: #0ea5a4;
            background: linear-gradient(135deg, #0ea5a4, #0b7a78);
            color: #fff;
            box-shadow: 0 8px 14px rgba(11, 122, 120, 0.18);
        }

        .btn {
            border: 0;
            border-radius: 10px;
            height: 40px;
            padding: 0 16px;
            font-family: inherit;
            font-size: 0.9rem;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.22s ease;
        }

        .btn.primary {
            background: linear-gradient(135deg, var(--brand), var(--brand-deep));
            color: #fff;
        }

        .btn.primary:hover {
            transform: translateY(-1px);
            box-shadow: 0 10px 18px rgba(11, 122, 120, 0.24);
        }

        .btn.muted {
            background: #e2edf5;
            color: #1e3a4c;
        }

        .btn.muted:hover {
            background: #d2e4f0;
        }

        .btn.warn {
            background: #fff0e6;
            color: #9a3412;
        }

        .btn.warn:hover {
            background: #ffe2ce;
        }

        .btn[disabled] {
            opacity: 0.5;
            cursor: not-allowed;
            box-shadow: none;
        }

        .wm-remove-btn {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            border: 1px solid #ef4444;
            background: #ffffff;
            color: #dc2626;
            font-family: inherit;
            font-size: 0.95rem;
            font-weight: 700;
            line-height: 1;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            cursor: pointer;
            opacity: 0.5;
            transition: opacity 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
        }

        .wm-remove-btn:hover {
            opacity: 1;
            border-color: #b91c1c;
            transform: translateY(-1px);
        }

        .loading {
            display: none;
            align-items: center;
            gap: 10px;
            padding: 10px 12px;
            border: 1px dashed #a5c5d3;
            border-radius: 10px;
            color: #0c4a6e;
            font-size: 0.88rem;
            background: #eff9ff;
        }

        .loading.active {
            display: flex;
        }

        .dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--brand);
            animation: pulse 1s infinite ease-in-out;
        }

        .message {
            display: none;
            border-radius: 10px;
            padding: 10px 12px;
            font-size: 0.88rem;
            line-height: 1.45;
        }

        .message.active {
            display: block;
        }

        .message.success {
            border: 1px solid #a7f3d0;
            background: var(--ok-bg);
            color: var(--ok);
        }

        .message.error {
            border: 1px solid #fecaca;
            background: var(--error-bg);
            color: var(--error);
        }

        .message a {
            color: inherit;
            text-decoration: underline;
            font-weight: 700;
        }

        .preview-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
        }

        .preview-grid.single-col {
            grid-template-columns: 1fr;
        }

        .preview-box {
            border: 1px solid var(--line);
            border-radius: 12px;
            overflow: hidden;
            background: #fff;
        }

        .wm-preview-box {
            height: auto;
        }

        .preview-head {
            padding: 8px 10px;
            border-bottom: 1px solid var(--line);
            font-size: 0.82rem;
            font-weight: 700;
            color: var(--ink-soft);
            background: #f8fbfe;
        }

        .preview-body {
            min-height: 0;
            display: block;
            background: linear-gradient(135deg, #fcfdff, #f5fbff);
            padding: 10px;
            overflow: hidden;
        }

        .preview-body img {
            display: block;
            width: 100%;
            height: auto;
            max-width: 100%;
            max-height: none;
            object-fit: contain;
            margin: 0 auto;
        }

        .preview-body img[hidden] {
            display: none !important;
        }

        .preview-body:not(.wm-preview-body) .placeholder {
            min-height: 260px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .preview-body img.preview-clickable {
            cursor: zoom-in;
        }

        .wm-preview-body {
            height: auto;
            min-height: 0;
            display: block;
            overflow-x: auto;
            overflow-y: hidden;
            max-height: none;
        }

        .wm-preview-body.empty {
            height: 280px;
            min-height: 280px;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }

        .wm-preview-body #wmResultPreview[hidden] {
            display: none !important;
        }

        .wm-preview-body #wmResultPreview:not([hidden]) {
            display: block;
            margin: 0 auto;
            width: 100%;
            height: auto;
            max-width: 100%;
            max-height: none;
            object-fit: contain;
        }

        .wm-preview-body .placeholder {
            padding: 24px 20px;
        }

        .wm-preview-body.empty .placeholder {
            padding: 0 20px;
        }

        .placeholder {
            text-align: center;
            color: #94a3b8;
            font-size: 0.84rem;
            line-height: 1.45;
            padding: 0 20px;
        }

        .stats {
            margin-top: 8px;
            color: #1e3a4c;
            font-size: 0.84rem;
            line-height: 1.45;
        }

        .split {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }

        .color-picker-row {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 10px;
            align-items: end;
        }

        .tool-mode-hint {
            margin-top: 6px;
            font-size: 0.8rem;
            color: #64748b;
            line-height: 1.45;
        }

        .exif-fields {
            display: grid;
            gap: 10px;
        }

        .exif-fields .split {
            gap: 8px;
        }

        .inline-action-row {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 8px;
            align-items: center;
        }

        .inline-action-btn {
            height: 38px;
            padding: 0 12px;
            border: 1px solid #c7d8e7;
            border-radius: 10px;
            background: #e9f1f8;
            color: #1e3a4c;
            font-family: inherit;
            font-size: 0.82rem;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .inline-action-btn:hover {
            border-color: #97bdcf;
            background: #dcebf6;
        }

        .exif-note {
            margin-top: 6px;
            font-size: 0.8rem;
            color: #64748b;
            line-height: 1.45;
        }

        .exif-raw {
            margin-top: 8px;
            border: 1px solid #d6e4f0;
            border-radius: 10px;
            background: #f8fbff;
            padding: 10px;
            max-height: 340px;
            overflow: auto;
            font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
            font-size: 0.75rem;
            line-height: 1.45;
            color: #1f3b4d;
            white-space: pre-wrap;
            word-break: break-word;
        }

        .pdf-mode-panels {
            display: grid;
            gap: 12px;
        }

        .pdf-mode-panel[hidden] {
            display: none !important;
        }

        .pdf-upload-row {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            align-items: center;
        }

        .pdf-file-meta {
            margin-top: 8px;
            font-size: 0.8rem;
            color: #64748b;
            line-height: 1.45;
        }

        .pdf-image-list {
            margin-top: 10px;
            display: grid;
            gap: 8px;
            max-height: 360px;
            overflow: auto;
        }

        .pdf-image-item {
            display: grid;
            grid-template-columns: 54px minmax(0, 1fr) auto;
            align-items: center;
            gap: 8px;
            padding: 8px;
            border: 1px solid #d6e4f0;
            border-radius: 10px;
            background: #f8fbff;
        }

        .pdf-image-thumb {
            width: 54px;
            height: 54px;
            border-radius: 8px;
            border: 1px solid #c7d8e7;
            object-fit: cover;
            background: #fff;
        }

        .pdf-image-main {
            min-width: 0;
        }

        .pdf-image-title {
            font-size: 0.8rem;
            font-weight: 700;
            color: #1f3b4d;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .pdf-image-meta {
            margin-top: 2px;
            font-size: 0.74rem;
            color: #64748b;
        }

        .pdf-image-actions {
            display: flex;
            gap: 6px;
        }

        .mini-btn {
            width: 28px;
            height: 28px;
            border: 1px solid #c7d8e7;
            border-radius: 8px;
            background: #e9f1f8;
            color: #1e3a4c;
            font-family: inherit;
            font-size: 0.78rem;
            font-weight: 700;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0;
        }

        .mini-btn:hover {
            border-color: #97bdcf;
            background: #dcebf6;
        }

        .mini-btn[disabled] {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .permissions-wrap {
            border: 1px solid #d6e4f0;
            border-radius: 10px;
            padding: 10px;
            background: #f8fbff;
        }

        .permissions-grid {
            margin-top: 8px;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
        }

        .permission-item {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 0.8rem;
            color: #334155;
            font-weight: 600;
        }

        .pdf-preview-body {
            min-height: 0;
            max-height: none;
            overflow: hidden;
            padding: 10px;
        }

        .pdf-preview-body img {
            display: block;
            width: 100%;
            max-width: 100%;
            height: auto;
            margin: 0 auto;
            object-fit: contain;
            border: 1px solid #d6e4f0;
            border-radius: 10px;
            background: #fff;
        }

        .pdf-preview-body img[hidden] {
            display: none !important;
        }

        .crop-canvas-wrap {
            border: 1px solid var(--line);
            border-radius: 12px;
            overflow: hidden;
            background: linear-gradient(135deg, #f8fbff, #f2f8ff);
        }

        .crop-editor-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            margin-bottom: 10px;
        }

        .crop-editor-head h3 {
            margin-bottom: 0;
        }

        .crop-zoom-controls {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .icon-btn {
            width: 32px;
            height: 32px;
            border: 1px solid #c7d8e7;
            border-radius: 8px;
            background: #f8fbff;
            color: #1f3b4d;
            font-family: inherit;
            font-size: 0.95rem;
            font-weight: 700;
            line-height: 1;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: all 0.18s ease;
            padding: 0;
        }

        .icon-btn:hover {
            border-color: #97bdcf;
            background: #edf6fc;
        }

        .icon-btn.active {
            border-color: #0ea5a4;
            background: linear-gradient(135deg, #0ea5a4, #0b7a78);
            color: #fff;
        }

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

        .crop-canvas {
            display: block;
            width: 100%;
            height: 460px;
            background: #e8eef5;
            touch-action: none;
            cursor: crosshair;
        }

        .crop-canvas.mode-rect {
            cursor: default;
        }

        .crop-canvas.mode-free {
            cursor: crosshair;
        }

        .crop-canvas.mode-picker {
            cursor: cell;
        }

        .crop-canvas.mode-pan {
            cursor: grab;
        }

        .crop-canvas.mode-panning {
            cursor: grabbing;
        }

        .cutout-canvas-wrap {
            border: 1px solid var(--line);
            border-radius: 12px;
            overflow: hidden;
            background: linear-gradient(135deg, #f8fbff, #f2f8ff);
        }

        .cutout-canvas {
            display: block;
            width: 100%;
            height: 460px;
            background: #e8eef5;
            cursor: crosshair;
            touch-action: none;
        }

        body.lightbox-open {
            overflow: hidden;
        }

        .image-lightbox {
            position: fixed;
            inset: 0;
            z-index: 1200;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 24px;
            background: rgba(2, 6, 23, 0.82);
        }

        .image-lightbox.active {
            display: flex;
            animation: fade-in 0.2s ease;
        }

        .lightbox-stage {
            position: relative;
            width: min(92vw, 1480px);
            height: min(88vh, 980px);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .lightbox-stage img {
            max-width: 100%;
            max-height: 100%;
            border-radius: 12px;
            background: #fff;
            box-shadow: 0 20px 40px rgba(15, 23, 42, 0.35);
            object-fit: contain;
        }

        .lightbox-close {
            position: absolute;
            top: 16px;
            right: 16px;
            z-index: 1;
            width: 38px;
            height: 38px;
            border: 0;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.18);
            color: #fff;
            font-size: 26px;
            line-height: 1;
            cursor: pointer;
            transition: background 0.2s ease;
        }

        .lightbox-close:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        .lightbox-hint {
            position: absolute;
            left: 50%;
            bottom: 8px;
            transform: translateX(-50%);
            color: rgba(255, 255, 255, 0.8);
            font-size: 0.82rem;
            white-space: nowrap;
        }

        @keyframes pulse {
            0%, 100% { opacity: 0.4; transform: scale(0.95); }
            50% { opacity: 1; transform: scale(1.06); }
        }

        @keyframes panel-in {
            from { opacity: 0; transform: translateY(6px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @keyframes rise-in {
            from { opacity: 0; transform: translateY(8px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @keyframes fade-in {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @media (max-width: 1024px) {
            .layout {
                grid-template-columns: 1fr;
            }

            .preview-body:not(.wm-preview-body) .placeholder {
                min-height: 220px;
            }

            .crop-canvas {
                height: 360px;
            }

            .cutout-canvas {
                height: 360px;
            }
        }

        @media (max-width: 1480px) {
            .watermark-layout .split {
                grid-template-columns: 1fr;
            }

            .watermark-layout .range-wrap {
                flex-wrap: wrap;
            }

            .watermark-layout .range-value {
                min-width: 0;
                text-align: left;
            }

            .watermark-layout .btn-row {
                flex-direction: column;
            }

            .watermark-layout .btn {
                width: 100%;
            }
        }

        @media (max-width: 680px) {
            .tool-panel {
                padding: 16px;
            }

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

            .global-upload-row {
                justify-content: flex-start;
                flex-wrap: wrap;
            }

            .global-bed-result {
                justify-content: flex-start;
            }

            .global-bed-status {
                text-align: left;
            }

            .global-undo-status {
                text-align: left;
            }

            .crop-editor-head {
                flex-wrap: wrap;
            }

            .panel-head {
                flex-direction: column;
                align-items: flex-start;
                gap: 4px;
            }

            .preview-grid {
                grid-template-columns: 1fr;
            }

            .split {
                grid-template-columns: 1fr;
            }

            .mode-switch {
                grid-template-columns: 1fr;
            }

            .color-picker-row {
                grid-template-columns: 1fr;
            }

            .permissions-grid {
                grid-template-columns: 1fr;
            }

            .btn-row {
                flex-direction: column;
            }

            .btn {
                width: 100%;
            }

            .crop-canvas {
                height: 300px;
            }

            .cutout-canvas {
                height: 300px;
            }
        }
