main.content {
    padding: 0;
    background: var(--page-bg);
}

.tool-page {
    min-height: calc(100vh - 135px);
    color: var(--text-main);
}

.tool-page a,
.tool-page a:hover,
.tool-page a:focus {
    text-decoration: none;
}

.tool-hero {
    padding: 32px 0 24px;
    background: var(--hero-bg);
    border-bottom: 1px solid var(--border-soft);
}

.tool-breadcrumb {
    margin-bottom: 14px;
    color: var(--text-faint);
    font-size: 13px;
}

.tool-breadcrumb a {
    color: var(--text-muted);
}

.tool-breadcrumb span {
    margin: 0 7px;
}

.tool-hero__main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
}

.tool-hero__copy {
    max-width: 760px;
}

.tool-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 28px;
    padding: 0 11px;
    border: 1px solid var(--brand-soft-border);
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 12px;
    font-weight: 700;
}

.tool-hero h1 {
    margin: 15px 0 10px;
    color: var(--text-main);
    font-size: 32px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: 0;
}

.tool-hero__desc {
    margin: 0;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.75;
}

.tool-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.tool-hero__meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 6px 11px;
    border: 1px solid var(--border-main);
    border-radius: 999px;
    background: var(--card-bg);
    color: var(--text-sub);
    font-size: 13px;
}

.tool-hero__meta i {
    color: var(--brand);
}

.tool-hero__aside {
    width: 300px;
    flex: 0 0 300px;
    border: 1px solid var(--border-main);
    border-radius: 10px;
    background: var(--card-muted-bg);
    padding: 16px;
}

.tool-hero__aside strong {
    display: block;
    margin-bottom: 8px;
    color: var(--text-main);
    font-size: 15px;
}

.tool-hero__aside p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.65;
}

.tool-main {
    padding: 28px 0 46px;
}

.tool-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 22px;
    align-items: start;
}

.tool-workspace,
.tool-side-card,
.tool-section-card {
    border: 1px solid var(--border-main);
    border-radius: 10px;
    background: var(--card-bg);
    box-shadow: var(--shadow-card);
}

.tool-workspace {
    padding: 22px;
}

.tool-workspace__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.tool-workspace__head h2 {
    margin: 0 0 6px;
    color: var(--text-main);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 0;
}

.tool-workspace__head p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.65;
}

.tool-step-label {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--success-soft);
    color: var(--success);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.tool-page .upload-area {
    min-height: 178px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--border-strong);
    border-radius: 10px;
    padding: 28px 18px;
    background: var(--card-muted-bg);
    margin: 0 0 18px;
    transition: border-color .2s, background .2s, box-shadow .2s;
}

.tool-page .upload-area:hover,
.tool-page .upload-area.dragover {
    border-color: var(--brand);
    background: var(--brand-tint);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 12%, transparent);
}

.tool-page .upload-content i {
    color: var(--brand);
}

.tool-page .upload-content h4 {
    margin: 12px 0 6px;
    color: var(--text-main);
    font-size: 16px;
    font-weight: 700;
}

.tool-page .upload-content p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.55;
}

.pending-tool-workspace {
    min-height: 320px;
}

.pending-tool-stage {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
    padding: 18px;
    border: 1px dashed var(--border-strong);
    border-radius: 10px;
    background: var(--card-muted-bg);
}

.pending-tool-stage__icon {
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 26px;
    line-height: 58px;
    text-align: center;
}

.pending-tool-stage strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text-main);
    font-size: 18px;
    font-weight: 800;
}

.pending-tool-stage span {
    display: block;
    color: var(--text-muted);
    line-height: 1.7;
}

.pending-tool-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.pending-tool-plan {
    min-height: 142px;
    padding: 16px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--card-bg);
}

.pending-tool-plan i {
    width: 34px;
    height: 34px;
    margin-bottom: 12px;
    border-radius: 8px;
    background: var(--brand-soft);
    color: var(--brand);
    line-height: 34px;
    text-align: center;
}

