.pdf-converter-document-preview-head {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.pdf-converter-document-preview-head strong {
    min-width: 0;
    color: #172238;
    font-size: .95rem;
    font-weight: 900;
}

.pdf-converter-document-preview-head small {
    flex: 0 0 auto;
    color: #68768a;
    font-weight: 800;
}

.pdf-converter-document-preview-body {
    min-width: 0;
    display: grid;
    gap: 12px;
}

.pdf-converter-document-page {
    width: min(100%, 440px);
    position: relative;
    overflow: hidden;
    container-type: inline-size;
    margin: 0 auto;
    border: 1px solid #dbe5f0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(20, 38, 64, .12);
}

.pdf-converter-preview-line {
    position: absolute;
    overflow: hidden;
    color: #111827;
    line-height: 1.15;
    letter-spacing: 0;
    white-space: pre-wrap;
}

.pdf-converter-document-image-page {
    width: min(100%, 440px);
    margin: 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid #dbe5f0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(20, 38, 64, .12);
}

.pdf-converter-document-image-page img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: inherit;
}

.pdf-converter-table-preview {
    max-height: 420px;
    overflow: auto;
    border: 1px solid #dbe5f0;
    border-radius: 10px;
    background: #fff;
}

.pdf-converter-table-preview table {
    width: 100%;
    border-collapse: collapse;
    color: #172238;
    font-size: .86rem;
}

.pdf-converter-table-preview th,
.pdf-converter-table-preview td {
    padding: 9px 10px;
    border-bottom: 1px solid #e6edf5;
    text-align: left;
    vertical-align: top;
}

.pdf-converter-table-preview th {
    position: sticky;
    top: 0;
    background: #f4f8ff;
    font-weight: 900;
}

.pdf-converter-preview-note {
    margin: 0;
    color: #68768a;
    font-weight: 760;
}

.pdf-converter-image-zoom {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100060;
    width: min(420px, calc(100vw - 24px));
    max-height: min(76vh, 620px);
    padding: 10px;
    display: grid;
    gap: 8px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(6px);
    border: 1px solid rgba(211, 224, 240, .98);
    border-radius: 14px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 24px 54px rgba(20, 38, 64, .24);
    transition: opacity .14s ease, transform .14s ease;
}

.pdf-converter-image-zoom.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.pdf-converter-image-zoom img {
    width: 100%;
    max-height: min(66vh, 540px);
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
}

.pdf-converter-image-zoom span {
    min-width: 0;
    overflow: hidden;
    color: #354158;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pdf-converter-action-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, .7fr);
}

.design-frame-main {
    width: min(100%, 1840px);
    margin: 0 auto;
    padding: 24px 24px 34px;
}

.design-frame-workspace {
    display: grid;
    grid-template-columns: minmax(300px, .92fr) minmax(420px, 1fr) minmax(320px, .95fr);
    gap: 18px;
    align-items: start;
}

.design-frame-panel {
    min-width: 0;
    padding: 18px;
    display: grid;
    gap: 16px;
    border: 1px solid rgba(211, 224, 240, .95);
    border-radius: 16px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 8px 26px rgba(31, 41, 55, .08);
}

.design-frame-panel-head {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 11px;
    align-items: center;
}

.design-frame-panel-head > span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: #256fd9;
    font-weight: 900;
}

.design-frame-panel-head h1,
.design-frame-panel-head h2,
.design-frame-panel-head p {
    margin: 0;
}

.design-frame-panel-head h1,
.design-frame-panel-head h2,
.design-tool-title h2 {
    color: #172238;
    font-family: var(--font-heading);
}

.design-frame-panel-head h1,
.design-frame-panel-head h2 {
    font-size: 1.2rem;
}

.design-frame-panel-head p {
    margin-top: 2px;
    color: #68768a;
    line-height: 1.45;
}

.design-tool-section {
    min-width: 0;
    padding: 13px;
    display: grid;
    gap: 12px;
    border: 1px solid #dce6f2;
    border-radius: 14px;
    background: #f8fbff;
}

.design-tool-section.is-collapsed > :not(.design-tool-title) {
    display: none;
}

.design-tool-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.design-tool-title-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.design-tool-title h2 {
    margin: 0;
    font-size: 1rem;
}

.design-tool-title button,
.design-editor-toolbar button {
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid #d7e4f5;
    border-radius: 9px;
    color: #245fae;
    background: #fff;
    font-weight: 800;
}

