.pdfofdmp-page {
    padding: 0;
    min-height: 100%;
    background: #f6f7fb;
}

.pdfofdmp-banner {
    background: #ffffff;
    border: 1px solid #dbe4f3;
    border-bottom: none;
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    box-sizing: border-box;
}

.pdfofdmp-banner__slogan {
    font-size: 28px;
    line-height: 1.4;
    font-weight: 700;
    color: #1e1e1e;
    letter-spacing: 1px;
    text-align: center;
}

.pdfofdmp-block {
    background: #ffffff;
    border: 1px solid #dbe4f3;
    padding: 18px 20px;
    box-sizing: border-box;
}

.pdfofdmp-block + .pdfofdmp-block {
    border-top: none;
}

.pdfofdmp-block__title {
    font-size: 18px;
    line-height: 1.5;
    color: #222;
    text-align: center;
    margin-bottom: 14px;
}

.pdfofdmp-block--preview {
    min-height: 560px;
    text-align: center;
}

.pdfofdmp-preview-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

.pdfofdmp-preview-sheet {
    background: #ffffff;
    border: 1px solid #dfe6d8;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.pdfofdmp-preview-sheet--portrait {
    width: 560px;
    height: 790px;
    max-height: calc(100vh - 280px);
}

.pdfofdmp-preview-sheet--landscape {
    width: 790px;
    height: 560px;
    max-width: 100%;
}

.pdfofdmp-preview-canvas {
    position: relative;
    width: 100%;
    height: 100%;
    background: #ffffff;
}

.pdfofdmp-preview-header {
    position: absolute;
    top: 14px;
    left: 70px;
    right: 70px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: #333333;
    line-height: 1.2;
    text-align: center;
    pointer-events: none;
}

.pdfofdmp-preview-safe {
    position: absolute;
    overflow: hidden;
    box-sizing: border-box;
}

.pdfofdmp-preview-guides {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.pdfofdmp-preview-guide {
    position: absolute;
    background: transparent;
}

.pdfofdmp-preview-guide--v {
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 1px dashed #8d8d8d;
}

.pdfofdmp-preview-guide--h {
    left: 0;
    right: 0;
    height: 0;
    border-top: 1px dashed #8d8d8d;
}

.pdfofdmp-preview-grid {
    position: absolute;
    inset: 0;
    display: grid;
    gap: 10px;
    align-items: center;
    justify-items: center;
    z-index: 2;
}

.pdfofdmp-preview-card {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #ffffff;
    box-sizing: border-box;
}

.pdfofdmp-preview-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    box-sizing: border-box;
}

.pdfofdmp-preview-card img.is-bordered {
    border: 1px solid rgba(0, 0, 0, 0.32);
}

.pdfofdmp-preview-page-number {
    position: absolute;
    bottom: 12px;
    min-height: 20px;
    font-size: 14px;
    line-height: 1.2;
    color: #333333;
    z-index: 3;
    pointer-events: none;
}

.pdfofdmp-preview-page-number--hidden {
    display: none;
}

.pdfofdmp-preview-page-number--left { left: 18px; text-align: left; }
.pdfofdmp-preview-page-number--center { left: 50%; transform: translateX(-50%); text-align: center; }
.pdfofdmp-preview-page-number--right { right: 18px; text-align: right; }

.pdfofdmp-block--settings {
    overflow-x: auto;
}

.pdfofdmp-settings-row {
    display: grid;
    gap: 10px 12px;
    align-items: center;
}

.pdfofdmp-settings-row + .pdfofdmp-settings-row {
    margin-top: 10px;
}

.pdfofdmp-settings-row--top {
    grid-template-columns: 1fr 1fr 1.7fr 0.82fr 0.82fr 0.82fr 0.82fr;
}

.pdfofdmp-settings-row--bottom {
    grid-template-columns: 1.1fr 1.6fr 3fr;
}

