.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Shared layout for zpl-editor, zpl-formatter, zpl-ocr */
.zpl-tools-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 12px 40px;
}
.zpl-tools-hero {
    text-align: center;
    margin-bottom: 28px;
    padding: 28px 20px;
    background: linear-gradient(145deg, #f0f7ff 0%, #e8f4fc 50%, #f5f9fc 100%);
    border-radius: 14px;
    border: 1px solid rgba(52, 152, 219, 0.2);
    box-shadow: 0 8px 24px rgba(44, 62, 80, 0.08);
}
.zpl-tools-hero h1 {
    color: #2c3e50;
    font-size: 2.2em;
    margin: 0 0 14px;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.zpl-tools-hero .zpl-tools-lead {
    color: #455a64;
    font-size: 1.08em;
    line-height: 1.75;
    max-width: 920px;
    margin: 0 auto;
}
.zpl-tools-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
    border: 1px solid #e8ecef;
    overflow: hidden;
    margin-bottom: 28px;
}
.zpl-tools-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
    padding: 16px;
    background: linear-gradient(180deg, #f8fafb, #f1f4f6);
    border-top: 1px solid #e8ecef;
}
.zpl-tools-toolbar button,
.zpl-tools-toolbar .zpl-btn {
    min-width: 140px;
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.zpl-tools-toolbar button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.25);
}
.zpl-tools-btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
}
.zpl-tools-btn-secondary {
    background: #fff;
    color: #2c3e50;
    border: 1px solid #cfd8dc !important;
}
.zpl-tools-section {
    background: #fff;
    padding: 28px 24px;
    margin: 24px 0;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}
.zpl-tools-section h2 {
    position: relative;
    padding-left: 14px;
    color: #2c3e50;
    font-size: 1.45em;
    margin: 0 0 20px;
}
.zpl-tools-section h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 22px;
    background: linear-gradient(180deg, #3498db, #5dade2);
    border-radius: 2px;
}
.zpl-tools-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 8px;
}
.zpl-tools-step {
    flex: 1;
    min-width: 240px;
    padding: 18px;
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
    border-radius: 10px;
    border-top: 4px solid #3498db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.zpl-tools-step strong {
    display: block;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1.05em;
}
.zpl-tools-step p {
    margin: 0;
    color: #546e7a;
    line-height: 1.65;
    font-size: 0.95em;
}
.zpl-tools-faq .faq {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #f8fafb;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    border: 0;
    border-left: 4px solid #3498db;
    text-align: left;
    font: inherit;
}
.zpl-tools-faq .question { font-weight: 600; color: #2c3e50; flex: 1; }
.zpl-tools-faq .answer {
    display: none;
    padding: 14px 16px;
    background: #fff;
    margin-bottom: 12px;
    border-radius: 8px;
    color: #546e7a;
    line-height: 1.7;
    border-left: 4px solid #e0e0e0;
}
.zpl-tools-faq .faq.open + .answer { display: block; }
.zpl-tools-faq .icon {
    color: #3498db;
    font-size: 12px;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.zpl-tools-faq .faq.open .icon { transform: rotate(180deg); }
@media (max-width: 768px) {
    .zpl-tools-hero h1 { font-size: 1.65em; }
}

/* ========== 抵消 base.css 全局 main，工具页专用 ========== */
main.zpl-tools-wrap {
    max-width: 1100px;
    margin: 24px auto 0;
    padding: 0 12px 40px;
    min-height: auto;
    box-sizing: border-box;
}

/* ========== HTML / Image / PDF 转换页（对齐 Go 模板 html_to_zpl / image / pdf） ========== */
main.zpl-convert-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px 40px;
    min-height: auto;
    box-sizing: border-box;
}
.zpl-convert-page #header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}
.zpl-convert-page #header h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 15px;
    font-weight: 700;
}
.zpl-convert-page #header .description,
.zpl-convert-page #header > p {
    color: #555;
    font-size: 1.1em;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}
