/* Dewatermark 营销页与工具页 — 现代 UI */
:root {
    --site-bg: #f5f7fb;
    --site-surface: #ffffff;
    --site-border: rgba(15, 23, 42, 0.12);
    --site-text: #111827;
    --site-text-secondary: #374151;
    --site-muted: #6b7280;
    --site-accent: #6366f1;
    --site-accent-2: #0891b2;
    --site-radius: 16px;
    --site-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
    --site-nav-h: 64px;
    --site-nav-bg: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.98) 0%,
        rgba(255, 255, 255, 0.9) 100%
    );
    --site-nav-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 4px 20px rgba(15, 23, 42, 0.06),
        0 1px 3px rgba(15, 23, 42, 0.04);
    --site-nav-shadow-scrolled:
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 8px 32px rgba(15, 23, 42, 0.08),
        0 2px 8px rgba(15, 23, 42, 0.05);
}

body.site-page {
    background: var(--site-bg);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(34, 211, 238, 0.06), transparent);
    color: var(--site-text);
    min-height: 100vh;
    padding-top: var(--site-nav-h);
}

.site-container {
    width: min(1120px, 100% - 2rem);
    margin: 0 auto;
}

/* 导航增强：置顶固定 + 毛玻璃 + 层次阴影 */
.top-nav.site-nav-enhanced,
body.site-page .top-nav,
body.site-page.generate-page .top-nav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 10000 !important;
    isolation: isolate;
    background: var(--site-nav-bg) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
    box-shadow: var(--site-nav-shadow) !important;
    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

body.site-page .top-nav::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.95) 15%,
        rgba(255, 255, 255, 0.95) 85%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 1;
}

body.site-page .top-nav::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(99, 102, 241, 0.12) 50%,
        transparent 100%
    );
    pointer-events: none;
    opacity: 0.85;
}

body.site-page .top-nav.scrolled,
body.site-page.generate-page .top-nav.scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    border-bottom-color: rgba(15, 23, 42, 0.1) !important;
    box-shadow: var(--site-nav-shadow-scrolled) !important;
}

body.site-page .top-nav .nav-container {
    position: relative;
    z-index: 2;
}

:root {
    --nav-ui-font-size: 1.0625rem;
    --nav-ui-font-weight: 600;
    --nav-ui-color: #111827;
}

body.site-page .top-nav .nav-container,
body.site-page .top-nav .nav-left,
body.site-page .top-nav .nav-right,
body.site-page .top-nav .nav-links-desktop,
body.site-page .top-nav .nav-actions-desktop,
body.site-page .top-nav .auth-buttons-container {
    align-items: center !important;
}

body.site-page .top-nav .nav-links-desktop,
body.site-page .top-nav .nav-actions-desktop {
    gap: 0.125rem;
}

body.site-page .top-nav .nav-link,
body.site-page .top-nav .nav-products-trigger,
body.site-page .top-nav .language-switcher,
body.site-page .top-nav .language-switcher-text,
body.site-page .top-nav .language-switcher-arrow,
body.site-page .top-nav .top-login-btn,
body.site-page .top-nav .nav-menu-toggle {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
    font-size: var(--nav-ui-font-size) !important;
    font-weight: var(--nav-ui-font-weight) !important;
    color: var(--nav-ui-color) !important;
    text-shadow: none !important;
    letter-spacing: 0.01em;
    line-height: 1.25 !important;
}

body.site-page .top-nav .nav-link,
body.site-page .top-nav .nav-products-trigger,
body.site-page .top-nav .language-switcher,
body.site-page .top-nav .top-login-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 40px !important;
    height: 40px !important;
    padding: 0 0.75rem !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    transform: none !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
}

body.site-page .top-nav .nav-link:hover,
body.site-page .top-nav .nav-products-trigger:hover,
body.site-page .top-nav .language-switcher:hover {
    background: rgba(99, 102, 241, 0.07) !important;
    box-shadow: 0 1px 3px rgba(99, 102, 241, 0.1) !important;
    transform: none !important;
    transition: background 0.2s ease, box-shadow 0.2s ease !important;
}

body.site-page .top-nav .nav-products-dropdown.open .nav-products-trigger {
    background: rgba(99, 102, 241, 0.09) !important;
    box-shadow: 0 1px 4px rgba(99, 102, 241, 0.12) !important;
}

body.site-page .top-nav .nav-link.active {
    background: rgba(99, 102, 241, 0.1) !important;
    color: var(--site-accent) !important;
    box-shadow: 0 1px 3px rgba(99, 102, 241, 0.12) !important;
}

body.site-page .top-nav .top-login-btn {
    border: 1px solid rgba(99, 102, 241, 0.22) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9)) !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

body.site-page .top-nav .top-login-btn:hover {
    background: rgba(99, 102, 241, 0.08) !important;
    border-color: rgba(99, 102, 241, 0.35) !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15) !important;
    transform: none !important;
}

body.site-page .top-nav .top-user-avatar-btn,
body.site-page .top-nav #topUserAvatarBtn {
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.9),
        0 2px 8px rgba(15, 23, 42, 0.1) !important;
    transition: box-shadow 0.2s ease, transform 0.2s ease !important;
}

body.site-page .top-nav .top-user-avatar-btn:hover,
body.site-page .top-nav #topUserAvatarBtn:hover {
    box-shadow:
        0 0 0 2px rgba(99, 102, 241, 0.25),
        0 4px 12px rgba(99, 102, 241, 0.18) !important;
    transform: translateY(-1px);
}

body.site-page .top-nav .nav-menu-toggle:hover {
    background: rgba(99, 102, 241, 0.07) !important;
    box-shadow: 0 1px 3px rgba(99, 102, 241, 0.1) !important;
}

/* 登录态：隐藏登录按钮、显示头像（覆盖上方 inline-flex !important） */
body.site-page.is-authenticated .top-nav .top-login-btn,
body.site-page.is-authenticated .top-nav #topLoginLink {
    display: none !important;
}

body.site-page.is-authenticated .top-nav .top-user-avatar-btn,
body.site-page.is-authenticated .top-nav #topUserAvatarBtn {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 40px !important;
    height: 40px !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
}

body.site-page .top-nav .language-switcher {
    min-width: auto !important;
    gap: 0.4rem !important;
}

body.site-page .top-nav .language-switcher-text {
    flex: 0 0 auto !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    color: inherit !important;
}

body.site-page .top-nav .language-switcher-flag-img {
    width: 1.125rem !important;
    height: 0.85rem !important;
    flex-shrink: 0;
}

body.site-page .top-nav .nav-products-trigger .language-switcher-arrow {
    font-size: 0.65rem !important;
    margin-left: 0.1rem;
    opacity: 0.55;
}

