        /* ── Reset & base ───────────────────────────────────────── */
        .wm-wrap *,
        .wm-wrap *::before,
        .wm-wrap *::after {
              box-sizing: border-box;
        }

        .wm-wrap {
              max-width: 1200px;
              margin: 0 auto;
              padding: 2rem 1rem 4rem;
              font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
              color: #1e293b;
        }

        /* ── Breadcrumb ─────────────────────────────────────────── */
        .wm-breadcrumb {
              display: flex;
              align-items: center;
              gap: 6px;
              font-size: 13px;
              color: #94a3b8;
              margin-bottom: 1.5rem;
        }

        .wm-breadcrumb a {
              color: #475569;
              text-decoration: none;
              transition: color .2s;
        }

        .wm-breadcrumb a:hover {
              color: #0f172a;
        }

        .wm-breadcrumb .sep {
              font-size: 10px;
              margin: 0 2px;
        }

        /* ── Page heading ───────────────────────────────────────── */
        .wm-heading {
              margin-bottom: 2rem;
        }

        .wm-heading h1 {
              font-size: 28px;
              font-weight: 700;
              letter-spacing: -0.5px;
              margin: 0 0 6px;
              color: #0f172a;
        }

        .wm-heading p {
              font-size: 16px;
              color: #64748b;
              margin: 0;
        }

        /* ── Alerts ─────────────────────────────────────────────── */
        .wm-alert {
              border-radius: 12px;
              padding: 14px 18px;
              font-size: 14px;
              margin-bottom: 1.5rem;
              display: flex;
              align-items: flex-start;
              gap: 10px;
              border: 1px solid transparent;
        }

        .wm-alert-danger {
              background: #fef2f2;
              border-color: #fecaca;
              color: #991b1b;
        }

        .wm-alert-success {
              background: #f0fdf4;
              border-color: #bbf7d0;
              color: #166534;
        }

        .wm-alert ul {
              margin: 6px 0 0 20px;
              padding: 0;
        }

        /* ── Two-column layout ──────────────────────────────────── */
        .wm-layout {
              display: grid;
              grid-template-columns: 2fr 1fr;
              gap: 2rem;
              align-items: start;
        }

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

        /* ── Cards ──────────────────────────────────────────────── */
        .wm-card {
              background: #ffffff;
              border: 1px solid #e2e8f0;
              border-radius: 16px;
              padding: 1.5rem;
              margin-bottom: 1.5rem;
              box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
              transition: box-shadow .2s;
        }

        .wm-card:last-child {
              margin-bottom: 0;
        }

        .wm-card-header {
              display: flex;
              align-items: center;
              gap: 10px;
              margin-bottom: 1.25rem;
        }

        .wm-card-header .step-number {
              display: inline-flex;
              align-items: center;
              justify-content: center;
              width: 28px;
              height: 28px;
              background: #eef2ff;
              color: #4f46e5;
              font-weight: 700;
              font-size: 14px;
              border-radius: 8px;
        }

        .wm-card-header h2 {
              font-size: 18px;
              font-weight: 600;
              margin: 0;
              color: #0f172a;
        }

        .wm-card-header .badge {
              margin-left: auto;
              background: #f1f5f9;
              color: #475569;
              font-size: 12px;
              font-weight: 500;
              padding: 2px 10px;
              border-radius: 20px;
        }

        /* ── Drop zone ──────────────────────────────────────────── */
        .wm-dropzone {
              border: 2px dashed #cbd5e1;
              border-radius: 14px;
              padding: 2.5rem 1.5rem;
              display: flex;
              flex-direction: column;
              align-items: center;
              justify-content: center;
              gap: 8px;
              cursor: pointer;
              transition: border-color .2s, background .2s;
              text-align: center;
              background: #fafbfc;
              min-height: 180px;
        }

        .wm-dropzone:hover,
        .wm-dropzone.dragover {
              border-color: #6366f1;
              background: #f1f5f9;
        }

        .wm-dropzone.has-files {
              border-style: solid;
              border-color: #6366f1;
              background: #f8fafc;
        }

        .wm-dropzone .dz-icon {
              width: 56px;
              height: 56px;
              border-radius: 14px;
              background: #e2e8f0;
              display: flex;
              align-items: center;
              justify-content: center;
              font-size: 26px;
              color: #475569;
              margin-bottom: 4px;
        }

        .wm-dropzone .dz-label {
              font-size: 16px;
              font-weight: 600;
              color: #0f172a;
        }

        .wm-dropzone .dz-sub {
              font-size: 13px;
              color: #94a3b8;
        }

        /* ── File list ──────────────────────────────────────────── */
        .wm-file-list {
              display: flex;
              flex-direction: column;
              gap: 8px;
              margin: 1rem 0 0.5rem;
        }

        .wm-file-pill {
              display: flex;
              align-items: center;
              gap: 10px;
              background: #f8fafc;
              border: 1px solid #e2e8f0;
              border-radius: 10px;
              padding: 8px 12px;
              font-size: 14px;
              color: #1e293b;
              transition: background .15s;
        }

        .wm-file-pill:hover {
              background: #f1f5f9;
        }

        .wm-file-pill .fp-icon {
              font-size: 18px;
              color: #94a3b8;
        }

        .wm-file-pill .fp-name {
              flex: 1;
              overflow: hidden;
              text-overflow: ellipsis;
              white-space: nowrap;
        }

        .wm-file-pill .fp-remove {
              cursor: pointer;
              color: #94a3b8;
              font-size: 20px;
              line-height: 1;
              border: none;
              background: none;
              padding: 0 4px;
              transition: color .15s;
        }

        .wm-file-pill .fp-remove:hover {
              color: #ef4444;
        }

        .wm-clear-files {
              margin-top: 4px;
              font-size: 13px;
              color: #94a3b8;
              background: none;
              border: none;
              cursor: pointer;
              text-decoration: underline;
              padding: 0;
        }

        .wm-clear-files:hover {
              color: #ef4444;
        }

        /* ── Type toggle ────────────────────────────────────────── */
        .wm-toggle-label {
              font-size: 14px;
              font-weight: 600;
              color: #1e293b;
              margin-bottom: 10px;
        }

        .wm-type-toggle {
              display: inline-flex;
              border: 1px solid #e2e8f0;
              border-radius: 10px;
              overflow: hidden;
              margin-bottom: 1.25rem;
              background: #f8fafc;
        }

        .wm-type-toggle button {
              padding: 8px 24px;
              font-size: 14px;
              font-weight: 500;
              border: none;
              background: transparent;
              cursor: pointer;
              color: #64748b;
              display: flex;
              align-items: center;
              gap: 6px;
              transition: background .15s, color .15s;
        }

        .wm-type-toggle button.active {
              background: #4f46e5;
              color: #fff;
        }

        .wm-type-toggle button:not(.active):hover {
              background: #e2e8f0;
              color: #1e293b;
        }

        /* ── Text watermark input ───────────────────────────────── */
        .wm-text-input {
              width: 100%;
              padding: 12px 16px;
              font-size: 15px;
              border: 1px solid #e2e8f0;
              border-radius: 12px;
              background: #ffffff;
              color: #0f172a;
              outline: none;
              transition: border-color .2s, box-shadow .2s;
              margin-bottom: 1.25rem;
        }

        .wm-text-input:focus {
              border-color: #6366f1;
              box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
        }

        /* ── Image watermark upload ─────────────────────────────── */
        .wm-image-upload-wrap {
              margin-bottom: 1.25rem;
        }

        .wm-image-upload-wrap .wm-dropzone {
              min-height: 120px;
              padding: 1.5rem;
        }

        /* ── Control grid ───────────────────────────────────────── */
        .wm-controls {
              display: grid;
              grid-template-columns: 1fr 1fr;
              gap: 16px 20px;
        }

        @media (max-width: 480px) {
              .wm-controls {
                    grid-template-columns: 1fr;
              }
        }

        .wm-ctrl {
              display: flex;
              flex-direction: column;
              gap: 4px;
        }

        .wm-ctrl label {
              font-size: 13px;
              font-weight: 600;
              color: #475569;
        }

        .wm-ctrl input[type="number"],
        .wm-ctrl input[type="text"],
        .wm-ctrl select {
              padding: 8px 12px;
              font-size: 14px;
              border: 1px solid #e2e8f0;
              border-radius: 10px;
              background: #ffffff;
              color: #0f172a;
              outline: none;
              width: 100%;
              transition: border-color .2s, box-shadow .2s;
        }

        .wm-ctrl input:focus,
        .wm-ctrl select:focus {
              border-color: #6366f1;
              box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
        }

        .wm-ctrl input[type="color"] {
              width: 100%;
              height: 40px;
              padding: 3px 6px;
              border: 1px solid #e2e8f0;
              border-radius: 10px;
              cursor: pointer;
              background: #ffffff;
        }

        /* ── Preview area ───────────────────────────────────────── */
        .wm-preview-wrap {
              position: relative;
              background: #f8fafc;
              border-radius: 12px;
              border: 1px solid #e2e8f0;
              overflow: hidden;
              margin-top: 1rem;
              min-height: 200px;
              display: flex;
              align-items: center;
              justify-content: center;
        }

        .wm-preview-wrap canvas {
              max-width: 100%;
              max-height: 500px;
              display: block;
        }

        .wm-preview-placeholder {
              padding: 2rem;
              color: #94a3b8;
              font-size: 14px;
              text-align: center;
        }

        /* ── Actions ────────────────────────────────────────────── */
        .wm-actions {
              display: flex;
              flex-wrap: wrap;
              gap: 12px;
              margin-top: 1.5rem;
        }

        .wm-submit {
              display: inline-flex;
              align-items: center;
              justify-content: center;
              gap: 8px;
              flex: 1 1 auto;
              padding: 12px 28px;
              font-size: 16px;
              font-weight: 600;
              border: none;
              border-radius: 12px;
              background: #4f46e5;
              color: #fff;
              cursor: pointer;
              transition: background .2s, transform .1s, box-shadow .2s;
              box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
        }

        .wm-submit:hover {
              background: #4338ca;
              box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
        }

        .wm-submit:active {
              transform: scale(0.97);
        }

        .wm-submit:disabled {
              opacity: 0.7;
              cursor: not-allowed;
              box-shadow: none;
        }

        .wm-reset {
              padding: 12px 20px;
              font-size: 14px;
              font-weight: 500;
              border: 1px solid #e2e8f0;
              border-radius: 12px;
              background: #ffffff;
              color: #475569;
              cursor: pointer;
              transition: background .15s, border-color .15s;
        }

        .wm-reset:hover {
              background: #f1f5f9;
              border-color: #cbd5e1;
        }

        /* ── Result area (server‑side) ─────────────────────────── */
        .wm-results {
              margin-top: 2rem;
              display: grid;
              grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
              gap: 1.5rem;
        }

        .wm-result-item {
              background: #ffffff;
              border: 1px solid #e2e8f0;
              border-radius: 14px;
              overflow: hidden;
              box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
              transition: transform .2s, box-shadow .2s;
        }

        .wm-result-item:hover {
              transform: translateY(-2px);
              box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
        }

        .wm-result-item img {
              width: 100%;
              display: block;
              aspect-ratio: 1 / 1;
              object-fit: cover;
              background: #f8fafc;
        }

        .wm-result-item .wm-result-actions {
              padding: 10px 14px;
              background: #f8fafc;
              border-top: 1px solid #e2e8f0;
              display: flex;
              justify-content: center;
        }

        .wm-dl-btn {
              display: inline-flex;
              align-items: center;
              gap: 6px;
              padding: 6px 14px;
              font-size: 13px;
              font-weight: 500;
              border: 1px solid #e2e8f0;
              border-radius: 8px;
              background: #ffffff;
              color: #1e293b;
              text-decoration: none;
              cursor: pointer;
              transition: background .15s, border-color .15s;
        }

        .wm-dl-btn:hover {
              background: #f1f5f9;
              border-color: #cbd5e1;
        }

        .wm-dl-btn.primary {
              background: #4f46e5;
              color: #ffffff;
              border-color: transparent;
        }

        .wm-dl-btn.primary:hover {
              background: #4338ca;
              border-color: transparent;
        }

        .wm-zip-btn {
              display: inline-flex;
              align-items: center;
              justify-content: center;
              gap: 8px;
              padding: 10px 20px;
              font-size: 14px;
              font-weight: 500;
              border: 1px solid #e2e8f0;
              border-radius: 12px;
              background: #ffffff;
              color: #1e293b;
              text-decoration: none;
              cursor: pointer;
              transition: background .15s, border-color .15s;
              margin-top: 0.5rem;
        }

        .wm-zip-btn:hover {
              background: #f1f5f9;
              border-color: #cbd5e1;
        }

        /* ── Sidebar (unchanged) ────────────────────────────────── */
        .wm-tool-link {
              display: flex;
              align-items: center;
              gap: 8px;
              padding: 7px 4px;
              font-size: 13px;
              color: #475569;
              text-decoration: none;
              border-radius: 7px;
              transition: background .15s, padding .15s;
        }

        .wm-tool-link:hover {
              background: #f1f5f9;
              color: #0f172a;
              padding-left: 10px;
        }

        .wm-tool-link i {
              font-size: 15px;
              color: #94a3b8;
        }

        .wm-tip {
              background: #f8fafc;
              border-radius: 10px;
              padding: 12px 16px;
              font-size: 13px;
              color: #64748b;
              line-height: 1.6;
        }