.pending-tool-plan strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text-main);
    font-size: 14px;
}

.pending-tool-plan span {
    display: block;
    color: var(--text-muted);
    line-height: 1.65;
}

.pending-result-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 16px 0;
    padding: 14px 16px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--input-muted-bg);
}

.pending-result-panel strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-main);
}

.pending-result-panel span {
    color: var(--text-muted);
    line-height: 1.65;
}

.pending-result-panel i {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--brand-soft);
    color: var(--brand);
    line-height: 34px;
    text-align: center;
}

.pending-tool-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 190px;
    padding: 28px 18px;
    border: 1px dashed var(--border-strong);
    border-radius: 10px;
    background: var(--card-muted-bg);
    text-align: center;
}

.pending-tool-preview i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    margin-bottom: 14px;
    border-radius: 16px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 28px;
}

.pending-tool-preview strong {
    margin-bottom: 8px;
    color: var(--text-main);
    font-size: 20px;
}

.pending-tool-preview span {
    max-width: 520px;
    color: var(--text-muted);
    line-height: 1.75;
}

.pending-tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.pending-tool-actions .btn {
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 700;
}

.pending-tool-side {
    padding: 18px;
}

.pending-tool-side h3 {
    margin: 0 0 12px;
    color: var(--text-main);
    font-size: 17px;
    font-weight: 800;
}

.pending-tool-side ul {
    margin: 0;
    padding-left: 18px;
    color: var(--text-muted);
    line-height: 1.9;
}

.pending-tool-side p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.75;
}

.pending-tool-page .tool-benefit-item {
    min-height: 86px;
}

.builder-file-panel,
.builder-list-panel {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--card-muted-bg);
}

.tool-builder-page .tool-workspace {
    position: relative;
    overflow: hidden;
}

.tool-builder-page .tool-workspace::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--brand), var(--info), var(--success));
}

.tool-builder-page .upload-area {
    min-height: 196px;
    cursor: pointer;
}

.tool-builder-page .upload-content {
    max-width: 520px;
    text-align: center;
}

.tool-builder-page .upload-content i {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: var(--brand-soft);
    line-height: 62px;
}

.tool-builder-page .form-control {
    min-height: 38px;
    border-color: var(--border-main);
    border-radius: 6px;
    box-shadow: none;
}

.tool-builder-page .form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}

.tool-builder-page .btn-primary {
    border-color: #1d4ed8;
    border-radius: 8px;
    background: linear-gradient(135deg, #2f6df6 0%, #1d4ed8 100%);
    box-shadow: 0 8px 18px rgba(37, 99, 235, .18);
    font-weight: 800;
}

.tool-builder-page .btn-default {
    border-color: var(--border-main);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-sub);
}

.builder-file-panel {
    display: flex;
    align-items: center;
    gap: 10px;
}

.builder-file-panel strong {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    color: var(--text-main);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.builder-file-panel span {
    color: var(--text-muted);
    font-size: 13px;
    white-space: nowrap;
}

.builder-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}

.builder-option {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--border-main);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-sub);
    font-weight: 700;
    cursor: pointer;
}

.builder-option.is-active {
    border-color: var(--brand);
    background: var(--brand-soft);
    color: var(--brand);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 16%, transparent);
}

.builder-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 16px 0;
}

.builder-form-grid .form-group {
    margin-bottom: 0;
}

.builder-result {
    margin-bottom: 16px;
    resize: vertical;
}

.builder-preview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 14px;
    margin: 16px 0;
}

.builder-image-preview,
.builder-id-bg,
.builder-qr-preview {
    min-height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    border: 1px dashed var(--border-strong);
    border-radius: 10px;
    background: var(--card-muted-bg);
    color: var(--text-muted);
    text-align: center;
}

.builder-image-preview span,
.builder-id-bg span {
    font-size: 13px;
    font-weight: 700;
}