body.site-page .top-nav .logo h2 {
    color: var(--nav-ui-color) !important;
    text-shadow: none !important;
}

body.site-page .nav-products-menu {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-color: var(--site-border);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.8) inset,
        0 16px 40px rgba(15, 23, 42, 0.12),
        0 4px 12px rgba(15, 23, 42, 0.06);
}

body.site-page .nav-products-menu a {
    color: #111827 !important;
}

body.site-page .nav-products-menu a:hover {
    color: var(--site-accent) !important;
    background: rgba(99, 102, 241, 0.08);
}

/* 语言下拉：浅色背景（与产品菜单一致） */
body.site-page .top-nav .language-dropdown {
    background: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    border-radius: 12px !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.8) inset,
        0 16px 40px rgba(15, 23, 42, 0.12),
        0 4px 12px rgba(15, 23, 42, 0.06) !important;
    backdrop-filter: none !important;
    padding: 0.35rem !important;
}

body.site-page .top-nav .language-item {
    margin: 2px 0 !important;
    border-radius: 8px !important;
}

body.site-page .top-nav .language-item:hover {
    background: rgba(99, 102, 241, 0.08) !important;
}

body.site-page .top-nav .language-item.active {
    background: rgba(99, 102, 241, 0.12) !important;
}

body.site-page .top-nav .language-name {
    color: #111827 !important;
}

body.site-page .nav-drawer-language-dropdown .nav-drawer-lang-btn {
    background: #f3f4f6 !important;
    color: #111827 !important;
}

body.site-page .nav-drawer-language-dropdown .nav-drawer-lang-btn:hover,
body.site-page .nav-drawer-language-dropdown .nav-drawer-lang-btn.active {
    background: #e5e7eb !important;
    color: #111827 !important;
}

body.site-page .nav-drawer-language-dropdown .language-name {
    color: #111827 !important;
}

.nav-products-dropdown {
    position: relative;
}

.nav-products-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    color: var(--nav-ui-color, #111827);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: var(--nav-ui-font-size, 1.0625rem);
    font-weight: var(--nav-ui-font-weight, 600);
    border-radius: 8px;
}

.nav-products-trigger:hover,
.nav-products-dropdown.open .nav-products-trigger {
    background: var(--site-surface);
}

.nav-products-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    padding: 0.5rem;
    background: #ffffff;
    border: 1px solid var(--site-border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    z-index: 10001;
}

.nav-products-dropdown.open .nav-products-menu {
    display: block;
}

.nav-products-menu a,
.nav-products-menu .nav-product-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    color: #111827;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
}

.nav-product-icon {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--site-accent, #6366f1);
}

.nav-product-icon svg {
    width: 100%;
    height: 100%;
}

.nav-products-menu a:hover {
    background: rgba(99, 102, 241, 0.08);
    color: var(--site-accent);
}

/* Hero */
.site-hero {
    text-align: center;
    padding: 3.5rem 0 2.5rem;
}

.site-hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.site-hero-lead {
    font-size: 1.125rem;
    color: var(--site-text-secondary);
    max-width: 36rem;
    margin: 0 auto 2rem;
}

.site-hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* 按钮 */
.site-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}

.site-btn-primary {
    background: linear-gradient(135deg, var(--site-accent), #8b5cf6);
    color: #fff;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

.site-btn-primary:hover {
    transform: translateY(-1px);
}

.site-btn-secondary {
    background: var(--site-surface);
    color: var(--site-text);
    border: 1px solid var(--site-border);
}

.site-feature-cta {
    background: linear-gradient(135deg, #ff6b35, #f0705a);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.875rem 1.75rem;
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.35);
    gap: 0.4rem;
}

.site-feature-cta::after {
    content: "→";
    font-size: 1.05em;
    line-height: 1;
    transition: transform 0.15s;
}

.site-feature-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(255, 107, 53, 0.42);
    color: #fff;
}

.site-feature-cta:hover::after {
    transform: translateX(2px);
}

.site-feature-cta:active {
    transform: translateY(0);
    box-shadow: 0 6px 18px rgba(255, 107, 53, 0.32);
}

.site-btn-google {
    background: #fff;
    color: #1e293b;
    border: 1px solid #dadce0;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.12);
}

.site-btn-google:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #d2d4d7;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.2);
    transform: translateY(-1px);
}

.site-btn-google:active:not(:disabled) {
    background: #f1f3f4;
    transform: translateY(0);
}

.site-btn-google.is-loading {
    opacity: 0.75;
    cursor: wait;
}

.site-btn-google-icon {
    flex-shrink: 0;
}

.site-btn-block { width: 100%; }

/* 深色弹窗内标题与正文对比度 */
body.site-page .pricing-modal .pricing-modal-title {
    color: #fff !important;
}

body.site-page .pricing-modal .pricing-modal-close {
    color: #fff;
}

body.site-page .pricing-modal .site-modal-label,
body.site-page .pricing-modal .site-modal-divider,
body.site-page .pricing-modal .site-modal-foot {
    color: rgba(255, 255, 255, 0.72) !important;
}

body.site-page .pricing-modal .site-modal-foot a {
    color: var(--site-accent-2) !important;
}

/* 功能展示：每行一项，左右错位 */
.site-features-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem 0 3.5rem;
}

.site-feature-card {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(1.25rem, 4vw, 3rem);
    align-items: center;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: clamp(1.25rem, 3vw, 2rem);
    box-shadow: none;
    transition: none;
}

.site-feature-card--reverse {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.site-feature-card--reverse .site-feature-media {
    order: 2;
}

.site-feature-card--reverse .site-feature-body {
    order: 1;
    text-align: right;
}

.site-feature-card--reverse .site-feature-body .site-btn,
.site-feature-card--reverse .site-feature-body .site-feature-cta {
    margin-left: auto;
}

.site-feature-card:hover {
    border: none;
    box-shadow: none;
}

.site-feature-media {
    min-width: 0;
    display: flex;
    align-items: center;
}

.site-feature-card:not(.site-feature-card--reverse) .site-feature-media {
    justify-content: flex-start;
}

.site-feature-card--reverse .site-feature-media {
    justify-content: flex-end;
}

.site-feature-body {
    min-width: 0;
}

.site-feature-body h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.6rem);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.site-feature-body p {
    color: var(--site-text-secondary);
    font-size: 1rem;
    margin-bottom: 1.25rem;
    line-height: 1.65;
    max-width: 36rem;
}

.site-feature-card--reverse .site-feature-body p {
    margin-left: auto;
}

/* 前后对比（与 backgroundimage home-hero-example 一致） */
.site-feature-example.home-hero-example,
.wmp-showcase .home-hero-example {
    width: 100%;
    background: transparent;
    border: 0;
    padding: 0;
    transform: none;
}

