:root {
    --color-bg: #f7f8fa;
    --color-bg-white: #ffffff;
    --color-text-primary: #1a1a1a;
    --color-text-secondary: #6c7a89;
    --color-text-muted: #95a5a6;
    --color-icon: #3b82f6;
    --color-icon-hover: #2563eb;
    --color-border: #e8ecef;
    --color-shadow: rgba(0, 0, 0, 0.06);
    --color-shadow-hover: rgba(0, 0, 0, 0.12);
    --color-danger: #ef4444;
    
    --radius-card: 16px;
    --radius-icon: 12px;
    --radius-sm: 8px;
    
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 32px;
    --space-xl: 48px;
    --space-2xl: 80px;
    
    --transition-base: 0.3s ease;
    
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
                   'Hiragino Sans GB', 'Microsoft YaHei', Roboto, sans-serif;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

.app {
    height: 100vh;
    width: 100vw;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.background-decoration {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
}

.background-decoration::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -150px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.background-decoration::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.app-header {
    text-align: center;
    padding: var(--space-2xl) var(--space-md) var(--space-xl);
    position: relative;
    z-index: 1;
}

.header-content {
    max-width: 900px;
    margin: 0 auto;
}

.app-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: var(--space-md);
}

.title-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    border-radius: var(--radius-icon);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
}

.title-text {
    letter-spacing: 0.02em;
}

.title-english {
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--color-text-muted);
    font-style: italic;
}

.app-slogan {
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: var(--space-sm);
    letter-spacing: 0.01em;
}

.app-subtitle {
    font-size: 1.15rem;
    color: var(--color-text-muted);
}

.app-main {
    position: relative;
    z-index: 1;
    padding: var(--space-lg) var(--space-md);
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.features-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.features-row {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.feature-card {
    background: var(--color-bg-white);
    border-radius: var(--radius-card);
    padding: var(--space-lg);
    box-shadow: 0 2px 8px var(--color-shadow);
    text-align: center;
    transition: all var(--transition-base);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    width: 280px;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--color-shadow-hover);
}

.card-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
    border-radius: var(--radius-icon);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
    color: var(--color-icon);
    font-size: 1.75rem;
    transition: all var(--transition-base);
}

.feature-card:hover .card-icon {
    background: linear-gradient(135deg, #dbeafe 0%, #c7d2fe 100%);
    color: var(--color-icon-hover);
    transform: scale(1.05);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--space-xs);
    line-height: 1.2;
}

.card-description {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    max-width: 200px;
    text-align: center;
}
/* 工具页面底部版权小字（浅灰、小字号） */
.tool-footer-notice {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: var(--space-sm) var(--space-md);
    color: rgba(100, 100, 100, 0.55);
    font-size: 0.75rem;
    margin-top: var(--space-md);
}

.tool-footer-notice p {
    margin: 0;
}

.app-footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: var(--space-lg) var(--space-md);
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin-top: var(--space-lg);
}

/* 深色页脚样式 */
.app-footer-dark {
    background: #1a1a1a;
    color: rgba(255, 255, 255, 0.7);
    padding: var(--space-lg);
    border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.app-footer-dark p {
    margin: 0;
    line-height: 1.8;
}

.footer-squoosh {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: var(--space-xs);
}

/* 工具页面底部版权小字（浅灰、小字号） */
.coming-soon-notice {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--color-icon);
    border-radius: var(--radius-sm);
    padding: var(--space-md);
    margin-top: var(--space-md);
    text-align: center;
}

.coming-soon-notice i {
    color: var(--color-icon);
    font-size: 1.25rem;
    margin-bottom: var(--space-xs);
    display: block;
}

.coming-soon-notice p {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    margin: 0 0 var(--space-xs) 0;
}

.coming-soon-notice .notice-hint {
    color: var(--color-text-muted);
    font-size: 0.75rem;
}

@media (max-width: 1200px) {
    .features-grid {
        max-width: 900px;
    }
    
    .features-row {
        gap: var(--space-md);
    }
}