.design-library-pager {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid #d7e4f5;
    border-radius: 9px;
    background: #fff;
}

.design-library-pager button {
    width: 26px;
    min-height: 24px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    color: #245fae;
    background: #edf5ff;
    box-shadow: none;
    font-size: 18px;
    line-height: 1;
}

.design-library-pager button:disabled {
    opacity: .42;
    cursor: not-allowed;
}

.design-library-pager span {
    min-width: 34px;
    color: #516179;
    font-size: .76rem;
    font-weight: 900;
    text-align: center;
}

.design-frame-library-grid,
.design-icon-library-grid,
.design-built-in-icons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.design-frame-library-grid {
    max-height: 520px;
    overflow: auto;
    padding-right: 3px;
}

.design-frame-template,
.design-icon-template,
.design-built-in-icon {
    min-width: 0;
    padding: 8px;
    display: grid;
    gap: 6px;
    border: 1px solid #d7e4f5;
    border-radius: 12px;
    background: #fff;
    color: #243349;
    font-weight: 800;
    text-align: center;
    cursor: pointer;
}

.design-frame-template img,
.design-icon-template img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: 8px;
    background:
        linear-gradient(45deg, rgba(226, 232, 240, .45) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(226, 232, 240, .45) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(226, 232, 240, .45) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(226, 232, 240, .45) 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

.design-frame-template span,
.design-icon-template span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #68768a;
    font-size: .74rem;
}

.design-built-in-icons {
    margin-top: -2px;
}

.design-built-in-icon svg {
    width: 36px;
    height: 36px;
    margin: 8px auto 2px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.design-text-tool label,
.design-font-field,
.design-control-grid label,
.design-save-fields label {
    display: grid;
    gap: 7px;
    color: #354158;
    font-weight: 760;
}

.design-text-tool textarea,
.design-save-fields textarea,
.design-save-fields input,
.design-control-grid select,
.design-control-grid input[type="color"] {
    width: 100%;
    min-height: 42px;
    border: 1px solid #d9e0e8;
    border-radius: 10px;
    padding: 9px 12px;
    background: #fff;
    color: #273247;
    font: inherit;
    font-weight: 720;
}

.design-font-select-native {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.design-font-picker {
    position: relative;
    min-width: 0;
}

.design-font-picker-button {
    width: 100%;
    min-height: 42px;
    padding: 8px 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18px;
    align-items: center;
    gap: 8px;
    border: 1px solid #d9e0e8;
    border-radius: 10px;
    background: #fff;
    color: #273247;
    cursor: pointer;
}

.design-font-picker-button::after {
    content: "";
    width: 9px;
    height: 9px;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg) translateY(-2px);
}

.design-font-picker-button span,
.design-font-picker-list button span {
    min-width: 0;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1rem;
    line-height: 1.2;
    letter-spacing: 0;
}

.design-font-picker-list {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 220px;
    padding: 6px;
    display: grid;
    gap: 4px;
    overflow: auto;
    border: 1px solid #d7e4f5;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(24, 48, 84, .18);
}

.design-font-picker-list[hidden] {
    display: none !important;
}

.design-font-picker-list button {
    min-width: 0;
    min-height: 34px;
    padding: 6px 9px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: #273247;
    text-align: left;
    cursor: pointer;
}

.design-font-picker-list button:hover,
.design-font-picker-list button:focus-visible,
.design-font-picker-list button.is-active {
    border-color: #c8dcfb;
    background: #f1f6ff;
}

.design-text-tool textarea,
.design-save-fields textarea {
    resize: vertical;
}

.design-control-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
}

.design-control-grid input[type="range"] {
    width: 100%;
}

.design-control-grid b {
    color: #256fd9;
}

.design-text-toggles,
.design-result-actions,
.design-editor-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.design-text-toggles label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #4b5870;
    font-weight: 760;
}

.design-frame-primary,
.design-frame-secondary {
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 10px;
    font-family: var(--font-heading);
    font-weight: 900;
    cursor: pointer;
}

.design-frame-primary {
    border: 0;
    color: #fff;
    background: #256fd9;
    box-shadow: 0 8px 18px rgba(37, 111, 217, .22);
}

.design-frame-secondary {
    border: 1px solid #d4e4fb;
    color: #245fae;
    background: #f4f8ff;
}