.site-features-grid .home-hero-compare,
.wmp-showcase .home-hero-compare {
    position: relative;
    width: min(520px, 100%);
    margin: 0 auto;
    height: auto;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 14px;
    background-color: #ffffff;
    background-image:
        linear-gradient(45deg, #d9d9d9 25%, transparent 25%),
        linear-gradient(-45deg, #d9d9d9 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #d9d9d9 75%),
        linear-gradient(-45deg, transparent 75%, #d9d9d9 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    touch-action: pan-y;
    overscroll-behavior-x: contain;
}

.site-features-grid .home-hero-origin,
.site-features-grid .home-hero-removed,
.wmp-showcase .home-hero-origin,
.wmp-showcase .home-hero-removed {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.site-features-grid .home-hero-removed,
.wmp-showcase .home-hero-removed {
    z-index: 1;
}

.site-features-grid .home-hero-origin-wrap,
.wmp-showcase .home-hero-origin-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
    clip-path: inset(0 50% 0 0);
    -webkit-clip-path: inset(0 50% 0 0);
}

.site-features-grid .home-hero-divider,
.wmp-showcase .home-hero-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
    z-index: 3;
    pointer-events: none;
}

.site-features-grid .home-hero-slider,
.wmp-showcase .home-hero-slider {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.site-features-grid .home-hero-handle,
.wmp-showcase .home-hero-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.95);
    background: rgba(15, 23, 42, 0.45);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: ew-resize;
    z-index: 5;
    user-select: none;
    touch-action: none;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.25);
}

.site-feature-card--reverse .site-feature-media .home-hero-compare {
    margin-left: auto;
    margin-right: 0;
}

.site-feature-card:not(.site-feature-card--reverse) .site-feature-media .home-hero-compare {
    margin-left: 0;
    margin-right: auto;
}

@media (max-width: 768px) {
    .site-feature-card,
    .site-feature-card--reverse {
        grid-template-columns: 1fr;
    }

    .site-feature-card--reverse .site-feature-media,
    .site-feature-card--reverse .site-feature-body {
        order: unset;
    }

    .site-feature-card--reverse .site-feature-body {
        text-align: left;
    }

    .site-feature-card--reverse .site-feature-body .site-btn,
    .site-feature-card--reverse .site-feature-body .site-feature-cta {
        margin-left: 0;
    }

    .site-feature-card--reverse .site-feature-body p {
        margin-left: 0;
    }
}

/* 场景 / FAQ */
.site-section {
    padding: 3rem 0;
}

.site-section h2 {
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: 2rem;
}

.site-scenarios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.site-scenario-item {
    text-align: center;
    padding: 1.25rem;
}