.zpl-convert-page .main-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
    min-height: 500px;
    border: none;
    align-items: stretch;
}
@media (min-width: 992px) {
    .zpl-convert-page .main-container {
        flex-direction: row;
        min-height: 600px;
    }
}
.zpl-convert-page .left-panel,
.zpl-convert-page .right-panel {
    flex: 1;
    padding: 20px;
    margin: 0;
    border-radius: 0;
    border: none;
    box-sizing: border-box;
    position: relative;
}
.zpl-convert-page .left-panel {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    align-items: stretch;
}
@media (min-width: 992px) {
    .zpl-convert-page .left-panel {
        border-bottom: none;
        border-right: 1px solid #e0e0e0;
    }
}
.zpl-convert-page .right-panel {
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    overflow: visible;
}
.zpl-convert-page #htmlInput,
.zpl-convert-page #zplOutput,
.zpl-convert-page textarea#zplOutput {
    flex: 1;
    min-height: 320px;
    font-family: Consolas, Monaco, monospace;
    line-height: 1.5;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: vertical;
    width: 100%;
    box-sizing: border-box;
}
@media (min-width: 992px) {
    .zpl-convert-page #htmlInput,
    .zpl-convert-page #zplOutput,
    .zpl-convert-page textarea#zplOutput {
        min-height: 400px;
    }
}
.zpl-convert-page .panel-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    display: block;
}
.zpl-convert-page .button-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}
.zpl-convert-page .button-container button {
    min-width: 180px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
}
.zpl-convert-page .button-container button:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}
/* PDF 等仍使用整栏上传时的占位样式 */
.zpl-convert-page .upload-zone {
    min-height: 280px;
    justify-content: center !important;
    align-items: center !important;
}
.zpl-convert-page .upload-icon {
    font-size: 60px;
    color: #3498db;
    margin-bottom: 16px;
    z-index: 1;
}
.zpl-convert-page .upload-hint {
    color: #666;
    font-size: 18px;
    text-align: center;
    margin: 0 0 12px;
    z-index: 1;
}
.zpl-convert-page .upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}
/* Image：与右侧 textarea 同系边框的内层上传框 */
.zpl-convert-page .left-panel {
    justify-content: flex-start;
    align-items: stretch;
}
.zpl-convert-page label.zpl-upload-dropzone {
    cursor: pointer;
}
.zpl-convert-page .zpl-upload-dropzone {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 320px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}
@media (min-width: 992px) {
    .zpl-convert-page .zpl-upload-dropzone {
        min-height: 400px;
    }
}
.zpl-convert-page .zpl-upload-dropzone-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    min-height: 240px;
    position: relative;
    z-index: 1;
}
.zpl-convert-page .zpl-upload-placeholder {
    text-align: center;
    pointer-events: none;
    max-width: 320px;
}
.zpl-convert-page .zpl-upload-icon-lg {
    font-size: 52px;
    color: #3498db;
    margin-bottom: 14px;
    opacity: 0.95;
}
.zpl-convert-page .zpl-upload-title {
    color: #37474f;
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.4;
}
.zpl-convert-page .zpl-upload-formats {
    color: #78909c;
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.5;
}
.zpl-convert-page .img-preview-wrap {
    width: 100%;
    text-align: center;
    z-index: 1;
}
/* 覆盖 base.css .left-panel img { display: none }，否则预览永远不显示 */
.zpl-convert-page .left-panel .img-preview-wrap img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 360px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}
/* 覆盖 base.css .left-panel input[type=file] 全栏铺满，避免盖住整块左栏 */
.zpl-convert-page label.zpl-upload-dropzone input[type="file"] {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    inset: auto !important;
    opacity: 0 !important;
    cursor: pointer;
}
.zpl-convert-page .zpl-upload-change-hint {
    margin: 12px 0 0;
    font-size: 0.875rem;
    color: #2980b9;
    font-weight: 600;
}
.zpl-convert-page .zpl-pdf-selected-card {
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.96)),
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.1), transparent 18rem);
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
    text-align: left;
}
.zpl-convert-page .zpl-pdf-selected-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 2px 2px 0;
}
.zpl-convert-page .zpl-pdf-pill,
.zpl-convert-page .zpl-pdf-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 800;
}
.zpl-convert-page .zpl-pdf-pill {
    background: #fee2e2;
    color: #991b1b;
}
.zpl-convert-page .zpl-pdf-status {
    background: #e0f2fe;
    color: #075985;
}
.zpl-convert-page .zpl-pdf-status.is-ready {
    background: #dcfce7;
    color: #166534;
}
.zpl-convert-page .zpl-pdf-status.is-error {
    background: #ffedd5;
    color: #9a3412;
}
.zpl-convert-page .zpl-pdf-preview-frame {
    min-height: 320px;
    border-radius: 14px;
    border: 1px solid #dbe5ef;
    background:
        linear-gradient(90deg, rgba(148, 163, 184, 0.16) 1px, transparent 1px),
        linear-gradient(180deg, rgba(148, 163, 184, 0.16) 1px, transparent 1px),
        #eef4fb;
    background-size: 18px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 18px;
    position: relative;
}
.zpl-convert-page .zpl-pdf-preview-frame::before {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: 12px;
    border: 1px dashed rgba(100, 116, 139, 0.25);
    pointer-events: none;
}
.zpl-convert-page .zpl-pdf-preview-frame canvas {
    display: none;
    max-width: 100%;
    max-height: 360px;
    height: auto;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    box-shadow:
        0 20px 36px rgba(15, 23, 42, 0.22),
        0 0 0 8px rgba(255, 255, 255, 0.7);
    position: relative;
    z-index: 1;
}
.zpl-convert-page .zpl-pdf-preview-frame canvas.is-ready {
    display: block;
}
.zpl-convert-page .zpl-pdf-preview-placeholder {
    color: #2563eb;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    position: relative;
    z-index: 1;
}
.zpl-convert-page .zpl-pdf-preview-placeholder i {
    font-size: 42px;
}
.zpl-convert-page .zpl-pdf-selected-body {
    min-width: 0;
    padding: 2px 4px 4px;
}
.zpl-convert-page .zpl-pdf-selected-title {
    margin: 0 0 6px;
    color: #2c3e50;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.zpl-convert-page .zpl-pdf-selected-meta {
    margin: 0 0 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.zpl-convert-page .zpl-pdf-selected-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 4px 8px;
    font-size: 0.8rem;
    font-weight: 700;
}
@media (max-width: 640px) {
    .zpl-convert-page .zpl-pdf-preview-frame {
        min-height: 260px;
        padding: 14px;
    }
    .zpl-convert-page .zpl-pdf-preview-frame canvas {
        max-height: 300px;
    }
}