.design-frame-primary:disabled,
.design-frame-secondary:disabled,
.design-editor-toolbar button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.design-canvas-shell,
.design-result-wrap {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid #dbe5f0;
    border-radius: 14px;
    background:
        linear-gradient(45deg, rgba(226, 232, 240, .42) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(226, 232, 240, .42) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(226, 232, 240, .42) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(226, 232, 240, .42) 75%);
    background-size: 22px 22px;
    background-position: 0 0, 0 11px, 11px -11px, -11px 0;
}

.design-canvas-shell {
    min-height: 520px;
    touch-action: none;
}

.design-canvas-shell canvas,
.design-result-wrap canvas {
    width: min(100%, 620px);
    height: auto;
    display: block;
}

.design-canvas-shell canvas {
    cursor: grab;
}

.design-canvas-shell canvas.is-dragging {
    cursor: grabbing;
}

.design-result-wrap {
    min-height: 420px;
}

.design-empty-state {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #718096;
    font-weight: 820;
    background: rgba(248, 251, 255, .72);
}

.design-empty-state[hidden],
.design-empty[hidden] {
    display: none !important;
}

.design-save-fields {
    display: grid;
    gap: 11px;
}

.design-result-actions button {
    flex: 1 1 180px;
}

.design-empty {
    grid-column: 1 / -1;
    margin: 0;
    color: #718096;
    font-weight: 780;
}

.convert-guide-modal {
    position: fixed;
    inset: 0;
    z-index: 520;
    display: none;
    place-items: center;
    padding: 22px;
    background: rgba(15, 23, 42, .48);
    backdrop-filter: blur(7px);
}

.convert-guide-modal.is-open {
    display: grid;
}

.convert-guide-dialog {
    position: relative;
    width: min(780px, calc(100vw - 28px));
    max-height: calc(100vh - 36px);
    overflow: auto;
    padding: 26px;
    border: 1px solid rgba(210, 224, 241, .96);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .24);
}

.convert-guide-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 12px;
    color: #6b7484;
    background: #f2f6fb;
    box-shadow: none;
}

.convert-guide-close svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2.4;
    fill: none;
    stroke-linecap: round;
}

.convert-guide-kicker,
.convert-guide-dialog h2,
.convert-guide-intro,
.convert-guide-card h3,
.convert-guide-card p,
.convert-guide-best h3,
.convert-guide-best ul {
    margin: 0;
}

.convert-guide-kicker {
    color: #256fd9;
    font-weight: 850;
}

.convert-guide-dialog h2 {
    margin-top: 5px;
    padding-right: 46px;
    color: #172238;
    font-family: var(--font-heading);
    font-size: clamp(1.28rem, 2.4vw, 1.82rem);
    line-height: 1.16;
}

.convert-guide-intro {
    margin-top: 10px;
    color: #66758a;
    line-height: 1.55;
}

.convert-guide-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.convert-guide-card {
    min-width: 0;
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid #dce7f3;
    border-radius: 14px;
    background: #f8fbff;
}

.convert-guide-card span {
    width: max-content;
    max-width: 100%;
    padding: 5px 9px;
    border-radius: 999px;
    color: #225cae;
    background: #eaf2ff;
    font-weight: 900;
}

.convert-guide-card.is-best {
    border-color: #f4c46a;
    background: #fffaf0;
}

.convert-guide-card.is-good {
    border-color: #b8d5fb;
}

.convert-guide-card h3 {
    color: #1f2a3d;
    font-size: 1rem;
}

.convert-guide-card p {
    color: #64748b;
    line-height: 1.48;
}