.builder-image-preview img {
    display: none;
    max-width: 100%;
    max-height: 230px;
    border-radius: 8px;
}

.id-bg-sample {
    width: 96px;
    height: 124px;
    border: 1px solid var(--border-main);
    border-radius: 8px;
    background: #2f6df6;
    box-shadow: inset 0 0 0 8px rgba(255, 255, 255, .14);
}

.builder-list-panel {
    padding: 0;
    overflow: hidden;
}

.builder-list-panel .img-convert-list {
    max-height: 260px;
}

.qrcode-wifi-preview {
    padding: 18px;
}

.builder-qr-preview {
    min-height: 260px;
    margin: 12px 0 14px;
    background: #fff;
}

.qrcode-wifi-preview h3 {
    margin: 0 0 10px;
    color: var(--text-main);
    font-size: 17px;
    font-weight: 800;
}

.pdf-compress-page .builder-option:nth-child(1) i,
.pdf-ocr-page .builder-option:nth-child(1) i,
.image-stitch-page .builder-option:nth-child(1) i,
.image-idphoto-page .builder-option:nth-child(1) i {
    color: var(--brand);
}

.image-idphoto-page .builder-preview-grid {
    grid-template-columns: minmax(0, 1fr) 210px;
}

.image-stitch-page .builder-list-panel .img-convert-list li {
    min-height: 42px;
}

.pdf-ocr-page .builder-result {
    min-height: 150px;
    background: var(--input-muted-bg);
}

.qrcode-wifi-page #wifiDownload[href="javascript:;"] {
    opacity: .65;
    pointer-events: none;
}

.qrcode-vcard-page #vcardDownload[href="javascript:;"] {
    opacity: .65;
    pointer-events: none;
}

.qrcode-batch-page #batchDownload[href="javascript:;"] {
    opacity: .65;
    pointer-events: none;
}

.qrcode-batch-example {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.9;
    word-break: break-all;
}

.qrcode-style-page #styleDownload[href="javascript:;"] {
    opacity: .65;
    pointer-events: none;
}