@media (max-width: 768px) {
    .features-grid {
        max-width: 600px;
        gap: var(--space-md);
    }
    
    .features-row {
        gap: var(--space-sm);
    }
    
    .feature-card {
        padding: var(--space-md);
        min-height: 180px;
        width: 260px;
    }
    
    .card-icon {
        width: 64px;
        height: 64px;
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .features-grid {
        max-width: 100%;
        padding: 0 var(--space-sm);
        gap: var(--space-sm);
    }
    
    .features-row {
        gap: var(--space-xs);
    }
    
    .app-title {
        flex-direction: column;
        gap: var(--space-xs);
        font-size: 1.75rem;
    }
    
    .title-english {
        font-size: 1rem;
    }
    
    .app-slogan {
        font-size: 1.125rem;
    }
    
    .feature-card {
        padding: var(--space-sm);
        min-height: 160px;
        width: 240px;
    }
    
    .card-icon {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }
}

/* ============================================
   批量贴图页面样式
   ============================================ */
.app-header-mini {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    padding: var(--space-md) var(--space-md);
    gap: var(--space-md);
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-bg-white);
    color: var(--color-text-secondary);
    text-decoration: none;
    border-radius: var(--radius-icon);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 2px 8px var(--color-shadow);
    transition: all var(--transition-base);
}

.back-btn:hover {
    background: var(--color-bg-white);
    color: var(--color-icon);
    transform: translateX(-4px);
    box-shadow: 0 4px 12px var(--color-shadow-hover);
}

.back-btn i {
    font-size: 0.85rem;
}

.page-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.page-title i {
    color: var(--color-icon);
}

.watermark-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-md) var(--space-md) var(--space-md);
    gap: var(--space-md);
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
    min-height: 0;
}

.thumbnail-sidebar {
    position: relative;
    width: 320px;
    min-width: 260px;
    max-width: 400px;
    background: var(--color-bg-white);
    border-radius: var(--radius-card);
    box-shadow: 0 4px 16px var(--color-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
    min-height: 0;
}

.thumbnail-list-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    z-index: 1;
}

.sidebar-resize-handle {
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 100%;
    background: transparent;
    cursor: ew-resize;
    z-index: 10;
    transition: background 0.2s ease;
}

.sidebar-resize-handle:hover,
.sidebar-resize-handle:active {
    background: var(--color-icon);
}

.sidebar-resize-handle::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 2px;
    transform: translateY(-50%);
    width: 2px;
    height: 40px;
    background: var(--color-border);
    border-radius: 2px;
    transition: background 0.2s ease;
}

.sidebar-resize-handle:hover::after {
    background: var(--color-icon);
}

.sidebar-header {
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.image-count {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    background: var(--color-bg);
    padding: 4px 12px;
    border-radius: 20px;
}

.upload-zone {
    position: absolute;
    top: 85px;
    left: var(--space-sm);
    right: var(--space-sm);
    padding: var(--space-md);
    border: 2px dashed var(--color-icon);
    border-radius: var(--radius-icon);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
}

.upload-zone:hover {
    border-color: var(--color-icon);
    background: rgba(59, 130, 246, 0.05);
}

.upload-zone.dragover {
    border-color: var(--color-icon);
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.25);
}

.upload-content {
    position: relative;
    z-index: 1;
}

.upload-zone i {
    font-size: 2rem;
    color: var(--color-icon);
    margin-bottom: var(--space-xs);
}

.upload-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 2px;
}

.upload-hint {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    margin-bottom: 4px;
}

.upload-formats {
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

.thumbnail-list-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--space-sm);
    scroll-behavior: smooth;
    min-height: 0;
}

.thumbnail-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    padding-top: 160px;
}

.thumbnail-list::-webkit-scrollbar {
    width: 8px;
}

.thumbnail-list::-webkit-scrollbar-track {
    background: transparent;
    margin: 4px 0;
}

.thumbnail-list::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.thumbnail-list::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-muted);
    border: 2px solid transparent;
    background-clip: padding-box;
}

