/* Image-only layouts and responsive controls; shared tool-workspace.css owns the shell. */
.image-more-page .tool-workspace,
.image-more-page .tool-workspace > *,
.image-more-page .image-more-icon-layout > *,
.image-more-page .image-more-settings-grid > * { min-width: 0; }
.image-more-page .image-more-settings { margin-top: 22px; }
.image-more-page .image-more-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
}

.image-more-page .image-more-settings-grid select,
.image-more-page .image-more-settings-grid input:not([type="checkbox"]):not([type="radio"]) {
    max-width: 100%;
    min-width: 0;
}
.image-more-page .image-more-settings-grid .control-group { margin-bottom: 0; }
.image-more-page .image-more-settings-grid > [class*="col-"] { width: 100%; float: none; padding: 0; }
.image-more-page .image-more-advanced { margin-top: 16px; }
.image-more-page .image-more-advanced[open] > summary { margin-bottom: 16px; }
.image-more-page .image-more-help { margin: 22px 0; }
.image-more-page .image-more-help-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.image-more-page .image-more-help .tool-side-card,
.image-more-page .image-more-help .tool-section { margin-top: 16px; }
.image-more-page .image-more-choose { margin: 4px 0 12px; }
.image-more-page .tool-section-card .btn { min-height: 40px; padding: 9px 15px; border-radius: 8px; font-size: 14px; white-space: normal; }
.image-more-page .tool-section-card .btn-primary { background: var(--brand, #2563eb); border-color: var(--brand, #2563eb); color: #fff; }
.image-more-page .tool-section-card .btn-default { background: var(--card-bg, #fff); border-color: var(--border-main, #e2e8f0); color: var(--text-sub, #334155); }
.image-more-page .image-more-preset-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.image-more-page .tool-workspace .image-more-preset-row .is-active {
    color: var(--brand, #2563eb);
    background: var(--brand-soft, #eff6ff);
    border-color: var(--brand, #2563eb);
}
.image-more-page .batch-actions,
.image-more-page .builder-actions,
.image-more-page .rename-file-head,
.image-more-page .rename-result-head { flex-wrap: wrap; gap: 10px; }
.image-more-page .format-card-info,
.image-more-page .format-card-meta,
.image-more-page .rename-file-head > *,
.image-more-page .stitch-preview-item { min-width: 0; }
.image-more-page .format-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.image-more-page .bd-image-grid,
.image-more-page .format-advantage-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.image-more-page .format-batch-bar,
.image-more-page .stitch-file-head-actions { flex-wrap: wrap; gap: 10px; }
.image-more-page .size-mode-tabs,
.image-more-page .ico-tabs,
.image-more-page .ico-fit-options,
.image-more-page .ico-label-row,
.image-more-page .ico-download-btn-group,
.image-more-page .ico-code-header { flex-wrap: wrap; }
.image-more-page .size-mode-tab,
.image-more-page .size-preset-badge,
.image-more-page .ico-tab-item { min-height: 44px; white-space: normal; }
.image-more-page .size-lock-btn { min-height: 44px; }
.image-more-page .image-more-icon-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: start;
    gap: 24px;
}
.image-more-page .ico-config-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.image-more-page .ico-config-group { min-width: 0; }
.image-more-page .ico-preview-section { margin-top: 0; }
.image-more-page .ico-mock-browsers { grid-template-columns: minmax(0, 1fr); }
.image-more-page .ico-sizes-preview { flex-wrap: wrap; overflow: visible; }
.image-more-page .ico-size-card { min-width: 76px; flex: 1 1 76px; }
.image-more-page .ico-preview-head { flex-wrap: wrap; gap: 8px; }
.image-more-page .ico-emoji-grid { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); }
.image-more-page .ico-emoji-grid button { min-height: 44px; border: 1px solid var(--border-main, #e2e8f0); border-radius: 8px; background: var(--card-muted-bg, #f8fafc); font-size: 24px; }
.image-more-page .exif-table-row > *,
.image-more-page .exif-value { min-width: 0; overflow-wrap: anywhere; }
.image-more-page .grid-pieces-container { min-width: 0; }
.image-more-page .grid-piece { min-width: 0; }
.image-more-page .stitch-card-controls { flex-wrap: wrap; }
.image-more-page .stitch-card-controls .btn-icon { min-height: 40px; min-width: 36px; }
.image-more-page .grid-pieces-container.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.image-more-page .grid-pieces-container.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Watermark uses its own workspace so the preview and final action stay near settings. */
.image-more-page .wm-split-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
.image-more-page .wm-preview-col,
.image-more-page .wm-config-col { width: auto; min-width: 0; }
.image-more-page .wm-workspace-actions {
    grid-column: 1 / -1;
    margin: 0;
    padding: 16px 20px;
    border: 1px solid var(--border-main, #e2e8f0);
    border-radius: 12px;
    background: var(--card-bg, #fff);
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}
.image-more-page .wm-stage-header,
.image-more-page .wm-stage-title,
.image-more-page .wm-stage-actions,
.image-more-page .wm-workspace-actions,
.image-more-page .wm-quick-actions { flex-wrap: wrap; gap: 10px; }
.image-more-page .wm-stage-footer > div { min-width: 0; }
.image-more-page .wm-stage-subtitle { width: 100%; margin-left: 0; }
.image-more-page .wm-preview-wrapper { min-height: 280px; }
.image-more-page .wm-preview-placeholder { min-height: 280px; padding: 24px 16px; }
.image-more-page .wm-upload-hero h3 { font-size: 19px; }
.image-more-page .wm-upload-chips { display: none; }
.image-more-page .wm-split-workspace .btn,
.image-more-page .wm-quick-btn,
.image-more-page .wm-nav-tabs > li > a,
.image-more-page .wm-preset-tag { min-height: 44px; font-size: 14px; }
.image-more-page .wm-split-workspace .btn-primary {
    background: var(--brand, #2563eb);
    border-color: var(--brand, #2563eb);
    color: #fff;
}
.image-more-page .wm-split-workspace .form-control { min-height: 40px; font-size: 14px; }
.image-more-page .wm-preset-tag { display: inline-flex; align-items: center; white-space: normal; }
.image-more-page .wm-nav-tabs { display: flex; }
.image-more-page .wm-nav-tabs > li { flex: 1; min-width: 0; }
.image-more-page .wm-nav-tabs > li > a { white-space: normal; }
.image-more-page .wm-grid-3col { grid-template-columns: minmax(0, 1fr); }

/* Background editor is rendered outside the page shell. */
#bdModal .bd-modal-dialog { background: var(--card-bg, #fff); }
#bdModal .bd-modal-header { flex-wrap: wrap; gap: 12px; position: relative; padding-right: 64px; }
#bdModal .bd-modal-title { min-width: 0; max-width: 100%; }
#bdModal .bd-modal-title > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#bdModal .bd-modal-nav { flex-wrap: wrap; gap: 8px; }
#bdModal #btnModalClose {
    position: absolute; right: 12px; top: 10px; width: 44px; height: 44px;
    margin: 0 !important; opacity: 1; color: var(--text-main, #334155);
}
#bdModal .btn,
#bdModal .bd-preset-btn,
#bdModal .bd-mode-item,
#bdModal .bd-pipette-btn { min-height: 44px; }
#bdModal .btn-primary { background: var(--brand, #2563eb); border-color: var(--brand, #2563eb); color: #fff; }
#bdModal .bd-modal-body { min-height: 0; }
#bdModal .bd-modal-sidebar { min-width: 0; }
#bdModal .bd-modal-sidebar .form-control { min-width: 0; }
#bdModal .bd-modal-canvas-stage { max-width: 100%; }
#bdModal .bd-modal-canvas-info { max-width: calc(100% - 24px); flex-wrap: wrap; justify-content: center; }
#bdModal .bd-pipette-toast { width: calc(100% - 24px); max-width: 420px; }
#bdModal .bd-modal-footer { flex-shrink: 0; flex-wrap: wrap; gap: 10px; }
#bdModal .image-more-advanced { padding: 12px; border: 1px solid var(--border-main, #e2e8f0); border-radius: 8px; }
#bdModal .image-more-advanced > summary { cursor: pointer; font-weight: 600; min-height: 30px; }
#bdModal .image-more-advanced[open] > summary { margin-bottom: 12px; }
html[data-theme="dark"] .image-more-page .bd-image-card,
html[data-theme="dark"] #bdModal .bd-modal-sidebar,
html[data-theme="dark"] #bdModal .sidebar-card,
html[data-theme="dark"] #bdModal .sidebar-section,
html[data-theme="dark"] #bdModal .bd-preset-btn,
html[data-theme="dark"] #bdModal .btn-default { background: var(--card-bg, #172234); color: var(--text-sub, #dbe4f0); border-color: var(--border-main, #334155); }
html[data-theme="dark"] #bdModal .bd-modal-header,
html[data-theme="dark"] #bdModal .bd-modal-footer { background: var(--card-muted-bg, #172234); }
html[data-theme="dark"] #bdModal .bd-mode-pill-sidebar { background: var(--page-bg, #0f172a); }
html[data-theme="dark"] #bdModal .bd-mode-item.active { background: var(--brand-soft, #13243b); color: var(--brand, #8ab4ff); }
html[data-theme="dark"] #bdModal .btn-primary { background: #2563eb; border-color: #2563eb; }
html[data-theme="dark"] .image-more-page .tool-section-card .btn-primary { background: #2563eb; border-color: #2563eb; }

@media (max-width: 991px) {
    .image-more-page .image-more-icon-layout,
    .image-more-page .wm-split-workspace { grid-template-columns: minmax(0, 1fr); }
    #bdModal { padding: 10px; }
    #bdModal .bd-modal-dialog { width: 100%; height: calc(100dvh - 20px); max-height: calc(100dvh - 20px); }
    #bdModal .bd-modal-body { display: block; overflow-y: auto; overscroll-behavior: contain; }
    #bdModal .bd-modal-canvas-container { min-height: 250px; height: 36vh; padding: 18px 12px 46px; overflow: hidden; }
    #bdModal .bd-modal-canvas-stage { max-height: 100%; }
    #bdModalPreviewCanvas { max-height: 100%; object-fit: contain; }
    #bdModal .bd-modal-sidebar { width: 100%; height: auto; overflow: visible; border-left: 0; }
}
@media (max-width: 600px) {
    .image-more-page .image-more-settings-grid,
    .image-more-page .image-more-help-grid,
    .image-more-page .ico-config-grid,
    .image-more-page .rename-upload-grid,
    .image-more-page .compress-options-grid,
    .image-more-page .exif-info-grid,
    .image-more-page .exif-preview { grid-template-columns: minmax(0, 1fr); }
    .image-more-page .format-list-mode .format-card-item { flex-direction: column; align-items: stretch; }
    .image-more-page .format-list-mode .format-card-thumb { width: 100%; }
    .image-more-page .format-list-mode .format-card-info { margin: 8px 0; }
    .image-more-page .tool-section-card .btn { min-height: 44px; }
    .image-more-page .rename-upload-grid .upload-area:nth-child(2) { min-height: 140px; padding: 14px; }
    .image-more-page .rename-upload-grid .upload-area:nth-child(2) h4 { display: none; }
    .image-more-page .batch-actions .btn,
    .image-more-page .builder-actions .btn { white-space: normal; }
    .image-more-page .size-mode-tabs,
    .image-more-page .ico-tabs { gap: 6px; }
    .image-more-page .size-mode-tab,
    .image-more-page .ico-tab-item { flex: 1 1 76px; padding: 8px; font-size: 13px; }
    .image-more-page .ico-fit-options { gap: 12px !important; }
    .image-more-page .ico-fit-options > label { margin-left: 0; }
    .image-more-page .ico-fit-options > label:first-child { flex-basis: 100%; }
    .image-more-page .ico-color-picker-wrapper { padding: 8px; }
    .image-more-page .ico-color-inputs { flex-wrap: wrap; }
    .image-more-page .ico-config-group input[type="range"] { min-width: 0; }
    .image-more-page .ico-download-btn-group .btn { width: 100%; white-space: normal; }
    .image-more-page .wm-stage-card,
    .image-more-page .watermark-settings-card { padding: 16px; }
    .image-more-page .wm-workspace-actions { padding: 16px; }
    .image-more-page .wm-workspace-actions .wm-sub-actions { width: 100%; }
    .image-more-page .wm-workspace-actions .wm-action-main { width: 100%; }
    .image-more-page #wmRunBtn { width: 100%; white-space: normal; }
    .image-more-page .wm-grid-2col { grid-template-columns: minmax(0, 1fr); }
    #bdModal { padding: 0; }
    #bdModal .bd-modal-dialog { height: 100dvh; max-height: 100dvh; border-radius: 0; }
    #bdModal .bd-modal-header { padding: 12px 54px 12px 12px; gap: 8px; }
    #bdModal .bd-modal-title { font-size: 14px; }
    #bdModal .bd-modal-nav { width: 100%; gap: 6px; }
    #bdModal #btnModalApplyAll { margin-left: 0 !important; width: 100%; white-space: normal; }
    #bdModal .bd-modal-nav .btn { padding: 8px; font-size: 12px; }
    #bdModal .bd-modal-footer { padding: 10px 12px max(10px, env(safe-area-inset-bottom)); gap: 8px; }
    #bdModal .bd-modal-footer > * { flex: 1; min-width: 0; }
    #bdModal .bd-modal-footer .btn { width: 100%; white-space: normal; padding: 8px; font-size: 13px; }
    #bdModal .bd-color-input-group { flex-wrap: wrap; }
    #bdModal .bd-hex-input { flex: 1 1 90px; }
    #bdModal .bd-pipette-btn { margin-top: 4px; }
}

/* Uploaded files: compact, readable rows and bounded previews across all image tools. */
.image-file-workspace .image-files-panel { padding: 14px 0 0; border-top: 1px solid var(--border-main); background: transparent; }
.image-file-workspace .format-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
    gap: 12px;
}
.image-file-workspace .format-list-mode { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.image-file-workspace .format-card-item { min-width: 0; padding: 12px; gap: 12px; border-radius: 10px; box-shadow: none; }
.image-file-workspace .format-list-mode .format-card-item {
    display: grid;
    grid-template-columns: 174px minmax(0, 1fr) auto;
    align-items: center;
}
.image-file-workspace .format-card-preview-row { display: grid; grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr); gap: 8px; padding: 0; background: transparent; }
.image-file-workspace .format-card-preview-row .thumb-box { width: 100%; height: 82px; min-width: 0; border-radius: 6px; background-color: var(--card-muted-bg); }
.image-file-workspace .format-grid .thumb-box { height: 104px; }
.image-file-workspace .thumb-box img { display: block; width: 100%; height: 100%; object-fit: contain; }
.image-file-workspace .thumb-box .thumb-label { font-size: 10px; }
.image-file-workspace .format-card-info { min-width: 0; margin: 0; gap: 6px; }
.image-file-workspace .format-list-mode .format-card-info { margin: 0; }
.image-file-workspace .format-card-name { font-size: 14px; line-height: 1.5; font-weight: 600; white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.image-file-workspace .format-card-meta { justify-content: flex-start; gap: 4px 12px; flex-wrap: wrap; font-size: 12px; line-height: 1.6; }
.image-file-workspace .format-card-actions { margin: 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.image-file-workspace .tool-workspace .format-card-actions .btn { flex: 0 1 auto; min-height: 38px; padding: 8px 11px; font-size: 13px; white-space: nowrap; }
.image-file-workspace .format-grid .format-card-actions .btn { flex: 1 1 auto; }
.image-file-workspace .format-batch-bar { margin-bottom: 12px; padding: 12px; border-radius: 10px; }
.image-file-workspace .batch-info { flex-wrap: wrap; min-width: 0; gap: 6px 12px; }

.image-file-workspace .id-image-grid,
.image-file-workspace .bd-image-grid,
.image-file-workspace .stitch-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr));
    align-items: stretch;
    gap: 12px;
}
.image-file-workspace .id-image-card,
.image-file-workspace .bd-image-card,
.image-file-workspace .stitch-preview-card { min-width: 0; border-radius: 10px; box-shadow: none; }
.image-file-workspace .id-image-card,
.image-file-workspace .bd-image-card { padding: 10px; }
.image-file-workspace .id-image-card:hover,
.image-file-workspace .bd-image-card:hover,
.image-file-workspace .stitch-preview-card:hover { transform: none; box-shadow: none; }
.image-file-workspace .id-image-card .card-thumb-wrap,
.image-file-workspace .bd-image-card .card-thumb-wrap,
.image-file-workspace .stitch-card-thumb-wrap { height: 144px; margin-bottom: 10px; border-radius: 6px; }
.image-file-workspace .card-thumb-wrap canvas,
.image-file-workspace .card-thumb-wrap img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.image-file-workspace .id-image-card .card-info-row,
.image-file-workspace .bd-image-card .card-info-row { display: block; min-width: 0; margin-bottom: 6px; }
.image-file-workspace .id-image-card .card-filename,
.image-file-workspace .bd-image-card .card-filename,
.image-file-workspace .stitch-card-name { display: block; max-width: 100%; min-width: 0; font-size: 13px; line-height: 1.6; font-weight: 600; }
.image-file-workspace .id-image-card .card-meta,
.image-file-workspace .bd-image-card .card-meta { flex-wrap: wrap; justify-content: flex-start; gap: 5px 10px; font-size: 12px; line-height: 1.6; }
.image-file-workspace .id-image-card .card-actions,
.image-file-workspace .bd-image-card .card-actions { display: grid; grid-template-columns: minmax(0, 1fr) 40px; gap: 6px; }
.image-file-workspace .tool-workspace .card-actions .btn { min-height: 38px; padding: 8px; font-size: 13px; }
.image-file-workspace .stitch-card-thumb-wrap { margin-bottom: 0; }
.image-file-workspace .stitch-card-info { padding: 10px; gap: 4px; }
.image-file-workspace .stitch-card-controls { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; padding: 6px; }
.image-file-workspace .stitch-card-controls .btn-icon { min-width: 0; width: 100%; min-height: 38px; }
.image-file-workspace .stitch-result-canvas-wrap { display: flex; align-items: center; justify-content: center; padding: 12px; max-height: 360px; overflow: auto; }
.image-file-workspace .stitch-result-canvas-wrap img,
.image-file-workspace .stitch-result-canvas-wrap canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: 330px; object-fit: contain; box-shadow: none; }

.image-file-workspace .rename-file-panel { padding: 14px; margin: 18px 0; border-radius: 10px; box-shadow: none; }
.image-file-workspace .rename-preview-table-wrap { max-height: 420px; border-radius: 8px; }
.image-file-workspace .rename-preview-table { table-layout: fixed; }
.image-file-workspace .rename-preview-table th,
.image-file-workspace .rename-preview-table td { padding: 10px; font-size: 13px; }
.image-file-workspace .rename-preview-table .col-old,
.image-file-workspace .rename-preview-table .col-new { min-width: 0; overflow-wrap: anywhere; word-break: normal; }
.image-file-workspace .rename-preview-table .col-idx { width: 44px; }
.image-file-workspace .rename-preview-table .col-action { width: 54px; }
.image-file-workspace .rename-preview-table .col-size { width: 88px; }
.image-file-workspace .rename-preview-table .btn-icon { width: 36px; height: 36px; border: 1px solid var(--border-soft); }
.image-file-workspace .size-thumb { display: block; width: 52px; height: 52px; object-fit: contain; border-radius: 6px; }
.image-file-workspace .size-dim-change { white-space: normal; overflow-wrap: anywhere; font-size: 12px; line-height: 1.7; }
.image-file-workspace .exif-preview { grid-template-columns: 88px minmax(0, 1fr); gap: 14px; padding: 12px; border-radius: 10px; background: var(--card-muted-bg); border-color: var(--border-main); }
.image-file-workspace .exif-preview-image img { object-fit: contain; }
.image-file-workspace .exif-preview-meta strong { white-space: normal; overflow-wrap: anywhere; font-size: 14px; }
.image-file-workspace .exif-preview-meta span { white-space: normal; line-height: 1.7; font-size: 12px; }
.image-file-workspace .grid-result { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 310px); align-items: center; gap: 24px; }
.image-file-workspace .grid-result-head { display: block; margin: 0; }
.image-file-workspace .grid-result-head > div + div { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.image-file-workspace .grid-pieces-container { display: grid; width: 100%; max-width: 310px; margin: 0 auto; }
.image-file-workspace .grid-pieces-container.cols-2 { max-width: 240px; }
.image-file-workspace .ico-sizes-preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; }
.image-file-workspace .ico-size-card { min-width: 0; padding: 10px 6px; }
.image-file-workspace .ico-size-card .size-box { max-width: 100%; }
.image-file-workspace .crop-editor-header { padding: 10px 12px; border: 1px solid var(--border-main); border-radius: 8px; background: var(--card-muted-bg); }
.image-file-workspace .crop-editor-header > strong { min-width: 0; font-size: 14px; }
.image-file-workspace.image-cropper-page .img-container { height: 350px; min-height: 300px; max-height: 350px; }
.image-file-workspace.image-cropper-page .preview-lg { height: 145px; }
.image-file-workspace .wm-preview-wrapper { min-height: 240px; max-height: 350px; padding: 10px; }
.image-file-workspace #previewCanvas { width: auto; height: auto; max-width: 100%; max-height: 326px; box-shadow: none; }
.image-file-workspace .wm-result-card { padding: 16px; border: 1px solid var(--border-main); border-radius: 10px; background: var(--card-muted-bg); text-align: left; }
.image-file-workspace .wm-result-card .wm-result-icon { float: left; width: 32px; height: 32px; margin: 0 12px 0 0; font-size: 16px; }
.image-file-workspace .wm-result-card h4 { margin: 0 0 6px; font-size: 16px; }
.image-file-workspace .wm-result-card .wm-result-meta { margin: 0 0 12px 44px; font-size: 13px; }
.image-file-workspace .wm-result-card .wm-result-action { margin-left: 44px; }
.image-file-workspace .wm-result-card a { min-height: 40px; display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 8px; font-size: 13px; }

@media (max-width: 991px) {
    .image-file-workspace .format-list-mode .format-card-item { grid-template-columns: 150px minmax(0, 1fr); }
    .image-file-workspace .format-list-mode .format-card-actions { grid-column: 2; }
    .image-file-workspace .format-list-mode .format-card-preview-row { grid-row: 1 / 3; }
}
@media (max-width: 600px) {
    .image-file-workspace .format-list-mode .format-card-item,
    .image-file-workspace .format-grid .format-card-item { display: grid; grid-template-columns: 106px minmax(0, 1fr); gap: 10px; padding: 10px; }
    .image-file-workspace .format-card-preview-row { grid-template-columns: minmax(0, 1fr) 10px minmax(0, 1fr); gap: 4px; }
    .image-file-workspace .format-list-mode .format-card-preview-row { grid-row: auto; }
    .image-file-workspace .format-card-preview-row .thumb-box { height: 64px; }
    .image-file-workspace .format-card-preview-row .convert-arrow { font-size: 12px; }
    .image-file-workspace .format-card-name { font-size: 13px; }
    .image-file-workspace .format-list-mode .format-card-actions,
    .image-file-workspace .format-grid .format-card-actions { grid-column: 1 / -1; display: flex; width: 100%; }
    .image-file-workspace .tool-workspace .format-card-actions .btn { flex: 1 1 auto; min-height: 44px; padding: 8px; }
    .image-file-workspace .id-image-grid,
    .image-file-workspace .bd-image-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); gap: 10px; }
    .image-file-workspace .stitch-preview-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 10px; }
    .image-file-workspace .id-image-card .card-thumb-wrap,
    .image-file-workspace .bd-image-card .card-thumb-wrap,
    .image-file-workspace .stitch-card-thumb-wrap { height: 128px; }
    .image-file-workspace .tool-workspace .card-actions .btn,
    .image-file-workspace .stitch-card-controls .btn-icon { min-height: 44px; }
    .image-file-workspace .rename-file-panel { padding: 10px; }
    .image-file-workspace .rename-preview-table-wrap { max-height: none; overflow: visible; border: 0; }
    .image-file-workspace .rename-preview-table { display: block; width: 100%; }
    .image-file-workspace .rename-preview-table thead { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; clip: rect(0, 0, 0, 0); overflow: hidden; }
    .image-file-workspace .rename-preview-table tbody { display: grid; gap: 10px; }
    .image-file-workspace .rename-preview-table tbody tr { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 4px 8px; padding: 10px; border: 1px solid var(--border-main); border-radius: 8px; background: var(--card-bg); }
    .image-file-workspace .rename-preview-table tbody td { display: block; width: auto; min-width: 0; padding: 0; border: 0; white-space: normal; text-align: left; }
    .image-file-workspace .rename-preview-table .col-idx { grid-column: 1; grid-row: 1; font-size: 11px; color: var(--text-muted); }
    .image-file-workspace .rename-preview-table .file-thumb-cell { grid-column: 1; grid-row: 2 / 4; }
    .image-file-workspace .rename-preview-table .col-old { grid-column: 2; grid-row: 1; }
    .image-file-workspace .rename-preview-table .size-dim-change { grid-column: 2; grid-row: 2; }
    .image-file-workspace .rename-preview-table .col-size { grid-column: 2; grid-row: 3; font-size: 12px; color: var(--text-muted); }
    .image-file-workspace .rename-preview-table .col-action { grid-column: 3; grid-row: 1 / 4; align-self: start; }
    .image-file-workspace .rename-preview-table .btn-icon { width: 44px; height: 44px; }
    .image-file-workspace .rename-preview-table .size-thumb { width: 44px; height: 44px; }
    .image-file-workspace .rename-preview-table .col-old,
    .image-file-workspace .rename-preview-table .col-new { font-size: 13px; line-height: 1.6; }
    .image-file-workspace .rename-preview-table .rename-old-name,
    .image-file-workspace .rename-preview-table .rename-new-name { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
    .image-file-workspace.image-rename-page .rename-preview-table tbody tr { grid-template-columns: minmax(0, 1fr) 44px; }
    .image-file-workspace.image-rename-page .rename-preview-table .col-idx { grid-column: 1; grid-row: 1; }
    .image-file-workspace.image-rename-page .rename-preview-table .col-old { grid-column: 1; grid-row: 2; }
    .image-file-workspace.image-rename-page .rename-preview-table .col-new { grid-column: 1; grid-row: 3; }
    .image-file-workspace.image-rename-page .rename-preview-table .col-size { grid-column: 1; grid-row: 4; }
    .image-file-workspace.image-rename-page .rename-preview-table .col-action { grid-column: 2; grid-row: 1 / 5; }
    .image-file-workspace.image-rename-page .rename-preview-table .col-arrow { display: none; }
    .image-file-workspace.image-rename-page .rename-preview-table .col-old::before { content: '原文件名'; }
    .image-file-workspace.image-rename-page .rename-preview-table .col-new::before { content: '新文件名'; }
    .image-file-workspace.image-rename-page .rename-preview-table .col-old::before,
    .image-file-workspace.image-rename-page .rename-preview-table .col-new::before { display: block; color: var(--text-muted); font-size: 11px; font-weight: 400; }
    .image-file-workspace .exif-preview { grid-template-columns: 68px minmax(0, 1fr); gap: 10px; }
    .image-file-workspace .grid-result { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .image-file-workspace .grid-pieces-container { max-width: 280px; }
    .image-file-workspace .stitch-result-canvas-wrap { max-height: 300px; padding: 8px; }
    .image-file-workspace .stitch-result-canvas-wrap img { max-height: 280px; }
    .image-file-workspace.image-cropper-page .img-container { height: 290px; min-height: 250px; max-height: 290px; }
    .image-file-workspace .crop-editor-header { gap: 8px; }
    .image-file-workspace .crop-editor-header .btn { flex-shrink: 0; }
    .image-file-workspace .wm-preview-wrapper { min-height: 200px; max-height: 290px; }
    .image-file-workspace #previewCanvas { max-height: 266px; }
    .image-file-workspace .wm-result-card .wm-result-meta,
    .image-file-workspace .wm-result-card .wm-result-action { margin-left: 0; }
    .image-file-workspace .wm-result-card .wm-result-meta { clear: both; padding-top: 10px; }
    .image-file-workspace .wm-result-card a { min-height: 44px; }
}
.image-file-preview-modal .modal-content { border-radius: 12px; overflow: hidden; background: var(--card-bg); }
.image-file-preview-modal .modal-header { position: relative; padding-right: 54px; }
.image-file-preview-modal .modal-header .close { position: absolute; top: 3px; right: 6px; width: 44px; height: 44px; color: var(--text-main); opacity: 1; }
.image-file-preview-modal .compress-preview-container { padding: 0; }
.image-file-preview-modal .compress-preview-img-wrap { height: 280px; }
.image-file-preview-modal .modal-img-container img { max-height: 280px; }
@media (max-width: 600px) {
    .image-file-preview-modal .modal-dialog { margin: 10px; }
    .image-file-preview-modal .modal-body { max-height: 70vh; overflow-y: auto; }
    .image-file-preview-modal .compress-preview-img-wrap { height: 220px; }
    .image-file-preview-modal .modal-img-container img { max-height: 220px; }
}