.qrcode-style-templates {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.qrcode-style-template {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 10px 12px;
    border: 1px solid var(--border-main);
    border-radius: 8px;
    background: var(--panel-bg);
    color: var(--text-main);
    text-align: left;
}

.qrcode-style-template.is-active {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.style-swatch {
    width: 34px;
    height: 34px;
    border: 4px solid var(--bg);
    border-radius: 8px;
    background:
        linear-gradient(90deg, var(--fg) 45%, transparent 45% 55%, var(--fg) 55%),
        linear-gradient(var(--fg) 45%, transparent 45% 55%, var(--fg) 55%),
        var(--bg);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}

.qrcode-style-logo {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 8px 0 16px;
}

.qrcode-style-logo > span {
    color: var(--text-secondary);
    font-size: 13px;
}

.style-logo-preview {
    position: relative;
    width: 54px;
    height: 54px;
    border: 1px solid var(--border-main);
    border-radius: 8px;
    background: var(--input-muted-bg);
}

.style-logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.style-logo-preview .btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    padding: 0;
    border-radius: 50%;
}

.qrcode-style-preview .builder-qr-preview {
    margin-bottom: 14px;
}

.builder-qr-preview img {
    max-width: min(100%, 260px);
    height: auto;
}

html[data-theme="dark"] .builder-option,
html[data-theme="dark"] .builder-file-panel,
html[data-theme="dark"] .builder-list-panel,
html[data-theme="dark"] .builder-image-preview,
html[data-theme="dark"] .builder-id-bg {
    border-color: var(--border-main);
    background: var(--card-muted-bg);
}

@media (max-width: 767px) {
    .pending-tool-grid {
        grid-template-columns: 1fr;
    }

    .pending-tool-stage {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .builder-file-panel {
        align-items: flex-start;
        flex-direction: column;
    }
}

.tool-action-bar {
    display: flex;
    justify-content: center;
    margin-top: 14px;
}

.tool-action-bar .btn,
.tool-page .convert-action .btn {
    min-height: 44px;
    border-radius: 8px;
    font-weight: 700;
}

.tool-page[class*="image-"] .tool-action-bar .btn-primary,
.tool-page[class*="image-"] .convert-action .btn-primary,
.tool-page[class*="image-"] #btn-download.btn-primary,
.tool-page[class*="image-"] #btnDownload.btn-primary,
.tool-page[class*="image-"] #runBtn.btn-primary,
.tool-page[class*="image-"] #downloadBtn.btn-primary {
    min-width: 132px;
    min-height: 44px;
    padding: 10px 22px;
    border: 1px solid #2563eb;
    border-radius: 8px;
    background: linear-gradient(135deg, #2f6df6 0%, #1d4ed8 100%);
    box-shadow: 0 8px 18px rgba(37, 99, 235, .22);
    color: #fff;
    font-weight: 800;
    line-height: 1.35;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.tool-page[class*="image-"] .tool-action-bar .btn-primary:hover,
.tool-page[class*="image-"] .convert-action .btn-primary:hover,
.tool-page[class*="image-"] #btn-download.btn-primary:hover,
.tool-page[class*="image-"] #btnDownload.btn-primary:hover,
.tool-page[class*="image-"] #runBtn.btn-primary:hover,
.tool-page[class*="image-"] #downloadBtn.btn-primary:hover {
    border-color: #1d4ed8;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    box-shadow: 0 10px 22px rgba(37, 99, 235, .28);
    color: #fff;
    transform: translateY(-1px);
}

.tool-page[class*="image-"] .tool-action-bar .btn-primary:disabled,
.tool-page[class*="image-"] .tool-action-bar .btn-primary.disabled,
.tool-page[class*="image-"] .convert-action .btn-primary:disabled,
.tool-page[class*="image-"] .convert-action .btn-primary.disabled,
.tool-page[class*="image-"] #btn-download.btn-primary:disabled,
.tool-page[class*="image-"] #btn-download.btn-primary.disabled,
.tool-page[class*="image-"] #btnDownload.btn-primary:disabled,
.tool-page[class*="image-"] #btnDownload.btn-primary.disabled,
.tool-page[class*="image-"] #runBtn.btn-primary:disabled,
.tool-page[class*="image-"] #runBtn.btn-primary.disabled,
.tool-page[class*="image-"] #downloadBtn.btn-primary:disabled,
.tool-page[class*="image-"] #downloadBtn.btn-primary.disabled {
    border-color: #cbd5e1;
    background: #94a3b8;
    box-shadow: none;
    color: #fff;
    cursor: not-allowed;
    opacity: .9;
    transform: none;
}

.tool-page[class*="image-"] .convert-action .btn-default,
.tool-page[class*="image-"] #btnPreview.btn-default {
    min-height: 44px;
    padding: 10px 22px;
    border: 1px solid var(--border-main);
    border-radius: 8px;
    background: #fff;
    color: var(--text-sub);
    font-weight: 700;
    box-shadow: none;
}

.tool-page[class*="image-"] .convert-action .btn-default:hover,
.tool-page[class*="image-"] #btnPreview.btn-default:hover {
    border-color: var(--brand-soft-border);
    background: var(--brand-tint);
    color: var(--brand);
}

.tool-side-card {
    padding: 18px;
    margin-bottom: 18px;
}

.tool-side-card h3 {
    margin: 0 0 12px;
    color: var(--text-main);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0;
}

.tool-preview {
    border: 1px solid var(--border-main);
    border-radius: 10px;
    overflow: hidden;
    background: var(--input-muted-bg);
}

.tool-preview__image {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border-main);
}

.tool-preview__image figure {
    margin: 0;
    background: var(--card-bg);
}