.pdfofdmp-item { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pdfofdmp-item__label { flex-shrink: 0; color: #666; font-size: 14px; line-height: 1.4; white-space: nowrap; }
.pdfofdmp-item__control {
    width: 100%; min-width: 0; height: 38px; border: 1px solid #cfe0c9; background: #dff0d7;
    padding: 0 10px; font-size: 14px; color: #1f1f1f; outline: none; box-sizing: border-box;
}
.pdfofdmp-item__compound, .pdfofdmp-item__checkwrap, .pdfofdmp-margins {
    display: flex; align-items: center; gap: 6px;
}
.pdfofdmp-item__compound { width: 100%; min-width: 0; }
.pdfofdmp-item__compound .pdfofdmp-item__control { flex: 1 1 auto; }
.pdfofdmp-item__checkwrap { min-height: 38px; }
.pdfofdmp-item--header { min-width: 0; }
.pdfofdmp-item--check { min-width: 0; }
.pdfofdmp-margins { flex-wrap: wrap; }
.pdfofdmp-margins__title { font-size: 14px; color: #666; white-space: nowrap; }

.pdfofdmp-files-head, .pdfofdmp-files-body {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
}
.pdfofdmp-files-body { margin-top: 14px; }
.pdfofdmp-files-head__summary { flex: 1 1 auto; font-size: 15px; line-height: 1.6; color: #2a2a2a; }
.pdfofdmp-files-head__action { flex-shrink: 0; }
.pdfofdmp-table-wrap { flex: 1 1 auto; overflow-x: auto; }
.pdfofdmp-table { width: 100%; border-collapse: collapse; }
.pdfofdmp-table th, .pdfofdmp-table td { border: 1px solid #dbe4f3; padding: 10px 12px; font-size: 14px; color: #1f1f1f; }
.pdfofdmp-table th { background: #f3f7fc; font-weight: 600; }
.pdfofdmp-table__name { min-width: 280px; }
.pdfofdmp-table__empty { text-align: center; color: #888; }
.pdfofdmp-invalid-tag {
    display: inline-flex; margin-left: 8px; padding: 2px 8px; border-radius: 999px; font-size: 12px;
    color: #b54646; background: #fdeaea;
}
.pdfofdmp-invalid-reason { margin-top: 4px; font-size: 12px; color: #a85c5c; }
.pdfofdmp-ops {
    width: 126px; flex-shrink: 0; display: grid; grid-template-columns: 1fr; gap: 10px;
}
.pdfofdmp-ops__btn {
    height: 38px; border: 1px solid #c7d9f3; background: #eef5ff; color: #234d7d; cursor: pointer;
}
.pdfofdmp-error {
    margin-bottom: 14px; padding: 10px 12px; border: 1px solid #f0c2c2; background: #fff3f3; color: #b04646; font-size: 14px;
}
.pdfofdmp-result-preview-panel__head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.pdfofdmp-result-preview-frame-wrap {
    margin-top: 14px; border: 1px solid #dbe4f3; background: #f8fbff; min-height: 520px;
}
.pdfofdmp-result-preview-frame { width: 100%; min-height: 520px; border: none; background: #ffffff; }
.pdfofdmp-result-preview-empty {
    min-height: 520px; display: flex; align-items: center; justify-content: center; color: #69788a; font-size: 15px; padding: 24px; text-align: center;
}

@media (max-width: 1200px) {
    .pdfofdmp-settings-row--top,
    .pdfofdmp-settings-row--bottom {
        grid-template-columns: 1fr;
    }

    .pdfofdmp-files-head,
    .pdfofdmp-files-body {
        flex-direction: column;
    }

    .pdfofdmp-ops {
        width: 100%;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.pdfofdmp-error--soft {
    background: #fffaf0;
    border-color: #f1d9a8;
    color: #8a6122;
    border-radius: 8px;
}

.pdfofdmp-action-tip {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.5;
    color: #7a7a7a;
}

.pdfofdmp-action-tip--center {
    text-align: center;
}

.pdfofdmp-ops__btn:disabled,
.tool-btn:disabled {
    cursor: not-allowed;
    opacity: 0.68;
}