.thumbnail-item {
    position: relative;
    border-radius: var(--radius-icon);
    overflow: hidden;
    cursor: pointer;
    transition: opacity 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    border: 2px solid transparent;
    background: var(--color-bg);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: 0 0;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

.thumbnail-item.covered {
    opacity: 0.4;
}

.thumbnail-item img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

.thumbnail-item:hover {
    border-color: var(--color-icon);
}

.thumbnail-item.active {
    border-color: var(--color-icon);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.thumbnail-index {
    position: absolute;
    top: var(--space-xs);
    left: var(--space-xs);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.thumbnail-filename {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px 6px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 0.65rem;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.thumbnail-delete {
    position: absolute;
    top: var(--space-xs);
    right: var(--space-xs);
    width: 24px;
    height: 24px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--transition-base);
    font-size: 0.7rem;
}

.thumbnail-item:hover .thumbnail-delete {
    opacity: 1;
}

.thumbnail-delete:hover {
    background: rgba(239, 68, 68, 1);
    transform: scale(1.1);
}

.empty-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    text-align: center;
    width: 100%;
    padding: var(--space-md);
    pointer-events: none;
}

.empty-hint i {
    font-size: 3rem;
    margin-bottom: var(--space-sm);
    opacity: 0.3;
}

.empty-hint p {
    font-size: 0.95rem;
    font-weight: 500;
}

.hint-sub {
    font-size: 0.85rem;
    font-weight: 400;
}

.canvas-editor {
    flex: 1;
    background: var(--color-bg-white);
    border-radius: var(--radius-card);
    box-shadow: 0 4px 16px var(--color-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    min-height: 0;
}

.editor-header {
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.editor-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.editor-actions {
    display: flex;
    gap: var(--space-xs);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-icon);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    border: none;
}

.btn-primary {
    background: var(--color-icon);
    color: white;
}

.btn-primary:hover {
    background: var(--color-icon-hover);
}

.btn-secondary {
    background: var(--color-bg);
    color: var(--color-text-secondary);
}

.btn-secondary:hover {
    background: var(--color-border);
    color: var(--color-text-primary);
}

.canvas-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    position: relative;
    overflow: auto;
    width: 100%;
    height: 100%;
    padding: 50px;
    box-sizing: border-box;
    min-height: 0;
}

.slice-line {
    width: 100%;
    height: 0.5px;
    background-color: #dc2626;
    flex-shrink: 0;
    flex-grow: 0;
    pointer-events: none;
    z-index: 100;
}

#previewCanvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    transition: transform 0.2s ease;
    transform-origin: center center;
}

.canvas-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    text-align: center;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.canvas-placeholder i {
    font-size: 4rem;
    margin-bottom: var(--space-sm);
    opacity: 0.3;
}

.canvas-placeholder p {
    font-size: 1.1rem;
    font-weight: 500;
}

.placeholder-hint {
    font-size: 0.9rem;
    font-weight: 400;
    margin-top: var(--space-xs);
}

@media (max-width: 900px) {
    .watermark-container {
        flex-direction: column;
        padding: var(--space-sm);
    }
    
    .thumbnail-sidebar {
        width: 100% !important;
        min-width: 100%;
        max-width: 100%;
        flex-direction: row;
        flex: 0 0 auto;
        max-height: 40vh;
    }

    .sidebar-resize-handle {
        display: none;
    }
    
    .sidebar-header {
        writing-mode: vertical-rl;
        text-orientation: mixed;
        border-bottom: none;
        border-right: 1px solid var(--color-border);
        padding: var(--space-sm);
        flex-shrink: 0;
    }
    
    .upload-zone {
        writing-mode: vertical-rl;
        text-orientation: mixed;
        margin: var(--space-sm);
        padding: var(--space-md) var(--space-sm);
        flex-direction: row;
        flex-shrink: 0;
        top: var(--space-sm);
    }
    
    .upload-zone i {
        margin-bottom: 0;
        margin-right: var(--space-xs);
    }
    
    .upload-text, .upload-hint, .upload-formats {
        writing-mode: horizontal-tb;
    }
    
    .thumbnail-list-wrapper {
        flex: 1;
        overflow: hidden;
    }
    
    .thumbnail-list-container {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        min-height: 0;
    }
    
    .thumbnail-list {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        padding-top: 0;
    }
    
    .main-content {
        flex-direction: column;
    }

    .sticker-panel {
        width: 100%;
        order: 2;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        padding: var(--space-md);
        gap: var(--space-md);
    }

    .sticker-list {
        flex-wrap: wrap;
        justify-content: center;
    }

    .btn-apply {
        width: auto;
        flex-shrink: 0;
    }
}

.main-content {
    flex: 1;
    display: flex;
    min-height: 0;
    overflow: hidden;
}

.canvas-editor {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.canvas-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center center;
    pointer-events: none;
}

.sticker-panel {
    width: 180px;
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
    border-left: 1px solid var(--color-border);
    padding: var(--space-sm);
    flex-shrink: 0;
    min-height: 0;
    overflow: hidden;
}

.panel-header {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.template-actions {
    display: flex;
    gap: var(--space-xs);
}

.template-actions .btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.template-actions .btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
}

.sticker-upload {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-icon);
    padding: var(--space-md);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    margin-bottom: var(--space-sm);
    position: relative;
    z-index: 10;
}