.tool-preview__image img {
    display: block;
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.tool-preview__image figcaption {
    padding: 9px 10px;
    color: var(--text-sub);
    font-size: 12px;
}

.tool-preview__image strong {
    display: block;
    color: var(--text-main);
    font-size: 14px;
}

.tool-preview__doc {
    padding: 18px;
}

.tool-doc-stack {
    position: relative;
    height: 142px;
}

.tool-doc-stack span {
    position: absolute;
    width: 108px;
    height: 132px;
    border: 1px solid var(--border-main);
    border-radius: 8px;
    background: var(--card-bg);
    box-shadow: var(--shadow-card-hover);
}

.tool-doc-stack span::before {
    content: '';
    display: block;
    height: 18px;
    margin: 18px 16px 10px;
    border-radius: 4px;
    background: var(--brand-soft-border);
}

.tool-doc-stack span::after {
    content: '';
    display: block;
    height: 8px;
    margin: 0 16px;
    border-radius: 999px;
    background: var(--border-main);
    box-shadow: 0 18px 0 var(--border-main), 0 36px 0 var(--border-main);
}

.tool-doc-stack span:nth-child(1) {
    left: 18px;
    top: 4px;
    transform: rotate(-7deg);
}

.tool-doc-stack span:nth-child(2) {
    left: 82px;
    top: 8px;
    transform: rotate(4deg);
}

.tool-doc-stack span:nth-child(3) {
    right: 18px;
    top: 4px;
    border-color: var(--brand-soft-border);
    transform: rotate(0deg);
}

.tool-preview__caption {
    padding: 12px 14px;
    border-top: 1px solid var(--border-main);
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}

.tool-side-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tool-side-list li {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-soft);
    color: var(--text-sub);
    font-size: 13px;
    line-height: 1.55;
}

.tool-side-list li:last-child {
    border-bottom: 0;
}

.tool-side-list i {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 12px;
}

.tool-section-card {
    padding: 22px;
    margin-top: 22px;
}

.tool-section-card h2 {
    margin: 0 0 16px;
    color: var(--text-main);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 0;
}

.tool-info-grid,
.tool-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.tool-benefit-list {
    display: grid;
    gap: 12px;
}

.tool-benefit-item {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 13px;
    align-items: center;
    padding: 15px 0;
    border: 1px solid var(--border-main);
    border-width: 0 0 1px;
    border-radius: 0;
    background: transparent;
}

.tool-benefit-item:last-child {
    border-bottom: 0;
}

.tool-benefit-item i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--brand-soft);
    color: var(--brand);
}

.tool-benefit-item strong {
    display: block;
    margin-bottom: 5px;
    color: var(--text-main);
    font-size: 15px;
}

.tool-benefit-item span {
    display: block;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}

.tool-benefit-tag {
    display: none;
    min-width: 72px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--success-soft);
    color: var(--success);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.tool-info-item,
.tool-related-item {
    border: 1px solid var(--border-main);
    border-radius: 10px;
    background: var(--card-bg);
    padding: 16px;
}

.tool-info-item i,
.tool-related-item i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-bottom: 12px;
    border-radius: 9px;
    background: var(--brand-soft);
    color: var(--brand);
}

.tool-info-item strong,
.tool-related-item strong {
    display: block;
    margin-bottom: 7px;
    color: var(--text-main);
    font-size: 15px;
}

.tool-info-item span,
.tool-related-item span {
    display: block;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.55;
}

.tool-related-item:hover {
    border-color: var(--brand-soft-border);
    box-shadow: var(--shadow-card-hover);
}

.tool-related-item em {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 12px;
    color: var(--brand);
    font-size: 13px;
    font-style: normal;
    font-weight: 700;
}

.tool-related-section {
    padding: 22px;
    overflow: hidden;
    border-color: var(--border-main);
    background: var(--card-bg);
}

.tool-related-section::before {
    display: none;
}

.tool-related-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 18px;
    padding: 0;
    background: transparent;
    color: var(--text-main);
}