.site-scenario-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.site-faq details {
    background: var(--site-surface);
    border: 1px solid var(--site-border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
}

.site-faq summary {
    cursor: pointer;
    font-weight: 600;
}

.site-faq p {
    color: var(--site-text-secondary);
    margin-top: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* 工具页 */
.tool-page-main {
    padding: 1.5rem 0 4rem;
}

.tool-showcase {
    margin-bottom: 2rem;
}

.tool-showcase h1 {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    margin-bottom: 0.5rem;
}

.tool-showcase-desc {
    color: var(--site-text-secondary);
    margin-bottom: 1.5rem;
}

.tool-compare-demo {
    position: relative;
    border-radius: var(--site-radius);
    overflow: hidden;
    aspect-ratio: 16/9;
    max-height: 420px;
    background: #1e293b;
    border: 1px solid var(--site-border);
}

.tool-compare-demo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tool-compare-after-wrap {
    position: absolute;
    inset: 0;
    width: 50%;
    overflow: hidden;
    z-index: 2;
}

.tool-compare-after-wrap img {
    width: 200%;
    max-width: none;
}

.tool-workspace {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 900px) {
    .tool-workspace { grid-template-columns: 1fr; }
}

.tool-panel {
    background: var(--site-surface);
    border: 1px solid var(--site-border);
    border-radius: var(--site-radius);
    padding: 1.25rem;
}

.tool-upload-zone {
    border: 2px dashed var(--site-border);
    border-radius: 12px;
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.tool-upload-zone.dragover {
    border-color: var(--site-accent);
    background: rgba(99, 102, 241, 0.08);
}

.tool-status {
    min-height: 1.25rem;
    font-size: 0.875rem;
    color: var(--site-text-secondary);
    margin: 0.75rem 0;
}

.tool-status.is-error { color: #f87171; }

.tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.tool-result-preview {
    min-height: 280px;
    border-radius: 12px;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tool-result-preview img {
    max-width: 100%;
    max-height: 360px;
    object-fit: contain;
}

.tool-features-list {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.tool-feature-item {
    padding: 1rem;
    background: var(--site-surface);
    border-radius: 12px;
    border: 1px solid var(--site-border);
}

.tool-feature-item h4 { margin-bottom: 0.35rem; font-size: 1rem; }
.tool-feature-item p { color: var(--site-text-secondary); font-size: 0.85rem; }

/* ========== 去水印页 wm-page ========== */
body.wm-page {
    background: linear-gradient(105deg, #fef3e2 0%, #fce7f3 45%, #ede9fe 100%);
    background-attachment: fixed;
}

.wm-main {
    width: min(960px, 100% - 2rem);
    margin: 0 auto;
    padding: 2.5rem 0 4rem;
}

.wm-hero,
.wm-card {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.wm-hero {
    text-align: center;
    margin-bottom: 2rem;
}

.wm-hero-title {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    font-size: clamp(1.5rem, 4.5vw, 2.125rem);
    font-weight: 700;
    line-height: 1.25;
    color: #111827;
    margin: 0 0 0.75rem;
}

.wm-sparkle {
    flex-shrink: 0;
    vertical-align: middle;
}

.wm-hero-sub {
    font-size: clamp(0.95rem, 2.5vw, 1.0625rem);
    color: #6b7280;
    margin: 0;
}

.wm-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
    padding: 0.5rem 0 0;
    overflow: hidden;
}

.wm-tabs {
    display: flex;
    align-items: stretch;
    gap: 0.25rem;
    margin: 0.75rem 0.75rem 0;
    padding: 0.35rem;
    background: #f3f4f6;
    border-radius: 14px;
}

.wm-tab {
    flex: 1;
    min-width: 0;
    padding: 0.625rem 0.5rem;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #6b7280;
    font-size: clamp(0.75rem, 2.2vw, 0.875rem);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.wm-tab:hover {
    color: #374151;
}

.wm-tab.is-active {
    background: #ffffff;
    color: #111827;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.wm-badge {
    display: inline-block;
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1.3;
    vertical-align: middle;
}

.wm-badge-new {
    background: #fce7f3;
    color: #db2777;
}

.wm-badge-sale {
    background: #fce7f3;
    color: #db2777;
}

.wm-batch-link {
    text-align: center;
    margin: 1rem 0 0.5rem;
    font-size: 0.875rem;
}

.wm-batch-link a {
    color: #ff6b35;
    text-decoration: none;
    font-weight: 500;
}

.wm-batch-link a:hover {
    text-decoration: underline;
}

.wm-upload-body {
    padding: 1.25rem 1.5rem 0.75rem;
    text-align: center;
    transition: background 0.2s;
}

.wm-upload-body.dragover {
    background: rgba(255, 107, 53, 0.06);
}

.wm-upload-initial {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.wm-upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2.5rem;
    border: none;
    border-radius: 12px;
    background: #ff6b35;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.35);
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.wm-upload-btn:hover:not(:disabled) {
    background: #f85a22;
    box-shadow: 0 6px 24px rgba(255, 107, 53, 0.45);
    transform: translateY(-1px);
}

.wm-upload-btn:active:not(:disabled) {
    transform: translateY(0);
}

.wm-upload-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

.wm-upload-btn--sm {
    padding: 0.75rem 1.75rem;
    font-size: 0.9375rem;
}

.wm-upload-hint {
    margin: 0;
    font-size: 0.8125rem;
    color: #9ca3af;
}

.wm-upload-preview-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.wm-upload-preview-wrap[hidden] {
    display: none !important;
}

.wm-upload-preview-img {
    max-width: 100%;
    max-height: 280px;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.1);
}

.wm-preview-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.wm-change-btn {
    padding: 0.625rem 1.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.wm-change-btn:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.wm-status {
    min-height: 1.25rem;
    margin: 0.75rem 0 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.wm-status.is-error {
    color: #dc2626;
}

.wm-divider {
    border: none;
    border-top: 1px solid #f3f4f6;
    margin: 0.5rem 0 0;
}

.wm-card-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem 1.25rem;
}

.wm-limits {
    font-size: 0.75rem;
    color: #9ca3af;
}

.wm-formats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.wm-format-pill {
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #f3f4f6;
    color: #9ca3af;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: lowercase;
}

.wm-result-section {
    margin-top: 2rem;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.wm-result-section[hidden] {
    display: none !important;
}

.wm-compare-demo {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    max-height: 420px;
    background: #1e293b;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.12);
}

.wm-compare-demo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wm-compare-after-wrap {
    position: absolute;
    inset: 0;
    width: 50%;
    overflow: hidden;
    z-index: 2;
}

.wm-compare-after-wrap img {
    width: 200%;
    max-width: none;
}

.wm-compare-slider {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: ew-resize;
    z-index: 4;
}

.wm-compare-labels {
    position: absolute;
    bottom: 0.75rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
    z-index: 3;
}

.wm-compare-labels span {
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 500;
}

.wm-result-actions {
    display: flex;
    justify-content: center;
    margin-top: 1.25rem;
}

.wm-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    border-radius: 12px;
    background: #111827;
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}

.wm-download-btn:hover {
    background: #1f2937;
    color: #ffffff;
}

.wm-download-btn[hidden] {
    display: none !important;
}

/* 使用说明 */
.wm-guide {
    width: 100%;
    margin: 3rem auto 0;
    padding: 0 0.25rem;
}

.wm-guide-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.wm-guide-title {
    font-size: clamp(1.375rem, 3.5vw, 1.75rem);
    font-weight: 700;
    color: #111827;
    margin: 0 0 1rem;
    line-height: 1.35;
}

.wm-guide-brand,
.wm-guide-accent {
    color: #f0705a;
}

.wm-guide-lead {
    max-width: 680px;
    margin: 0 auto;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #374151;
}

.wm-guide-layout {
    display: grid;
    grid-template-columns: 1fr min(300px, 38%);
    gap: 2rem;
    align-items: start;
}

.wm-guide-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wm-guide-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1.375rem;
    background: #fff5f2;
    border-radius: 16px;
}

.wm-guide-step-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #ffffff;
    color: #f0705a;
    box-shadow: 0 2px 8px rgba(240, 112, 90, 0.12);
}

.wm-guide-step-body h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.4;
}

.wm-guide-step-body p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.65;
    color: #6b7280;
}

.wm-guide-visual-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: #fff5f2;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}

.wm-guide-visual-img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.wm-guide-visual-bottom {
    position: relative;
    padding: 3.5rem 1.5rem 2rem;
    text-align: center;
    background: #fff5f2;
}

.wm-guide-download-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #ffffff;
    color: #f0705a;
    box-shadow: 0 8px 24px rgba(240, 112, 90, 0.2);
}

.wm-guide-visual-text {
    margin: 0;
    font-size: 1.375rem;
    font-weight: 700;
    color: #f0705a;
    letter-spacing: 0.01em;
}

.wm-features {
    width: 100%;
    margin-top: 0;
    padding: 3.5rem 1.5rem 4rem;
    background: transparent;
}

.wm-features-inner {
    width: min(1100px, 100%);
    margin: 0 auto;
}

.wm-features-grid {
    display: grid;
    gap: 2rem 1.5rem;
    grid-template-columns: repeat(4, 1fr);
}

.wm-feature-item {
    text-align: center;
    padding: 0;
    background: transparent;
    border: none;
    backdrop-filter: none;
}

.wm-feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #ffffff;
    color: #ff6b35;
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.12);
}

.wm-feature-item h3 {
    font-size: 1.0625rem;
    font-weight: 700;
    margin: 0 0 0.625rem;
    color: #111827;
}

.wm-feature-item p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.65;
}

.wm-features-cta-wrap {
    display: flex;
    justify-content: center;
    margin-top: 2.5rem;
}

.wm-features-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2.25rem;
    border: 1.5px solid #f0705a;
    border-radius: 999px;
    background: transparent;
    color: #f0705a;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.wm-features-cta:hover {
    background: #f0705a;
    color: #ffffff;
}

@media (max-width: 600px) {
    .wm-tabs {
        flex-wrap: wrap;
    }

    .wm-tab {
        flex: 1 1 calc(50% - 0.25rem);
        white-space: normal;
        font-size: 0.75rem;
    }

    .wm-card-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .wm-main {
        padding-top: 1.5rem;
    }

    .wm-guide-layout {
        grid-template-columns: 1fr;
    }

    .wm-guide-visual {
        max-width: 320px;
        margin: 0 auto;
    }

    .wm-features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem 1.25rem;
    }
}

@media (max-width: 520px) {
    .wm-features-grid {
        grid-template-columns: 1fr;
    }

    .wm-features {
        padding: 2.5rem 1.25rem 3rem;
    }
}