.sticker-upload:hover {
    border-color: var(--color-icon);
    background: rgba(59, 130, 246, 0.05);
}

.sticker-upload-content i {
    font-size: 1.5rem;
    color: var(--color-icon);
    margin-bottom: var(--space-xs);
}

.sticker-upload-content p {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin: 2px 0;
}

.sticker-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.sticker-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: grab;
    border: 2px solid transparent;
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.sticker-item:hover {
    border-color: var(--color-icon);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sticker-item.selected {
    border-color: var(--color-icon);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.sticker-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sticker-delete {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.sticker-item:hover .sticker-delete {
    opacity: 1;
}

.sticker-delete:hover {
    background: var(--color-danger);
}

.btn-apply {
    width: 100%;
    padding: var(--space-sm);
    font-size: 0.85rem;
    gap: var(--space-xs);
    margin-top: auto;
}

.sticker-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-top: auto;
}

.template-selector {
    margin-bottom: var(--space-sm);
}

.template-select {
    width: 100%;
    padding: var(--space-xs);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg-white);
    color: var(--color-text-primary);
    font-size: 0.85rem;
    margin-bottom: var(--space-xs);
}

.template-select:focus {
    outline: none;
    border-color: var(--color-icon);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.template-preview {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    max-height: 200px;
    overflow-y: auto;
    padding: var(--space-xs);
    background: var(--color-bg);
    border-radius: var(--radius-sm);
}

.template-sticker-preview {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs);
    background: var(--color-bg-white);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}

.template-sticker-preview img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.template-sticker-info {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sticker-actions .btn {
    width: 100%;
    padding: var(--space-sm);
    font-size: 0.85rem;
    gap: var(--space-xs);
}

.btn-cancel-apply {
    font-size: 0.8rem;
}

.btn-download {
    font-size: 0.9rem;
    font-weight: 600;
    padding: var(--space-sm) var(--space-md) !important;
}

.sticker-instance {
    position: absolute;
    cursor: move;
    pointer-events: auto;
    transform-origin: center center;
    border: 1px solid transparent;
    transition: border-color var(--transition-base), background var(--transition-base);
}

.sticker-instance.selected {
    border-color: var(--color-icon);
    background: rgba(59, 130, 246, 0.05);
}

.sticker-instance img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
}

.sticker-instance-controls {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.sticker-instance-delete {
    position: absolute;
    top: -18px;
    right: -18px;
    width: 24px;
    height: 24px;
    border: none;
    background: var(--color-danger);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base), transform var(--transition-base);
    pointer-events: auto;
    z-index: 10;
}

.sticker-instance:hover .sticker-instance-delete,
.sticker-instance.selected .sticker-instance-delete {
    opacity: 1;
}

.sticker-instance-delete:hover {
    transform: scale(1.1);
}

.sticker-instance-resize-handles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.sticker-instance-resize-handle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: white;
    border: 1px solid var(--color-icon);
    pointer-events: auto;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.sticker-instance:hover .sticker-instance-resize-handle,
.sticker-instance.selected .sticker-instance-resize-handle {
    opacity: 1;
}

.sticker-instance-resize-handle.corner {
    width: 10px;
    height: 10px;
    border-radius: 0;
}

.sticker-instance-resize-handle.top-left {
    top: -5px;
    left: -5px;
    cursor: nwse-resize;
}

.sticker-instance-resize-handle.top-right {
    top: -5px;
    right: -5px;
    cursor: nesw-resize;
}

.sticker-instance-resize-handle.bottom-left {
    bottom: -5px;
    left: -5px;
    cursor: nesw-resize;
}

.sticker-instance-resize-handle.bottom-right {
    bottom: -5px;
    right: -5px;
    cursor: nwse-resize;
}

.sticker-instance-resize-handle.top {
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    cursor: ns-resize;
}

.sticker-instance-resize-handle.bottom {
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    cursor: ns-resize;
}

.sticker-instance-resize-handle.left {
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    cursor: ew-resize;
}

.sticker-instance-resize-handle.right {
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    cursor: ew-resize;
}

.sticker-instance-rotate-handle {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: white;
    border: 1px solid var(--color-icon);
    border-radius: 50%;
    cursor: grab;
    pointer-events: auto;
    opacity: 0;
    transition: opacity var(--transition-base);
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sticker-instance:hover .sticker-instance-rotate-handle,
.sticker-instance.selected .sticker-instance-rotate-handle {
    opacity: 1;
}

.sticker-instance-rotate-handle::before {
    content: '';
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, var(--color-icon) 25%, transparent 25%), 
                linear-gradient(-135deg, var(--color-icon) 25%, transparent 25%);
    background-size: 8px 8px;
    background-position: 2px 2px;
    border-radius: 2px;
}

.sticker-instance-rotate-handle:active {
    cursor: grabbing;
}

.sticker-instance-rotate-line {
    position: absolute;
    top: -19px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 16px;
    background: var(--color-icon);
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

.sticker-instance:hover .sticker-instance-rotate-line,
.sticker-instance.selected .sticker-instance-rotate-line {
    opacity: 1;
}

.toast {
    position: fixed;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-icon);
    font-size: 0.9rem;
    opacity: 0;
    transition: all var(--transition-base);
    pointer-events: none;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 智能切图页面样式 */
.split-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-md) var(--space-md) var(--space-md);
    gap: var(--space-md);
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
    align-items: stretch;
    min-height: 0;
}