.tool-related-head span {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--page-bg-muted);
    color: var(--text-sub);
    font-size: 12px;
    font-weight: 800;
}

.tool-related-head h2 {
    margin: 8px 0 0;
    color: var(--text-main);
    font-size: 21px;
    line-height: 1.25;
}

.tool-related-section .tool-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 0;
    background: transparent;
}

.tool-related-section .tool-related-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 112px;
    padding: 14px 8px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    position: relative;
    box-shadow: none;
}

.tool-related-section .tool-related-item > i {
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
    border-radius: 50%;
    border: 1px solid var(--brand-soft-border);
    background: var(--brand-tint);
    color: var(--brand);
    font-size: 20px;
}

.tool-related-section .tool-related-item strong {
    margin: 0;
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.35;
    text-align: center;
}

.tool-related-section .tool-related-item:hover {
    transform: translateY(-2px);
    border-color: var(--border-main);
    background: var(--card-muted-bg);
    box-shadow: var(--shadow-card-hover);
}

.tool-related-section .tool-related-item:hover > i {
    background: var(--brand);
    color: #ffffff;
}

.tool-faq .panel {
    border-color: var(--border-main);
    border-radius: 8px;
    box-shadow: none;
}

.tool-faq .panel-heading {
    background: var(--input-muted-bg);
    border-color: var(--border-main);
}

.tool-faq .panel-title a {
    display: block;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 700;
}

.tool-faq .panel-body {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.7;
}

.shortlink-output {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
}

.shortlink-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.shortlink-stats > div {
    padding: 14px;
    border: 1px solid var(--border-main);
    border-radius: 8px;
    background: var(--input-muted-bg);
}

.shortlink-stats strong {
    display: block;
    color: var(--text-main);
    font-size: 22px;
    line-height: 1.2;
}

.shortlink-stats span {
    color: var(--text-secondary);
    font-size: 13px;
}

.ico-preview-grid {
    margin: 16px 0;
}

.image-ico-page .builder-image-preview img[src] {
    display: block;
    object-fit: contain;
}

.ico-size-list {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 110px;
    padding: 16px;
    border-radius: 8px;
    background: var(--panel-bg);
    color: var(--text-main);
    font-weight: 800;
    text-align: center;
}

.ico-code {
    margin-top: 14px;
    min-height: 96px;
    font-family: Consolas, Monaco, monospace;
}

.grid-preview-layout {
    margin: 16px 0;
}

.image-grid-page .builder-image-preview img[src] {
    display: block;
    object-fit: contain;
}

.grid-pattern-preview,
.grid-result-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.grid-pattern-preview {
    width: 120px;
    height: 120px;
}