/* ========== Online ZPL Editor（与转换页双栏、边框语言一致） ========== */
.zpl-editor-card {
    padding: 0;
    overflow: hidden;
    margin-bottom: 28px;
}
.zpl-editor-card .editor-split {
    display: flex;
    flex-direction: column;
    min-height: 480px;
}
@media (min-width: 992px) {
    .zpl-editor-card .editor-split {
        flex-direction: row;
        align-items: stretch;
        min-height: 520px;
    }
}
.zpl-editor-card .editor-left {
    flex: 1;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
@media (min-width: 992px) {
    .zpl-editor-card .editor-left {
        border-bottom: none;
        border-right: 1px solid #e0e0e0;
    }
}
.zpl-editor-card .editor-right {
    flex: 1;
    padding: 20px;
    background: #fff;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.zpl-editor-card .panel-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    display: block;
}
.zpl-editor-card #zplEditorHost {
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    flex: 1;
    min-height: 280px;
}
.zpl-editor-card #zplEditorHost .CodeMirror {
    border-radius: 6px;
    font-size: 14px;
    height: auto !important;
    border: 1px solid #cfd8dc !important;
    background: #fafcfd;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}
.zpl-editor-preview-heading {
    margin: 0 0 10px;
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
}
.zpl-editor-card .zpl-preview-box {
    flex: 1;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 16px;
    box-sizing: border-box;
}
.zpl-editor-card .zpl-preview-box img,
.zpl-editor-card .zpl-preview-box .zpl-preview-img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.zpl-editor-card .zpl-preview-box .zpl-preview-img {
    opacity: 0;
    transform: scale(0.98);
    animation: zpl-preview-img-in 0.25s ease forwards;
}
@keyframes zpl-preview-img-in {
    to {
        opacity: 1;
        transform: scale(1);
    }
}
.zpl-editor-card .zpl-preview-placeholder,
.zpl-editor-card .zpl-preview-loading {
    color: #78909c;
    text-align: center;
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
}
.density-row-ed {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.density-row-ed label {
    font-weight: 600;
    color: #455a64;
    font-size: 0.95rem;
}
.density-row-ed select {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #cfd8dc;
    background: #fff;
    font-size: 0.95rem;
    color: #2c3e50;
}
.editor-viewer-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-weight: 600;
    color: #2980b9;
    text-decoration: none;
    font-size: 0.95rem;
}
.editor-viewer-link:hover {
    text-decoration: underline;
    color: #1a6fa0;
}
.zpl-editor-card .zpl-tools-toolbar {
    margin: 0;
    border-radius: 0;
    border-top: 1px solid #e8ecef;
}