.split-sidebar {
    width: 320px;
    min-width: 260px;
    max-width: 400px;
    background: var(--color-bg-white);
    border-radius: var(--radius-card);
    box-shadow: 0 4px 16px var(--color-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
    min-height: 0;
    padding-top: 40px;
    align-items: center;
}

.split-sidebar > * {
    width: 100%;
}

.upload-area {
    padding: var(--space-md);
    border: 2px dashed var(--color-icon);
    border-radius: var(--radius-icon);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    margin: 0 var(--space-md) var(--space-md);
    flex-shrink: 0;
}

.upload-area:hover {
    border-color: var(--color-icon-hover);
    background: rgba(59, 130, 246, 0.05);
}

.upload-area i {
    font-size: 2rem;
    color: var(--color-icon);
    margin-bottom: var(--space-xs);
}

.upload-area p {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 2px;
}

.upload-area .upload-hint {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.split-panel-bottom {
    padding: var(--space-md);
    border-top: 1px solid var(--color-border);
    flex-shrink: 0;
}

/* 左侧侧边栏内容区：作为可滚动容器（上传区固定、下方设置区可独立滚动） */
.split-sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* 切图页面：split-panel-bottom 直接作为子节点时，自身成为滚动容器 */
.split-sidebar > .split-panel-bottom:last-child {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    border-top: none;
}

.split-main {
    flex: 1;
    background: var(--color-bg-white);
    border-radius: var(--radius-card);
    box-shadow: 0 4px 16px var(--color-shadow);
    display: flex;
    overflow: hidden;
    min-width: 0;
}

.split-main-inner {
    display: flex;
    width: 100%;
    min-height: 0;
}

.split-info-panel {
    width: 280px;
    min-width: 240px;
    max-width: 340px;
    border-left: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
    background: #fafbfc;
}

.info-panel-header {
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.info-panel-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.info-panel-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--space-sm);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.info-item {
    background: white;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    padding: var(--space-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
}

.info-item:hover {
    border-color: var(--color-icon);
}

.info-item.active {
    border-color: var(--color-icon);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.info-item-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--space-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 28px;
}

.info-item-stats {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-item-stat {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    display: flex;
    justify-content: space-between;
}

.info-item-stat span:last-child {
    color: var(--color-text-secondary);
    font-weight: 500;
}

.info-item-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.9);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    z-index: 10;
    transition: transform 0.15s;
}

.info-item-remove:hover {
    transform: scale(1.1);
}

/* 切图页面画布区域特殊样式 */
.split-main .canvas-wrapper {
    width: auto;
    flex: 1;
    min-width: 0;
}

.split-settings {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.setting-row {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.setting-row .setting-item {
    flex: 1;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    align-items: center;
    text-align: center;
}

.setting-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-primary);
}

.setting-input {
    padding: var(--space-sm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    width: 100%;
    text-align: center;
    outline: none;
    transition: border-color var(--transition-base);
    -moz-appearance: textfield;
}

.setting-input::-webkit-outer-spin-button,
.setting-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.setting-input:focus {
    border-color: var(--color-icon);
}

.btn-apply-all {
    background: #60a5fa;
    color: white;
    width: 100%;
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.9rem;
}

.btn-apply-all:hover {
    background: #3b82f6;
}

/* 去掉不再使用的同行布局 */
.setting-input-row {
    /* 保留 class 定义以避免其他地方引用时出错，但不启用横向布局 */
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.apply-all-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.apply-all-dialog {
    background: white;
    border-radius: var(--radius-card);
    padding: var(--space-xl);
    min-width: 340px;
    max-width: 440px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
}

.apply-all-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--space-xs);
    text-align: center;
}

.apply-all-desc {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
    text-align: center;
}

.apply-all-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.apply-all-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: var(--space-md);
    font-size: 0.95rem;
}

.apply-all-option i {
    font-size: 1.1rem;
}

.apply-all-option[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}

.apply-all-value {
    font-size: 0.75rem;
    opacity: 0.85;
    font-weight: 400;
}

.apply-all-cancel-row {
    display: flex;
    justify-content: center;
}

.apply-all-cancel {
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.85rem;
}

.setting-hint {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.slice-preview {
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    padding: var(--space-sm);
    min-height: 80px;
}

.preview-info {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xs);
}

.preview-slices {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.preview-slice {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid var(--color-border);
}

.preview-slice-single {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-primary);
    background: white;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    text-align: center;
}

.btn-split {
    margin-top: var(--space-sm);
}

.btn-group {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.btn-group .btn {
    flex: 1;
    margin-top: 0;
}

.btn-download {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.btn-download:hover {
    background: linear-gradient(135deg, #059669, #047857);
}

.btn-download:active {
    transform: scale(0.98);
}

.canvas-container {
    width: 100%;
    height: 100%;
    cursor: grab;
    transition: transform var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

#canvasSlicesContainer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

.slice-preview-container {
    line-height: 0;
    font-size: 0;
}

.canvas-container canvas {
    display: block;
    flex-shrink: 0;
}

.canvas-container:hover {
    cursor: grab;
}

.canvas-container:active {
    cursor: grabbing;
}

/* ============================================
   图片拼合和格式转换页面样式
   ============================================ */
.direction-buttons,
.format-buttons,
.align-buttons {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.direction-btn,
.format-btn,
.align-btn {
    flex: 1;
    min-width: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-bg);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
}

.direction-btn:hover,
.format-btn:hover,
.align-btn:hover {
    background: var(--color-border);
    color: var(--color-text-primary);
}

.direction-btn.active,
.format-btn.active,
.align-btn.active {
    background: var(--color-icon);
    color: white;
    border-color: var(--color-icon);
}

.thumbnail-remove {
    position: absolute;
    top: var(--space-xs);
    right: var(--space-xs);
    width: 24px;
    height: 24px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--transition-base);
    font-size: 0.7rem;
    z-index: 10;
}

.thumbnail-item:hover .thumbnail-remove {
    opacity: 1;
}

.thumbnail-remove:hover {
    background: rgba(239, 68, 68, 1);
    transform: scale(1.1);
}

.thumbnail-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px 6px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 0.65rem;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quality-slider-container {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.quality-slider {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: var(--color-bg);
    outline: none;
    cursor: pointer;
}

.quality-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-icon);
    min-width: 50px;
    text-align: center;
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
    padding: var(--space-md);
    overflow-y: auto;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.preview-grid-item {
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    min-height: 80px;
}

.preview-grid-item img {
    width: 100%;
    height: 160px;
    object-fit: contain;
    background: #f8f9fa;
    display: block;
}

.preview-grid-info {
    padding: var(--space-xs);
    font-size: 0.8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.preview-grid-name {
    color: var(--color-text-primary);
    font-weight: 500;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-grid-size {
    color: var(--color-text-muted);
    margin-bottom: 2px;
}

.preview-grid-format {
    color: var(--color-icon);
    font-weight: 500;
    margin-bottom: 2px;
}

.preview-grid-estimated {
    color: var(--color-text-secondary);
    font-size: 0.75rem;
}

.preview-grid-item {
    position: relative;
}

.preview-grid-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.9);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    z-index: 10;
    transition: transform 0.15s;
}

.preview-grid-remove:hover {
    transform: scale(1.1);
}

.small-input {
    width: 70px;
    text-align: center;
}

.grid-size-container {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.grid-separator {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.gap-slider-container {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.gap-slider {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: var(--color-bg);
    outline: none;
    cursor: pointer;
}

.gap-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-icon);
    cursor: pointer;
}

.gap-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-icon);
    cursor: pointer;
    border: none;
}

.link-button {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 0.9rem;
}

.link-button:hover {
    background: var(--color-border);
    color: var(--color-text-primary);
}

.link-button.active {
    background: var(--color-icon);
    color: white;
    border-color: var(--color-icon);
}

.link-button .fa-unlink {
    opacity: 0.7;
}

.input-with-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.controls-stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.control-btn {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 0.7rem;
    padding: 0;
}

.control-btn:hover {
    background: var(--color-icon);
    color: white;
    border-color: var(--color-icon);
}

.control-btn:active {
    transform: scale(0.95);
}

.input-with-controls .small-input {
    width: 50px;
}

/* 小屏幕高度响应式优化 */
@media (max-height: 800px) {
    .app-header {
        padding: var(--space-md) var(--space-md) var(--space-sm);
    }
    
    .app-title {
        font-size: 1.75rem;
    }
    
    .title-icon {
        width: 36px;
        height: 36px;
    }
    
    .app-slogan {
        font-size: 1rem;
    }
    
    .app-subtitle {
        font-size: 0.85rem;
    }
    
    .feature-card {
        padding: var(--space-sm);
    }
    
    .card-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .card-description {
        font-size: 0.8rem;
    }
    
    .app-header-mini {
        padding: var(--space-sm) var(--space-md);
    }
    
    .page-title {
        font-size: 1.25rem;
    }
    
    .sidebar-header {
        padding: var(--space-sm);
    }
    
    .upload-area {
        margin: var(--space-sm);
        padding: var(--space-sm);
    }
    
    .upload-zone {
        padding: var(--space-sm);
    }
    
    .thumbnail-list-container {
        padding: var(--space-xs);
    }
    
    .editor-header {
        padding: var(--space-sm);
    }
    
    .canvas-wrapper {
        padding: 20px;
    }
    
    .sticker-panel {
        padding: var(--space-xs);
    }
    
    .panel-header {
        padding: var(--space-xs) 0;
        margin-bottom: var(--space-xs);
    }
    
    .sticker-upload {
        padding: var(--space-sm);
        margin-bottom: var(--space-xs);
    }
    
    .sticker-list {
        gap: var(--space-xs);
        margin-bottom: var(--space-sm);
    }
    
    .split-panel-bottom {
        padding: var(--space-sm);
    }
    
    .split-settings {
        gap: var(--space-sm);
    }
    
    .setting-row {
        gap: var(--space-sm);
    }
    
    .btn {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.85rem;
    }
    
    .btn-apply {
        padding: var(--space-sm);
        font-size: 0.8rem;
    }
    
    .sticker-actions .btn {
        padding: var(--space-sm);
        font-size: 0.8rem;
    }
    
    .btn-download {
        padding: var(--space-sm) var(--space-md) !important;
    }

    /* 切图/拼合页面小屏下的额外压缩 */
    .split-sidebar {
        padding-top: 20px;
    }

    .split-sidebar-content {
        overflow-y: auto;
    }

    .split-sidebar > .split-panel-bottom:last-child {
        padding: var(--space-sm);
        overflow-y: auto;
    }

    .setting-item {
        margin-bottom: 0;
    }

    .setting-item .setting-label {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }

    .setting-input {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .slice-preview {
        min-height: 60px;
        max-height: 120px;
    }

    .preview-info {
        font-size: 0.8rem;
    }
}