/* ========== 去水印处理页 wmp ========== */
body.wm-process-page {
    background: #f5f5f5;
}

.wmp-main {
    width: min(1100px, 100% - 2rem);
    margin: 0 auto;
    padding: 1.5rem 0 3rem;
}

.wmp-faq {
    padding-top: 2.5rem;
    padding-bottom: 0;
}

.wmp-faq.site-container {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.wmp-main .wm-guide {
    margin-top: 2.5rem;
}

.wm-main .wmp-showcase {
    margin-top: 3rem;
    width: 100%;
}

.wmp-showcase {
    margin-top: 3rem;
}

.wmp-showcase-title {
    text-align: center;
    font-size: clamp(1.375rem, 3.5vw, 1.875rem);
    font-weight: 700;
    color: #111827;
    margin: 0 0 2.5rem;
    line-height: 1.35;
}

.wmp-showcase-list {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
}

.wmp-showcase-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
}

.wmp-showcase-row--reverse .wmp-showcase-media {
    order: -1;
}

.wmp-showcase-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.wmp-showcase-icon--purple {
    background: #f3e8ff;
    color: #9333ea;
}

.wmp-showcase-icon--green {
    background: #dcfce7;
    color: #16a34a;
}

.wmp-showcase-icon--orange {
    background: #ffedd5;
    color: #ea580c;
}

.wmp-showcase-icon--blue {
    background: #dbeafe;
    color: #2563eb;
}

.wmp-showcase-body h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.625rem);
    font-weight: 700;
    margin: 0 0 0.75rem;
    line-height: 1.35;
    color: #111827;
}

.wmp-showcase-body p {
    margin: 0 0 1.25rem;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #6b7280;
}

.wmp-showcase-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #111827;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s;
}

button.wmp-showcase-link {
    border: none;
    background: none;
    padding: 0;
}

.wmp-showcase-link:hover {
    color: #f0705a;
}

.wmp-showcase-media {
    min-width: 0;
}

.wmp-showcase-media .home-hero-compare {
    width: 100%;
    max-width: none;
    margin: 0;
}

@media (max-width: 768px) {
    .wmp-showcase-row,
    .wmp-showcase-row--reverse {
        grid-template-columns: 1fr;
    }

    .wmp-showcase-row--reverse .wmp-showcase-media {
        order: 0;
    }
}

.wmp-upload-bar {
    display: flex;
    align-items: stretch;
    justify-content: center;
    min-height: 160px;
    padding: 0.75rem;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    margin-bottom: 0.75rem;
}

.wmp-mode-select,
.wmp-sidebar-mode {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.wmp-mode-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111827;
}

.wmp-upload-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    flex: 1;
    width: 100%;
    min-height: 136px;
    padding: 2rem 1.5rem;
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.wmp-upload-inline.dragover {
    border-color: #ff6b35;
    background: rgba(255, 107, 53, 0.08);
}

.wmp-upload-btn {
    padding: 0.625rem 1.25rem !important;
    font-size: 0.875rem !important;
}

.wmp-upload-or {
    font-size: 0.8125rem;
    color: #9ca3af;
}

.wmp-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background: #e0f2fe;
    border-radius: 8px;
    font-size: 0.8125rem;
    color: #0369a1;
}

.wmp-notice svg {
    flex-shrink: 0;
    color: #0284c7;
}

.wmp-workspace {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 0;
    min-height: 520px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.wmp-preview {
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
}

.wmp-preview-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 520px;
    padding: 1.5rem;
    background: #ffffff;
}

.wmp-compare-demo {
    position: relative;
    width: 100%;
    height: min(480px, 56vh);
    min-height: 280px;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: none;
}

.wmp-compare-demo[hidden] {
    display: none !important;
}

.wmp-compare-demo img {
    position: absolute;
    display: block;
    pointer-events: none;
    object-fit: contain;
}

.wmp-compare-after-wrap {
    position: absolute;
    overflow: hidden;
    z-index: 2;
    clip-path: inset(0 0 0 50%);
    -webkit-clip-path: inset(0 0 0 50%);
    will-change: clip-path;
}

.wmp-compare-after-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
    display: block;
}

.wmp-compare-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: #ffffff;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.2);
    z-index: 3;
    pointer-events: none;
    transform: translateX(-50%);
}

.wmp-compare-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.95);
    background: rgba(15, 23, 42, 0.45);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: ew-resize;
    z-index: 5;
    user-select: none;
    touch-action: none;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.25);
    padding: 0;
}

.wmp-compare-slider {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.wmp-compare-labels {
    position: absolute;
    bottom: 0.75rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
    z-index: 3;
}

.wmp-compare-labels span {
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 500;
}

.wmp-preview-img {
    max-width: 100%;
    max-height: 480px;
    object-fit: contain;
    border-radius: 4px;
}

.wmp-preview-img[hidden] {
    display: none !important;
}

.wmp-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.85);
    z-index: 2;
}

.wmp-loading[hidden] {
    display: none !important;
}

.wmp-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #ff6b35;
    border-radius: 50%;
    animation: wmp-spin 0.8s linear infinite;
}

@keyframes wmp-spin {
    to { transform: rotate(360deg); }
}

.wmp-loading-text {
    margin: 0;
    font-size: 0.9375rem;
    color: #374151;
    font-weight: 500;
}

.wmp-error {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    z-index: 3;
    text-align: center;
}

.wmp-error[hidden] {
    display: none !important;
}

.wmp-error p {
    margin: 0;
    color: #dc2626;
    font-size: 0.9375rem;
}

.wmp-sidebar {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    background: #f9fafb;
    gap: 1.25rem;
}

.wmp-toggle-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wmp-text-remove-hint {
    margin: 0;
    padding: 0.625rem 0.75rem;
    border-radius: 8px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    font-size: 0.75rem;
    line-height: 1.5;
}

.wmp-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.wmp-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.wmp-toggle input:disabled + .wmp-toggle-track {
    opacity: 0.55;
    cursor: not-allowed;
}

.wmp-toggle input:disabled ~ .wmp-toggle-label {
    opacity: 0.55;
    cursor: not-allowed;
}

.wmp-toggle-label {
    font-size: 0.8125rem;
    color: #374151;
    line-height: 1.4;
}

.wmp-toggle-track {
    flex-shrink: 0;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: #d1d5db;
    position: relative;
    transition: background 0.2s;
}

.wmp-toggle-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s;
}

.wmp-toggle input:checked + .wmp-toggle-track {
    background: #ff6b35;
}

.wmp-toggle input:checked + .wmp-toggle-track::after {
    transform: translateX(20px);
}

.wmp-download-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.wmp-dl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s, background 0.15s;
}