.grid-pattern-preview i {
    display: block;
    border-radius: 4px;
    background: linear-gradient(135deg, #2563eb, #14b8a6);
}

.grid-result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.grid-result-preview {
    max-width: 420px;
}

.grid-result-preview a {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 6px;
    background: var(--input-muted-bg);
}

.grid-result-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid-order-tip {
    margin: 0;
    color: var(--text-secondary);
    font-weight: 700;
    line-height: 1.9;
}

.stitch-file-panel {
    background: #f8fbff;
    border: 1px solid #dbe6f3;
    border-radius: 8px;
    margin-top: 16px;
    padding: 14px;
}

.stitch-file-head,
.stitch-result-head {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.stitch-preview-list {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    margin-top: 12px;
}

.stitch-preview-item {
    background: #fff;
    border: 1px solid #dde7f2;
    border-radius: 8px;
    cursor: grab;
    overflow: hidden;
    transition: border-color .2s ease, box-shadow .2s ease, opacity .2s ease, transform .2s ease;
}

.stitch-preview-item.is-dragging {
    opacity: .55;
}

.stitch-preview-item.is-dragover {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
    transform: translateY(-2px);
}

.stitch-preview-thumb {
    align-items: center;
    aspect-ratio: 4 / 3;
    background: #eef4fb;
    color: #6b7280;
    display: flex;
    font-size: 13px;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.stitch-preview-thumb img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.stitch-preview-order {
    align-items: center;
    background: rgba(17, 24, 39, .78);
    border-radius: 999px;
    color: #fff;
    display: flex;
    font-size: 12px;
    font-weight: 800;
    height: 24px;
    justify-content: center;
    left: 8px;
    line-height: 1;
    position: absolute;
    top: 8px;
    width: 24px;
    z-index: 2;
}

.stitch-preview-remove {
    align-items: center;
    background: rgba(17, 24, 39, .74);
    border: 0;
    border-radius: 999px;
    color: #fff;
    display: flex;
    height: 26px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    position: absolute;
    right: 8px;
    top: 8px;
    width: 26px;
    z-index: 2;
}

.stitch-preview-remove:hover {
    background: #dc2626;
}

.stitch-preview-info {
    display: grid;
    gap: 3px;
    padding: 9px 42px 9px 10px;
    position: relative;
}

.stitch-preview-info strong,
.stitch-preview-info span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stitch-preview-info strong {
    color: #111827;
    font-size: 13px;
}

.stitch-preview-info span {
    color: #6b7280;
    font-size: 12px;
}

.stitch-preview-handle {
    align-items: center;
    background: #eef4fb;
    border-radius: 6px;
    color: #2563eb;
    display: flex;
    height: 24px;
    justify-content: center;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
}

.stitch-result-preview {
    background: #f8fbff;
    border: 1px dashed #c9d8ea;
    border-radius: 8px;
    margin-top: 16px;
    max-height: 720px;
    overflow: auto;
    padding: 14px;
    text-align: center;
}

.stitch-result-preview img {
    display: inline-block;
    max-width: 100%;
}

.rename-upload-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rename-file-panel {
    background: #f8fbff;
    border: 1px solid #dbe6f3;
    border-radius: 8px;
    margin-top: 16px;
    padding: 14px;
}

.rename-file-head,
.rename-result-head {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.rename-file-list,
.rename-result-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.rename-file-item,
.rename-result-item {
    align-items: center;
    background: #fff;
    border: 1px solid #dde7f2;
    border-radius: 8px;
    display: grid;
    gap: 10px;
}

.rename-file-item {
    grid-template-columns: 34px 1fr 32px;
    padding: 10px;
}

.rename-file-item > .fa {
    align-items: center;
    background: #eef4ff;
    border-radius: 8px;
    color: #2563eb;
    display: flex;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.rename-file-item.is-archive > .fa {
    background: #fff7ed;
    color: #ea580c;
}

.rename-file-info {
    min-width: 0;
}

.rename-file-info strong,
.rename-file-info span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rename-file-info strong {
    color: #111827;
    font-size: 14px;
}

.rename-file-info span {
    color: #6b7280;
    font-size: 12px;
    margin-top: 3px;
}

.rename-file-remove {
    align-items: center;
    background: #f3f6fb;
    border: 0;
    border-radius: 999px;
    color: #6b7280;
    display: flex;
    height: 28px;
    justify-content: center;
    padding: 0;
    width: 28px;
}

.rename-file-remove:hover {
    background: #fee2e2;
    color: #dc2626;
}

.rename-check {
    align-items: center;
    color: #334155;
    display: flex;
    gap: 8px;
    margin: 4px 0 16px;
}

.rename-result-item {
    grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
    padding: 10px 12px;
}

.rename-result-item span,
.rename-result-item strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rename-result-item span {
    color: #64748b;
}

.rename-result-item strong {
    color: #111827;
}

.rename-result-item .fa {
    color: #2563eb;
    text-align: center;
}

.exif-preview {
    align-items: center;
    background: #f8fbff;
    border: 1px solid #dbe6f3;
    border-radius: 8px;
    display: grid;
    gap: 14px;
    grid-template-columns: 120px minmax(0, 1fr);
    margin: 16px 0;
    padding: 14px;
}

.exif-tip {
    align-items: flex-start;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    color: #1e40af;
    display: flex;
    gap: 8px;
    line-height: 1.7;
    margin: 14px 0;
    padding: 10px 12px;
}

.exif-tip .fa {
    margin-top: 4px;
}

.exif-preview-image {
    align-items: center;
    aspect-ratio: 1 / 1;
    background: #eef4fb;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.exif-preview-image img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.exif-preview-meta {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.exif-preview-meta strong,
.exif-preview-meta span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.exif-result-head {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.exif-risk-list {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin: 16px 0;
}

.exif-risk {
    align-items: center;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    color: #166534;
    display: flex;
    gap: 8px;
    padding: 10px 12px;
}

.exif-risk.is-warning {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}

.exif-info-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.exif-info-grid h3 {
    font-size: 16px;
    margin: 0 0 10px;
}

.exif-table {
    background: #fff;
    border: 1px solid #dde7f2;
    border-radius: 8px;
    overflow: hidden;
}

.exif-row {
    display: grid;
    gap: 10px;
    grid-template-columns: 110px minmax(0, 1fr);
    padding: 10px 12px;
}

.exif-row + .exif-row {
    border-top: 1px solid #eef2f7;
}

.exif-row span {
    color: #64748b;
}

.exif-row strong {
    color: #111827;
    min-width: 0;
    overflow-wrap: anywhere;
}

.deletepage-file {
    align-items: center;
    background: #f8fbff;
    border: 1px solid #dbe6f3;
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    margin: 16px 0;
    padding: 12px;
}

.deletepage-file > .fa {
    align-items: center;
    background: #fee2e2;
    border-radius: 8px;
    color: #dc2626;
    display: flex;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.deletepage-file strong,
.deletepage-file span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.deletepage-file span {
    color: #64748b;
    margin-top: 3px;
}

.deletepage-result-head {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

@media (max-width: 991px) {
    .tool-hero__main {
        display: block;
    }

    .tool-hero__aside {
        width: auto;
        margin-top: 18px;
    }

    .tool-layout {
        grid-template-columns: 1fr;
    }

    .tool-info-grid,
    .tool-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tool-benefit-item {
        grid-template-columns: 42px 1fr;
    }

    .tool-benefit-tag {
        grid-column: 2;
        justify-self: start;
    }

    .tool-related-head {
        display: block;
    }
}

@media (max-width: 767px) {
    .tool-hero {
        padding: 24px 0 20px;
    }

    .tool-hero h1 {
        font-size: 27px;
    }

    .tool-workspace {
        padding: 18px;
    }

    .tool-workspace__head {
        display: block;
    }

    .tool-step-label {
        margin-top: 12px;
    }

    .tool-info-grid,
    .tool-related-grid {
        grid-template-columns: 1fr;
    }

    .tool-benefit-item {
        grid-template-columns: 1fr;
    }

    .tool-benefit-tag {
        grid-column: auto;
    }

    .tool-related-section .tool-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .shortlink-output,
    .shortlink-stats {
        grid-template-columns: 1fr;
    }

    .rename-upload-grid,
    .rename-result-item {
        grid-template-columns: 1fr;
    }

    .rename-file-head,
    .rename-result-head {
        align-items: stretch;
        flex-direction: column;
    }

    .rename-result-head .btn {
        width: 100%;
    }

    .exif-preview,
    .exif-info-grid,
    .exif-row {
        grid-template-columns: 1fr;
    }

    .exif-result-head {
        align-items: stretch;
        flex-direction: column;
    }

    .exif-result-head .btn {
        width: 100%;
    }

    .deletepage-file {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .deletepage-file .btn {
        grid-column: 1 / -1;
    }

    .deletepage-result-head {
        align-items: stretch;
        flex-direction: column;
    }

    .deletepage-result-head .btn {
        width: 100%;
    }
}