/* 模板一键填入 */
.zpl-editor-templates {
    margin-bottom: 14px;
    flex-shrink: 0;
}
.zpl-editor-templates-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}
.zpl-editor-templates-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #2c3e50;
}
.zpl-editor-templates-hint {
    font-size: 0.82rem;
    color: #607d8b;
    line-height: 1.45;
}
.zpl-editor-templates-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.zpl-editor-template-btn {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #cfd8dc;
    background: #fff;
    color: #2c3e50;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.zpl-editor-template-btn:hover:not(:disabled) {
    border-color: #3498db;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.2);
    transform: translateY(-1px);
}
.zpl-editor-template-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
@media (max-width: 480px) {
    .zpl-editor-templates-buttons {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }
    .zpl-editor-template-btn {
        flex: 0 0 auto;
    }
}

/* ========== ZPL OCR：上传区预览（与 image-to-zpl 一致，避免 base 全局 label/img 影响） ========== */
.zpl-tools-card label.zpl-ocr-dropzone {
    margin-right: 0;
    font-weight: 400;
    color: inherit;
}
.zpl-ocr-dropzone {
    cursor: pointer;
    display: block;
    position: relative;
    border: 2px dashed #b0bec5;
    border-radius: 12px;
    background: #fafbfc;
    overflow: hidden;
    margin-bottom: 4px;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.zpl-ocr-dropzone:hover {
    border-color: #3498db;
    background: #f5f9fc;
}
.zpl-ocr-dropzone-body {
    padding: 28px 20px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.zpl-ocr-placeholder .ocr-icon {
    font-size: 48px;
    color: #3498db;
    margin-bottom: 12px;
}
.zpl-ocr-hint {
    margin: 0;
    color: #455a64;
    font-size: 1rem;
    line-height: 1.5;
}
.zpl-ocr-preview-wrap {
    width: 100%;
}
.zpl-ocr-preview-wrap img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 320px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.zpl-ocr-change-hint {
    margin: 14px 0 0;
    font-size: 0.9rem;
    color: #2980b9;
    font-weight: 600;
}
.zpl-ocr-toolbar-top {
    margin-top: 8px;
}

/* ========== Developer-tool visual refresh ========== */
:root {
    --zpl-ink: #0f172a;
    --zpl-ink-soft: #334155;
    --zpl-muted: #64748b;
    --zpl-line: #dbe5ef;
    --zpl-panel: #ffffff;
    --zpl-panel-soft: #f8fafc;
    --zpl-code: #111827;
    --zpl-code-line: #1f2937;
    --zpl-accent: #22c55e;
    --zpl-accent-blue: #2563eb;
    --zpl-accent-cyan: #06b6d4;
    --zpl-shadow: 0 18px 45px rgba(15, 23, 42, 0.1);
}

body {
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.09), transparent 32rem),
        linear-gradient(180deg, #eef4fb 0%, #f8fafc 42%, #ffffff 100%);
    color: var(--zpl-ink);
}

main.zpl-tools-wrap,
main.zpl-convert-page,
.blog-container,
.about-container {
    position: relative;
}

.zpl-tools-hero,
.zpl-convert-page #header,
.blog-header {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94)),
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.28), transparent 18rem);
    color: #e5edf7;
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: var(--zpl-shadow);
}

.zpl-tools-hero::before,
.zpl-convert-page #header::before,
.blog-header::before {
    content: "^XA  ^FO50,50  ^BCN  ^XZ";
    position: absolute;
    right: 22px;
    bottom: 14px;
    color: rgba(226, 232, 240, 0.08);
    font-family: Consolas, Monaco, monospace;
    font-size: clamp(22px, 4vw, 48px);
    white-space: nowrap;
    pointer-events: none;
}

.zpl-tools-hero h1,
.zpl-convert-page #header h1,
.blog-header h1 {
    color: #ffffff;
}

.zpl-tools-hero .zpl-tools-lead,
.zpl-convert-page #header .description,
.zpl-convert-page #header > p,
.blog-header p {
    color: #cbd5e1;
}

.zpl-tools-card,
.zpl-tools-section,
.zpl-convert-page .main-container,
.zpl-convert-page .button-container,
.blog-post,
.sidebar-section {
    border: 1px solid var(--zpl-line);
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
}

.zpl-tools-section h2::before,
.zpl-tools-step,
.zpl-tools-faq .faq,
.form-section,
.sidebar-title {
    border-color: var(--zpl-accent-blue) !important;
}