.wmp-dl-btn--std {
    background: #e5e7eb;
    color: #9ca3af;
    pointer-events: none;
}

.wmp-dl-btn--std:not([hidden]) {
    background: #374151;
    color: #ffffff;
    pointer-events: auto;
}

.wmp-dl-btn--std:not([hidden]):hover {
    background: #1f2937;
    color: #ffffff;
}

.wmp-dl-btn--pro {
    background: #ff6b35;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.3);
}

.wmp-dl-btn--pro:hover {
    background: #f85a22;
    color: #ffffff;
}

.wmp-pro-badge {
    display: inline-block;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.25);
    font-size: 0.6875rem;
    font-weight: 700;
}

.wmp-dl-hint {
    font-size: 0.75rem;
    color: #9ca3af;
    text-align: center;
}

.wmp-manual-link {
    font-size: 0.8125rem;
    color: #6b7280;
    text-decoration: none;
    text-align: center;
    line-height: 1.5;
}

.wmp-manual-link:hover {
    color: #ff6b35;
    text-decoration: underline;
}

.wmp-feedback {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #6b7280;
}

.wmp-feedback-btns {
    display: flex;
    gap: 0.5rem;
}

.wmp-feedback-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    font-size: 1rem;
    transition: border-color 0.15s, background 0.15s;
}

.wmp-feedback-btn:hover {
    border-color: #ff6b35;
    background: #fff7f4;
}