.convert-guide-best {
    margin-top: 14px;
    padding: 15px;
    border: 1px solid #f0d49b;
    border-radius: 14px;
    background: linear-gradient(180deg, #fff9eb, #fff);
}

.convert-guide-best h3 {
    color: #172238;
    font-size: 1rem;
}

.convert-guide-best ul {
    margin-top: 9px;
    padding-left: 20px;
    color: #5f6f84;
    line-height: 1.55;
}

.qr-panel h2 {
    margin: 0 0 8px;
    color: #354158;
    font-size: 22px;
}

.qr-panel label,
.qr-radio-group legend {
    display: grid;
    gap: 7px;
    color: #354158;
    font-weight: 760;
}

.qr-panel input,
.qr-panel select,
.qr-panel textarea,
.qr-options input[type="text"],
.qr-options select,
.qr-options input[type="color"] {
    width: 100%;
    min-height: 46px;
    border: 1px solid #d9e0e8;
    border-radius: 7px;
    padding: 10px 12px;
    color: #273247;
    background: #fff;
    box-shadow: none;
}

.qr-panel textarea {
    min-height: 96px;
    resize: vertical;
}

.qr-panel input::placeholder,
.qr-panel textarea::placeholder {
    color: #9aa4b2;
}

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

.qr-subnote {
    margin: 4px 0 -2px;
    color: #7a8494;
    font-style: italic;
    font-weight: 650;
}

.qr-radio-group {
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    border: 0;
}

.qr-radio-group legend {
    width: 100%;
    margin-bottom: 2px;
}

.qr-radio-group label,
.qr-check {
    display: inline-flex !important;
    grid-template-columns: none;
    align-items: center;
    gap: 8px;
    color: #4d5868;
    font-weight: 650;
}

.qr-radio-group input,
.qr-check input {
    width: 22px;
    height: 22px;
    min-height: 0;
    accent-color: #df5038;
}

.qr-options {
    padding: 16px;
    display: grid;
    gap: 14px;
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fafc, #fff);
    border: 1px solid #edf2f7;
}

.qr-options-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.qr-options-title > div {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.qr-options-title strong {
    color: #273247;
    font-family: var(--font-heading);
    font-size: 18px;
}

.qr-options-title span,
.qr-local-note {
    color: #748094;
    font-size: 13px;
    line-height: 1.45;
}

.qr-options-toggle {
    width: auto;
    min-height: 36px;
    padding: 7px 10px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    background: #edf5ff;
    border: 1px solid rgba(37, 111, 217, .18);
    border-radius: 999px;
    box-shadow: none;
    font-size: 14px;
}

.qr-options-toggle:hover,
.qr-options-toggle:focus-visible {
    color: #fff;
    background: var(--primary);
}

.qr-options-toggle svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    transition: transform .18s ease;
}

.qr-options.is-collapsed {
    gap: 0;
}

.qr-options.is-collapsed .qr-options-body {
    display: none;
}

.qr-options.is-collapsed .qr-options-toggle svg {
    transform: rotate(180deg);
}

.qr-options-body {
    display: grid;
    gap: 14px;
}

.qr-template-grid,
.qr-frame-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px;
}

.qr-template-option,
.qr-frame-option {
    cursor: pointer;
}

.qr-template-option input,
.qr-frame-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.qr-template-option span,
.qr-frame-option span {
    min-height: 74px;
    padding: 9px;
    display: grid;
    place-items: center;
    gap: 6px;
    color: #4d5868;
    border: 1px solid #dce5ef;
    border-radius: 10px;
    background: #fff;
    font-weight: 760;
    text-align: center;
    transition: border-color .16s ease, box-shadow .16s ease, color .16s ease;
}

.qr-template-option input:checked + span,
.qr-frame-option input:checked + span {
    color: #df5038;
    border-color: #df5038;
    box-shadow: 0 6px 16px rgba(223, 80, 56, .14);
}

.qr-style-sample {
    width: 34px;
    height: 34px;
    display: block;
    background:
        linear-gradient(#111827 0 0) 0 0 / 11px 11px,
        linear-gradient(#111827 0 0) 23px 0 / 11px 11px,
        linear-gradient(#111827 0 0) 0 23px / 11px 11px,
        linear-gradient(#111827 0 0) 16px 16px / 7px 7px,
        linear-gradient(#111827 0 0) 26px 22px / 8px 8px;
    background-repeat: no-repeat;
}

.qr-style-rounded {
    border-radius: 8px;
}

.qr-style-dots {
    background:
        radial-gradient(circle, #111827 65%, transparent 68%) 0 0 / 11px 11px,
        radial-gradient(circle, #111827 65%, transparent 68%) 23px 0 / 11px 11px,
        radial-gradient(circle, #111827 65%, transparent 68%) 0 23px / 11px 11px,
        radial-gradient(circle, #111827 65%, transparent 68%) 16px 16px / 7px 7px,
        radial-gradient(circle, #111827 65%, transparent 68%) 26px 22px / 8px 8px;
    background-repeat: no-repeat;
}