.zpl-tools-step,
.form-section,
.barcode-types li,
.help-section {
    background: linear-gradient(180deg, #f8fafc, #eef5fb);
}

.zpl-tools-btn-primary,
.zpl-tools-toolbar button.zpl-tools-btn-primary,
.read-more-btn,
.search-button,
.btn-primary {
    background: linear-gradient(135deg, var(--zpl-accent-blue), #1d4ed8) !important;
    color: #fff;
}

.zpl-tools-btn-secondary,
.zpl-tools-toolbar button.zpl-tools-btn-secondary,
.btn-secondary {
    background: #ffffff !important;
    color: var(--zpl-ink) !important;
    border: 1px solid #cbd5e1 !important;
}

textarea,
.form-control,
.search-input,
.smart-grid input,
.smart-grid select {
    border-color: #cbd5e1;
}

textarea:focus,
.form-control:focus,
.search-input:focus {
    outline: none;
    border-color: var(--zpl-accent-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.zpl-devtool-grid {
    display: grid;
    gap: 20px;
}

@media (min-width: 980px) {
    .zpl-devtool-grid {
        grid-template-columns: minmax(0, 1fr) minmax(360px, 0.88fr);
        align-items: start;
    }
}

.zpl-devtool-panel {
    background: var(--zpl-panel);
    border: 1px solid var(--zpl-line);
    border-radius: 16px;
    box-shadow: var(--zpl-shadow);
    overflow: hidden;
}

.zpl-devtool-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: linear-gradient(180deg, #f8fafc, #eef4fb);
    border-bottom: 1px solid var(--zpl-line);
}

.zpl-devtool-panel-head h2,
.zpl-devtool-panel-head h3 {
    margin: 0;
    color: var(--zpl-ink);
    font-size: 1.05rem;
}

.zpl-devtool-panel-body {
    padding: 18px;
}

.zpl-devtool-form-grid {
    display: grid;
    gap: 14px;
}

@media (min-width: 720px) {
    .zpl-devtool-form-grid.two-col {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.zpl-devtool-field {
    display: grid;
    gap: 7px;
}

.zpl-devtool-field label,
.zpl-devtool-label {
    color: var(--zpl-ink-soft);
    font-weight: 700;
    font-size: 0.9rem;
}

.zpl-devtool-field input,
.zpl-devtool-field select,
.zpl-devtool-field textarea,
.zpl-devtool-code {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 11px 12px;
    font: inherit;
}

.zpl-devtool-field textarea,
.zpl-devtool-code {
    min-height: 280px;
    font-family: Consolas, Monaco, monospace;
    line-height: 1.55;
    resize: vertical;
    background: #0b1220;
    color: #dbeafe;
    border-color: #1e293b;
}

.zpl-devtool-code.light {
    background: #f8fafc;
    color: var(--zpl-ink);
    border-color: #cbd5e1;
}

.zpl-devtool-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.zpl-devtool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.zpl-devtool-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.16);
}

.zpl-devtool-btn.primary {
    background: linear-gradient(135deg, var(--zpl-accent-blue), #1d4ed8);
    color: #fff;
}

.zpl-devtool-btn.secondary {
    background: #fff;
    color: var(--zpl-ink);
    border-color: #cbd5e1;
}

.zpl-devtool-btn.success {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #fff;
}

.zpl-devtool-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.zpl-devtool-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    font-size: 0.82rem;
    font-weight: 700;
}

.zpl-devtool-note {
    margin: 12px 0 0;
    color: var(--zpl-muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

.zpl-devtool-preview {
    min-height: 260px;
    border: 1px dashed #94a3b8;
    border-radius: 12px;
    background:
        linear-gradient(90deg, rgba(148, 163, 184, 0.1) 1px, transparent 1px),
        linear-gradient(180deg, rgba(148, 163, 184, 0.1) 1px, transparent 1px),
        #f8fafc;
    background-size: 18px 18px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--zpl-muted);
}

.zpl-devtool-result-meta {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

@media (min-width: 720px) {
    .zpl-devtool-result-meta {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.zpl-devtool-metric {
    background: #f8fafc;
    border: 1px solid var(--zpl-line);
    border-radius: 12px;
    padding: 12px;
}

.zpl-devtool-metric span {
    display: block;
    color: var(--zpl-muted);
    font-size: 0.8rem;
    margin-bottom: 3px;
}

.zpl-devtool-metric strong {
    color: var(--zpl-ink);
    font-size: 1.1rem;
}