@media (max-width: 860px) {
    .wmp-workspace {
        grid-template-columns: 1fr;
    }

    .wmp-preview {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .wmp-preview-inner {
        min-height: 360px;
    }

    .wmp-sidebar {
        padding: 1.25rem 1rem 1.5rem;
    }

    .wmp-upload-bar {
        min-height: 140px;
    }

    .wmp-upload-inline {
        min-height: 116px;
        padding: 1.5rem 1rem;
        flex-direction: column;
        text-align: center;
    }
}

/* 弹窗 */
.site-modal-content { max-width: 420px; width: 92%; }
.site-modal-form { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
.site-modal-label { font-size: 0.85rem; color: var(--site-text-secondary); }
.site-modal-input {
    padding: 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--site-border);
    background: rgba(0,0,0,0.25);
    color: var(--site-text);
}
.site-modal-divider { text-align: center; color: var(--site-text-secondary); font-size: 0.85rem; }
.site-modal-foot { text-align: center; font-size: 0.85rem; color: var(--site-text-secondary); }
.site-modal-foot a { color: var(--site-accent-2); }

/* 支付结果页（成功 / 取消） */
.payment-result-main {
    min-height: calc(100vh - var(--site-nav-h));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem 3rem;
}

.payment-result-card {
    background: var(--site-surface);
    border: 1px solid var(--site-border);
    border-radius: var(--site-radius);
    padding: clamp(1.75rem, 4vw, 2.5rem);
    max-width: 480px;
    width: 100%;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
    text-align: center;
}

.payment-result-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.payment-result-icon--success {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.payment-result-icon--cancel {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.payment-result-card h1 {
    font-size: clamp(1.5rem, 4vw, 1.75rem);
    color: var(--site-text);
    margin: 0 0 0.75rem;
}

.payment-result-card > p,
.payment-result-card .payment-result-message {
    color: var(--site-text-secondary);
    line-height: 1.6;
    margin: 0 0 1.25rem;
}

.payment-order-info {
    background: var(--site-bg);
    border: 1px solid var(--site-border);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1.5rem 0;
    text-align: left;
}

.payment-order-info-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.625rem;
    font-size: 0.9rem;
}

.payment-order-info-item:last-child {
    margin-bottom: 0;
}

.payment-order-info-label {
    color: var(--site-muted);
    flex-shrink: 0;
}

.payment-order-info-value {
    color: var(--site-text);
    font-weight: 600;
    text-align: right;
    word-break: break-all;
}

.payment-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.payment-result-actions .site-btn {
    flex: 1;
    min-width: 8rem;
}

@media (max-width: 480px) {
    .payment-result-actions {
        flex-direction: column;
    }
}

/* 定价页 */
.pricing-landing-main.site-pricing {
    padding: 2rem 1rem 4rem;
    max-width: 1100px;
    margin: 0 auto;
}

.pricing-landing-main.site-pricing h1 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.pricing-header-lead {
    text-align: center;
    color: var(--site-text-secondary);
    margin-bottom: 2rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ========== 全站深色页文字对比度（营销页 + 工具页 + 订阅页） ========== */
body.site-page,
body.site-page.generate-page {
    color: var(--site-text);
}

body.site-page p,
body.site-page li,
body.site-page span,
body.site-page label,
body.site-page h1,
body.site-page h2,
body.site-page h3,
body.site-page h4,
body.site-page summary,
body.site-page .tool-panel,
body.site-page .tool-upload-zone,
body.site-page .tool-upload-zone p {
    color: inherit;
}

body.site-page .site-hero-lead,
body.site-page .site-feature-card p,
body.site-page .site-scenario-item p,
body.site-page .site-faq p,
body.site-page .tool-showcase-desc,
body.site-page .tool-status,
body.site-page .tool-feature-item p,
body.site-page .pricing-header-lead,
body.site-page .pricing-credits-footnote,
body.site-page .site-modal-label,
body.site-page .site-modal-divider,
body.site-page .site-modal-foot {
    color: var(--site-text-secondary);
}

body.site-page .site-scenario-item h3,
body.site-page .site-feature-card h3,
body.site-page .tool-feature-item h4 {
    color: var(--site-text);
}

body.site-page .site-faq details a {
    color: var(--site-accent-2);
}

body.site-page .tool-status.is-error {
    color: #dc2626;
}

/* 页脚：避免 style.css 中深色字 (#334155) 与黑底融合 */
body.site-page .site-footer,
body.site-page .site-footer .footer-inner,
body.site-page .site-footer .footer-copyright {
    color: var(--site-text-secondary) !important;
}

body.site-page .site-footer a {
    color: var(--site-text) !important;
}

body.site-page .site-footer a:hover {
    color: var(--site-accent-2) !important;
}

body.site-page .footer-sep {
    color: var(--site-muted) !important;
    opacity: 1;
}

/* 订阅套餐卡片次要文字 */
body.site-page .plan-desc,
body.site-page .price-credits,
body.site-page .pricing-plans .loading,
body.site-page .plan-description-text {
    color: var(--site-text-secondary) !important;
}

body.site-page .plan-name,
body.site-page .price-amount,
body.site-page .pricing-landing-main h1 {
    color: var(--site-text) !important;
}

/* 导航抽屉 */
body.site-page .nav-drawer,
body.site-page .nav-drawer-link,
body.site-page .nav-drawer-title,
body.site-page .nav-drawer-section-title,
body.site-page .nav-drawer-entry-text {
    color: var(--site-text) !important;
}

body.site-page .nav-drawer-lang-btn .language-name {
    color: var(--site-text-secondary) !important;
}

/* 上传区提示 */
body.site-page .tool-result-preview > span {
    color: var(--site-text-secondary) !important;
}

body.site-page input::placeholder,
body.site-page textarea::placeholder {
    color: #94a3b8;
    opacity: 1;
}

/* 仅 generate-page 的其它页面（dashboard / 登录等若引入本 CSS） */
body.generate-page.site-page main,
body.generate-page.site-page main a:not(.site-btn) {
    color: var(--site-text-secondary);
}

body.generate-page.site-page main a:not(.site-btn):hover {
    color: var(--site-accent-2);
}

/* 浅色页：工具页 / 订阅等 */
body.generate-page.site-page {
    background-color: var(--site-bg);
    color: var(--site-text);
}

body.site-page .pricing-plan,
body.generate-page.site-page .pricing-plan {
    background: #ffffff !important;
    border-color: var(--site-border) !important;
}

body.site-page .plan-name,
body.site-page .price-amount,
body.site-page .plan-btn,
body.generate-page.site-page .plan-name,
body.generate-page.site-page .price-amount {
    color: #111827 !important;
}

body.site-page .plan-btn-primary,
body.site-page .pricing-plan.active .plan-btn {
    color: #ffffff !important;
}

body.site-page .nav-drawer,
body.generate-page .nav-drawer {
    background: #ffffff !important;
    color: #111827 !important;
    box-shadow: 8px 0 32px rgba(15, 23, 42, 0.12) !important;
}

body.site-page .nav-drawer-title,
body.site-page .nav-drawer-close,
body.site-page .nav-drawer-link,
body.site-page .nav-drawer-row,
body.site-page .nav-drawer-entry-text,
body.site-page .nav-drawer-row .upgrade-text,
body.generate-page .nav-drawer-title,
body.generate-page .nav-drawer-close,
body.generate-page .nav-drawer-link,
body.generate-page .nav-drawer-row,
body.generate-page .nav-drawer-entry-text,
body.generate-page .nav-drawer-item-icon {
    color: #111827 !important;
}

body.site-page .nav-drawer-link,
body.site-page .nav-drawer-entry-text,
body.site-page .nav-drawer-row .upgrade-text,
body.generate-page .nav-drawer-link,
body.generate-page .nav-drawer-entry-text,
body.generate-page .nav-drawer-row .upgrade-text {
    font-size: var(--nav-ui-font-size, 1.0625rem) !important;
    font-weight: var(--nav-ui-font-weight, 600) !important;
}

body.site-page .nav-drawer-item-icon,
body.generate-page .nav-drawer-item-icon {
    color: #374151 !important;
}

body.site-page .nav-drawer-header {
    border-bottom-color: var(--site-border) !important;
}

body.site-page .nav-drawer-link,
body.site-page .nav-drawer-row,
body.generate-page .nav-drawer-link,
body.generate-page .nav-drawer-row {
    background: #f3f4f6 !important;
}

body.site-page .nav-drawer-link:hover,
body.generate-page .nav-drawer-link:hover {
    background: #e5e7eb !important;
}

body.site-page .site-modal-input {
    color: #111827;
    background: #f9fafb;
}

/* ========== 用户中心（导航与首页一致，纯色背景无装饰图） ========== */
body.site-page:has(.dashboard-page) {
    background-color: var(--site-bg);
    background-image: none;
    color: var(--site-text);
}

body.site-page:has(.dashboard-page) .dashboard-main {
    padding: 1.5rem 0 3rem;
    min-height: calc(100vh - var(--site-nav-h));
}

body.site-page:has(.dashboard-page) .dashboard-page-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

body.site-page:has(.dashboard-page) .dashboard-page-header h1 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    color: var(--site-text);
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}

body.site-page:has(.dashboard-page) .dashboard-page-lead {
    margin: 0;
    color: var(--site-muted);
    font-size: 1rem;
}

body.site-page:has(.dashboard-page) .dashboard-card {
    background: var(--site-surface);
    border: 1px solid var(--site-border);
    border-radius: var(--site-radius);
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
    padding: clamp(1.25rem, 3vw, 2rem);
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: clamp(1.25rem, 3vw, 2rem);
    position: relative;
}

body.site-page:has(.dashboard-page) .dashboard-card-close-btn {
    background: var(--site-bg);
    color: var(--site-muted);
    border: 1px solid var(--site-border);
}

body.site-page:has(.dashboard-page) .dashboard-card-close-btn:hover {
    background: #eef2ff;
    color: var(--site-accent);
    border-color: rgba(99, 102, 241, 0.35);
}

body.site-page:has(.dashboard-page) .dashboard-sidebar {
    background: var(--site-bg);
    border: 1px solid var(--site-border);
    border-radius: 12px;
    padding: 1rem;
}

body.site-page:has(.dashboard-page) .dashboard-content {
    background: transparent;
    border: none;
    padding: 0;
    backdrop-filter: none;
}

body.site-page:has(.dashboard-page) .dashboard-nav a {
    color: var(--site-text-secondary);
    border-radius: 10px;
    font-weight: 500;
}

body.site-page:has(.dashboard-page) .dashboard-nav a:hover,
body.site-page:has(.dashboard-page) .dashboard-nav a.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--site-accent);
}

body.site-page:has(.dashboard-page) .dashboard-content h2,
body.site-page:has(.dashboard-page) .dashboard-section,
body.site-page:has(.dashboard-page) .user-info .info-item label,
body.site-page:has(.dashboard-page) .user-info .info-item span {
    color: var(--site-text);
}

body.site-page:has(.dashboard-page) .user-info .info-item {
    border-bottom-color: var(--site-border);
}

body.site-page:has(.dashboard-page) .credits-amount {
    color: var(--site-accent);
    font-weight: 700;
}

body.site-page:has(.dashboard-page) .avatar-container {
    border-color: var(--site-border);
}

body.site-page:has(.dashboard-page) .avatar-container:hover {
    border-color: var(--site-accent);
}

body.site-page:has(.dashboard-page) .loading,
body.site-page:has(.dashboard-page) .empty-state,
body.site-page:has(.dashboard-page) .order-item,
body.site-page:has(.dashboard-page) .credit-item,
body.site-page:has(.dashboard-page) .task-item {
    color: var(--site-text-secondary);
}

body.site-page:has(.dashboard-page) .site-btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.8125rem;
    border-radius: 10px;
}

body.site-page:has(.dashboard-page) .btn.btn-primary,
body.site-page:has(.dashboard-page) .btn.btn-small,
body.site-page:has(.dashboard-page) #fixCreditsBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

body.site-page:has(.dashboard-page) .btn.btn-primary,
body.site-page:has(.dashboard-page) #fixCreditsBtn {
    background: linear-gradient(135deg, var(--site-accent), #8b5cf6);
    color: #fff;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

body.site-page:has(.dashboard-page) .btn.btn-small {
    background: var(--site-surface);
    color: var(--site-accent);
    border: 1px solid var(--site-border);
}

body.site-page:has(.dashboard-page) .credits-balance {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--site-bg);
    border: 1px solid var(--site-border);
    border-radius: 12px;
}

body.site-page:has(.dashboard-page) .pricing-credits-note {
    color: var(--site-muted) !important;
    font-size: 0.875rem;
    margin-top: 0.75rem;
}

.site-modal-hint {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.5;
}

.site-modal-hint--muted {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.8125rem;
}

.site-modal-email {
    color: var(--site-accent-2);
    font-weight: 600;
}

.site-modal-input--code {
    text-align: center;
    letter-spacing: 0.35rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.site-modal-confirm-text {
    text-align: center;
    margin: 0 0 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.6;
}

.site-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.site-modal-form--center {
    text-align: center;
    padding: 1.25rem;
}

.site-modal-contact-email {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--site-accent-2);
    text-decoration: none;
    word-break: break-all;
}

.site-modal-contact-email:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    body.site-page:has(.dashboard-page) .dashboard-card {
        grid-template-columns: 1fr;
    }

    body.site-page:has(.dashboard-page) .dashboard-sidebar {
        padding: 0.75rem;
    }

    body.site-page:has(.dashboard-page) .dashboard-nav {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0.35rem;
        -webkit-overflow-scrolling: touch;
    }

    body.site-page:has(.dashboard-page) .dashboard-nav li {
        margin: 0;
        flex: 0 0 auto;
    }

    body.site-page:has(.dashboard-page) .dashboard-nav a {
        white-space: nowrap;
        padding: 0.5rem 0.85rem;
        font-size: 0.875rem;
    }
}

/* ── Manual mask editor full page ── */
body.wm-edit-page {
    overflow: hidden;
    background: #eef0f3;
}

body.wm-edit-page .top-nav {
    position: relative;
    z-index: 20;
}

.wme-main {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    height: calc(100vh - 56px);
    height: calc(100dvh - 56px);
    min-height: 0;
}

.wme-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 0.5rem;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    overflow-y: auto;
}

.wme-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1.5px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    color: #64748b;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.wme-add-btn:hover {
    border-color: #ff6b35;
    color: #ff6b35;
    background: rgba(255, 107, 53, 0.06);
}

.wme-thumbs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    align-items: center;
}

.wme-thumb {
    width: 48px;
    height: 48px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #f1f5f9;
    transition: border-color 0.15s;
}

.wme-thumb.is-active {
    border-color: #3b82f6;
}

.wme-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wme-workspace {
    position: relative;
    min-width: 0;
    min-height: 0;
    background: #eef0f3;
}

.wme-editor.mask-editor-section.is-page-mode {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    margin: 0;
    opacity: 1;
    transform: none;
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    overflow: hidden;
}

.wme-editor .wme-stage.mask-editor-stage {
    flex: 1;
    width: 100%;
    min-height: 0;
    height: auto;
    max-height: none;
    border: none;
    border-radius: 0;
    background: #eef0f3;
    box-shadow: none;
}

.wme-editor .mask-editor-pan-zoom {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.wme-image-wrap {
    position: relative;
    max-width: min(100%, calc(100vw - 360px));
    max-height: calc(100vh - 120px);
    line-height: 0;
}

.wme-image-wrap img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 120px);
    width: auto;
    height: auto;
    object-fit: contain;
}

.wme-image-wrap canvas {
    position: absolute;
    left: 0;
    top: 0;
    width: 100% !important;
    height: 100% !important;
    touch-action: none;
}

.wme-zoom-bar {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.55rem;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    z-index: 5;
}

.wme-zoom-slider {
    width: 88px;
    accent-color: #ff6b35;
}

.wme-history-bar {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    left: auto;
    transform: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    z-index: 5;
}

.wme-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #334155;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}

.wme-icon-btn:hover:not(:disabled) {
    background: #f1f5f9;
    color: #0f172a;
}

.wme-icon-btn.is-active {
    background: rgba(255, 107, 53, 0.12);
    color: #ff6b35;
}

.wme-icon-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.wme-tool-panel {
    width: 220px;
    padding: 1rem;
    margin: 1rem 1rem 1rem 0;
    align-self: start;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
    z-index: 6;
}

.wme-tool-modes {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.wme-tool-mode {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    color: #64748b;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.wme-tool-mode.is-active {
    background: rgba(255, 107, 53, 0.1);
    border-color: #ff6b35;
    color: #ff6b35;
}

.wme-tool-size {
    margin-bottom: 1rem;
}

.wme-tool-size-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.45rem;
}

.wme-tool-size input[type="range"] {
    width: 100%;
    accent-color: #ff6b35;
}

.wme-tool-size .mask-brush-value {
    display: block;
    margin-top: 0.35rem;
    text-align: right;
}

.wme-erase-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff6b35 0%, #f97316 100%);
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.12s;
}

.wme-erase-btn:hover:not(:disabled) {
    opacity: 0.92;
}

.wme-erase-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.wme-loading {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: rgba(238, 240, 243, 0.82);
    backdrop-filter: blur(2px);
}

.wme-loading[hidden] {
    display: none !important;
}

.wme-loading p {
    margin: 0;
    font-size: 0.875rem;
    color: #475569;
}

.wme-tool-tip {
    margin: 0.85rem 0 0;
    font-size: 0.72rem;
    line-height: 1.45;
    color: #64748b;
}

@media (max-width: 900px) {
    .wme-main {
        grid-template-columns: 56px 1fr;
        grid-template-rows: 1fr auto;
    }

    .wme-tool-panel {
        grid-column: 1 / -1;
        width: auto;
        margin: 0 0.75rem 0.75rem;
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 0.75rem;
        align-items: center;
    }

    .wme-tool-modes {
        margin-bottom: 0;
    }

    .wme-tool-size {
        margin-bottom: 0;
    }

    .wme-tool-tip {
        display: none;
    }
}

@media (max-width: 640px) {
    .wme-zoom-bar {
        left: 0.5rem;
        bottom: 0.5rem;
        transform: scale(0.92);
        transform-origin: left bottom;
    }

    .wme-history-bar {
        right: 0.5rem;
        bottom: 0.5rem;
        transform: scale(0.92);
        transform-origin: right bottom;
    }
}
