
/* =========================================================
   Tutorial Studio
   Export Center

   文件：css/main/export.css

   职责：
   1. 导出弹窗
   2. 导出格式选择
   3. 页面范围选择
   4. 页面范围折叠面板
   5. PNG / MP4 / PPTX / HTML 设置
   6. 导出进度展示
   7. 导出状态提示
   8. 底部操作区域
   9. 响应式布局

   交互原则：
   - 选择格式不触发导出
   - 配置参数不触发导出
   - 只有开始导出按钮触发导出
========================================================= */


/* =========================================================
   01. Export Modal
========================================================= */

.export-modal {
    position: relative;

    width: min(760px, calc(100vw - 40px));
    height: min(900px, calc(100vh - 40px));
    max-height: min(900px, calc(100vh - 40px));

    display: flex;
    flex-direction: column;

    box-sizing: border-box;

    padding: 0;

    overflow: hidden;
    overscroll-behavior: contain;

    background: #fff;

    border: 1px solid rgba(226, 230, 237, .9);
    border-radius: 16px;

    box-shadow: 0 30px 90px rgba(0, 0, 0, .24);
}

.export-modal-body {
    flex: 1 1 auto;
    min-height: 0;

    padding: 28px 30px 24px;

    overflow-y: auto;
    overscroll-behavior: contain;
}

.export-modal-body::-webkit-scrollbar {
    width: 7px;
}

.export-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.export-modal-body::-webkit-scrollbar-thumb {
    background: #dce1e9;
    border-radius: 10px;
}

.export-modal-body::-webkit-scrollbar-thumb:hover {
    background: #c3cad5;
}

/*
 * 弹窗主体固定，内容区域独立滚动。
 * 页面范围和导出设置不会再被 flex 压扁。
 */
.export-modal > * {
    flex: 0 0 auto;
}

.export-modal > .export-modal-body {
    flex: 1 1 auto;
}

.export-modal::-webkit-scrollbar {
    width: 7px;
}

.export-modal::-webkit-scrollbar-track {
    background: transparent;
}

.export-modal::-webkit-scrollbar-thumb {
    background: #dce1e9;
    border-radius: 10px;
}

.export-modal::-webkit-scrollbar-thumb:hover {
    background: #c3cad5;
}

.export-modal .modal-close {
    z-index: 2;
}


/* =========================================================
   02. Header
========================================================= */

.export-modal .eyebrow {
    margin-bottom: 8px;

    color: var(--primary);

    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.8px;
}

.export-modal h2 {
    margin: 4px 0 8px;

    color: #172033;

    font-size: 23px;
    font-weight: 700;
    line-height: 1.4;
}

.export-description {
    margin: 0 0 22px;

    color: #7c8797;

    font-size: 12px;
    line-height: 1.7;
}


/* =========================================================
   03. Section
========================================================= */

.export-section {
    min-width: 0;

    margin-top: 20px;
}

.export-section-heading {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 12px;

    margin-bottom: 12px;
}

.export-section-heading h3 {
    margin: 0;

    color: #273247;

    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
}

.export-section-heading p {
    margin: 3px 0 0;

    color: #929baa;

    font-size: 11px;
    line-height: 1.5;
}

.export-page-count {
    flex-shrink: 0;

    padding: 5px 10px;

    border: 1px solid #e7eaf0;
    border-radius: 20px;

    background: #f8f9fb;

    color: #657187;

    font-size: 11px;
    font-weight: 600;
}


/* =========================================================
   04. Format Grid
========================================================= */

.export-grid {
    display: grid;

    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 10px;
}

.export-format-card {
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    min-width: 0;
    min-height: 154px;

    box-sizing: border-box;

    padding: 14px 12px;

    border: 1px solid #e7eaf0;
    border-radius: 11px;

    background: #fafbfc;

    color: inherit;

    font-family: inherit;
    text-align: left;

    user-select: none;
    -webkit-tap-highlight-color: transparent;

    cursor: pointer;

    transition:
        border-color .2s ease,
        background .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.export-format-card:hover {
    transform: translateY(-2px);

    border-color: #c5caff;

    background: #f8f8ff;

    box-shadow: 0 5px 16px rgba(79, 70, 229, .06);
}

.export-format-card:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.export-format-card:active {
    transform: translateY(0);
}


/* 已选择格式 */

.export-format-card[aria-pressed="true"] {
    border-color: var(--primary);

    background: #f5f6ff;

    box-shadow:
        0 0 0 2px rgba(79, 70, 229, .08),
        0 5px 16px rgba(79, 70, 229, .05);
}

.export-format-card[aria-pressed="true"] .export-format-name {
    color: var(--primary);
}

.export-format-card[aria-pressed="true"]::after {
    content: "✓";

    position: absolute;

    top: 9px;
    right: 9px;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 18px;
    height: 18px;

    border-radius: 50%;

    background: var(--primary);

    color: #fff;

    font-size: 11px;
    font-weight: 700;
}


/* 格式名称 */

.export-format-name {
    display: block;

    margin-top: 11px;

    color: #253148;

    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}


/* 格式说明 */

.export-format-desc {
    display: block;

    margin-top: 5px;

    color: #758195;

    font-size: 10px;
    line-height: 1.5;
}

.export-format-meta {
    display: block;

    margin-top: auto;
    padding-top: 9px;

    color: #a0a8b5;

    font-size: 10px;
    line-height: 1.4;
}


/* =========================================================
   05. Export Icons
========================================================= */

.export-icon {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    flex-shrink: 0;

    border-radius: 9px;

    font-size: 16px;
    font-weight: 700;
}

.export-icon-video {
    color: #7c3aed;
    background: #f3e8ff;
}

.export-icon-image {
    color: #0284c7;
    background: #e0f2fe;
}

.export-icon-ppt {
    color: #ea580c;
    background: #ffedd5;
}

.export-icon-html {
    color: #047857;
    background: #d1fae5;
}


/* =========================================================
   06. Export Accordion
========================================================= */

.export-collapse {
    min-width: 0;

    margin-top: 12px;

    border: 1px solid #e8ebf1;
    border-radius: 10px;

    background: #fff;

    overflow: hidden;
}


/* 折叠标题 */

.export-collapse-trigger {
    display: flex;

    align-items: center;
    justify-content: space-between;

    width: 100%;
    min-height: 58px;

    box-sizing: border-box;

    padding: 11px 15px;

    border: 0;

    background: #fff;

    color: inherit;

    font-family: inherit;
    text-align: left;

    cursor: pointer;

    transition: background .2s ease;
}

.export-collapse-trigger:hover {
    background: #fafbfc;
}

.export-collapse-trigger:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}


/* 折叠标题文字 */

.export-collapse-title {
    display: flex;
    flex-direction: column;

    min-width: 0;

    gap: 4px;
}

.export-collapse-title b {
    color: #354158;

    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.export-collapse-title small {
    color: #929baa;

    font-size: 10px;
    line-height: 1.4;
}


/* 折叠箭头 */

.export-collapse-arrow {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 26px;
    height: 26px;

    flex-shrink: 0;

    margin-left: 12px;

    border-radius: 7px;

    background: #f3f5f8;

    color: #778397;

    font-size: 18px;
    line-height: 1;

    transition:
        transform .22s ease,
        background .2s ease,
        color .2s ease;
}


/* 展开状态 */

.export-collapse-trigger[aria-expanded="true"] {
    background: #fafbff;
}

.export-collapse-trigger[aria-expanded="true"] .export-collapse-arrow {
    transform: rotate(180deg);

    background: #eeefff;

    color: var(--primary);
}


/* 折叠内容 */

.export-collapse-content {
    min-width: 0;

    padding: 0 15px 15px;

    border-top: 1px solid #f0f2f6;
}

.export-collapse-content[hidden] {
    display: none !important;
}


/* =========================================================
   07. Page Options
========================================================= */

.export-page-options {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 9px;
}

.export-option-card {
    display: flex;

    align-items: flex-start;

    min-width: 0;

    padding: 12px;

    border: 1px solid #e7eaf0;
    border-radius: 9px;

    background: #fff;

    cursor: pointer;

    transition:
        border-color .2s ease,
        background .2s ease;
}

.export-option-card:hover {
    border-color: #c5caff;
    background: #fafaff;
}

.export-option-card:has(input:checked) {
    border-color: var(--primary);
    background: #f8f8ff;
}

.export-option-card input {
    width: 15px;
    height: 15px;

    flex-shrink: 0;

    margin: 2px 9px 0 0;

    accent-color: var(--primary);
}

.export-option-content {
    display: flex;
    flex-direction: column;

    min-width: 0;
}

.export-option-content b {
    color: #354158;

    font-size: 12px;
    font-weight: 700;
}

.export-option-content small {
    margin-top: 5px;

    color: #929baa;

    font-size: 10px;
    line-height: 1.5;
}


/* =========================================================
   08. Custom Page Range
========================================================= */

.export-custom-pages {
    margin-top: 13px;
    padding: 14px;

    border: 1px solid #e9ecf2;
    border-radius: 9px;

    background: #fafbfc;
}

.export-custom-pages > label {
    display: block;

    margin-bottom: 7px;

    color: #445067;

    font-size: 11px;
    font-weight: 700;
}

.export-custom-pages input {
    display: block;

    width: 100%;
    height: 38px;

    box-sizing: border-box;

    padding: 0 11px;

    border: 1px solid #dfe4ec;
    border-radius: 7px;

    outline: none;

    background: #fff;

    color: #273247;

    font-family: inherit;
    font-size: 12px;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.export-custom-pages input:focus {
    border-color: var(--primary);

    box-shadow: 0 0 0 3px rgba(79, 70, 229, .08);
}

.export-custom-pages input::placeholder {
    color: #b0b7c3;
}

.export-custom-pages input[aria-invalid="true"] {
    border-color: #dc6262;
}

.export-field-hint {
    margin: 7px 0 0;

    color: #929baa;

    font-size: 10px;
    line-height: 1.6;
}

.export-range-hint {
    margin: 10px 0 0;
    padding: 0 2px;
}

.export-validation {
    margin-top: 5px;

    color: #dc6262;

    font-size: 10px;
    line-height: 1.5;
}

.export-validation:empty {
    display: none;
}


/* =========================================================
   09. Format Settings
========================================================= */

.export-settings-panel {
    min-width: 0;

    padding-top: 18px;

    border-top: 1px solid #edf0f4;
}

.export-collapse-content .export-settings-panel {
    margin-top: 0;
    padding-top: 14px;

    border-top: 0;
}

.export-settings-grid {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 14px 16px;
}

.export-field {
    display: flex;
    flex-direction: column;

    min-width: 0;
}

.export-field label {
    margin-bottom: 7px;

    color: #59657a;

    font-size: 11px;
    font-weight: 600;
}

.export-field select,
.export-field input {
    width: 100%;
    height: 38px;

    box-sizing: border-box;

    padding: 0 10px;

    border: 1px solid #dfe4ec;
    border-radius: 7px;

    outline: none;

    background: #fff;

    color: #354158;

    font-family: inherit;
    font-size: 11px;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.export-field select:focus,
.export-field input:focus {
    border-color: var(--primary);

    box-shadow: 0 0 0 3px rgba(79, 70, 229, .08);
}

.export-field small {
    margin-top: 6px;

    color: #929baa;

    font-size: 10px;
    line-height: 1.5;
}


/* =========================================================
   10. Checkbox Options
========================================================= */

.export-option-list {
    display: flex;
    flex-direction: column;

    gap: 9px;

    margin-top: 16px;
}

.export-checkbox-option {
    display: flex;

    align-items: flex-start;

    padding: 12px;

    border: 1px solid #e9ecf2;
    border-radius: 9px;

    background: #fff;

    cursor: pointer;

    transition:
        border-color .2s ease,
        background .2s ease;
}

.export-checkbox-option:hover {
    border-color: #c9d0dd;
    background: #fafbfc;
}

.export-checkbox-option input {
    width: 15px;
    height: 15px;

    flex-shrink: 0;

    margin: 2px 10px 0 0;

    accent-color: var(--primary);
}

.export-checkbox-option span {
    display: flex;
    flex-direction: column;

    min-width: 0;
}

.export-checkbox-option b {
    color: #354158;

    font-size: 11px;
    font-weight: 700;
}

.export-checkbox-option small {
    margin-top: 4px;

    color: #929baa;

    font-size: 10px;
    line-height: 1.5;
}


/* =========================================================
   11. Info Note
========================================================= */

.export-info-note {
    display: flex;

    align-items: flex-start;

    gap: 9px;

    margin-top: 14px;
    padding: 11px 12px;

    border: 1px solid #e9edf5;
    border-radius: 8px;

    background: #f8f9fc;

    color: #758195;

    font-size: 10px;
    line-height: 1.7;
}

.export-info-icon {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 16px;
    height: 16px;

    flex-shrink: 0;

    margin-top: 1px;

    border-radius: 50%;

    background: #e8ecf5;

    color: #69768c;

    font-size: 10px;
    font-weight: 700;
}


/* =========================================================
   12. Export Progress
========================================================= */

.export-progress-section {
    margin-top: 20px;
    padding: 16px;

    border: 1px solid #e5e9f1;
    border-radius: 10px;

    background: #fafbfe;
}

.export-progress-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 12px;

    margin-bottom: 13px;
}

.export-progress-header h3 {
    margin: 0;

    color: #273247;

    font-size: 13px;
    font-weight: 700;
}

.export-progress-header p {
    margin: 5px 0 0;

    color: #8792a3;

    font-size: 10px;
}

.export-progress-header strong {
    flex-shrink: 0;

    color: var(--primary);

    font-size: 22px;
    font-weight: 700;

    font-variant-numeric: tabular-nums;
}

.export-progress-track {
    width: 100%;
    height: 7px;

    overflow: hidden;

    border-radius: 10px;

    background: #e9edf4;
}

.export-progress-fill {
    width: 0%;
    height: 100%;

    border-radius: inherit;

    background: var(--primary);

    transition: width .25s ease;
}

.export-progress-details {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 10px;

    margin-top: 10px;

    color: #8792a3;

    font-size: 10px;
}

.export-progress-details span:last-child {
    flex-shrink: 0;

    font-variant-numeric: tabular-nums;
}


/* =========================================================
   13. Export Status
========================================================= */

.export-status {
    min-height: 18px;

    margin-top: 16px;
    padding: 11px 13px;

    border: 1px solid #edf0f5;
    border-radius: 8px;

    background: #f6f7fa;

    color: #7c8797;

    font-size: 11px;
    line-height: 1.7;

    overflow-wrap: anywhere;
}

.export-status[data-state="success"] {
    border-color: #d8eee0;
    background: #f3fbf6;
    color: #23834e;
}

.export-status[data-state="error"] {
    border-color: #f2dada;
    background: #fff7f7;
    color: #c64b4b;
}

.export-status[data-state="working"] {
    border-color: #e3e6fa;
    background: #f7f8ff;
    color: #5965b5;
}


/* =========================================================
   14. Footer
========================================================= */

.export-footer {
    display: flex;
    flex: 0 0 auto;

    align-items: center;
    justify-content: space-between;

    gap: 14px;

    margin-top: 0;
    padding: 16px 30px 20px;

    border-top: 1px solid #edf0f4;

    background: #fff;
}

.export-footer-info {
    display: flex;

    align-items: center;

    gap: 7px;

    color: #929baa;

    font-size: 10px;
    line-height: 1.5;
}

.export-footer-icon {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 16px;
    height: 16px;

    flex-shrink: 0;

    border-radius: 50%;

    background: #e7f6ed;

    color: #26945b;

    font-size: 10px;
    font-weight: 700;
}

.export-footer-actions {
    display: flex;

    align-items: center;

    gap: 9px;

    flex-shrink: 0;
}


/* =========================================================
   15. Footer Buttons
========================================================= */

.export-cancel-button,
.export-start-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 38px;

    padding: 0 16px;

    border-radius: 8px;

    font-family: inherit;
    font-size: 11px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background .2s ease,
        border-color .2s ease,
        box-shadow .2s ease,
        opacity .2s ease,
        filter .2s ease;
}

.export-cancel-button {
    border: 1px solid #e1e5ec;

    background: #fff;

    color: #687489;
}

.export-cancel-button:hover {
    border-color: #cbd2de;
    background: #f8f9fb;
}


/* 开始导出 */

.export-start-button {
    min-width: 124px;

    gap: 7px;

    border: 1px solid var(--primary);

    background: var(--primary);

    color: #fff;

    white-space: nowrap;

    box-shadow: 0 3px 8px rgba(79, 70, 229, .14);
}

.export-start-button:hover:not(:disabled) {
    filter: brightness(.96);

    box-shadow: 0 5px 13px rgba(79, 70, 229, .2);
}

.export-start-button:disabled {
    opacity: .4;

    cursor: not-allowed;

    box-shadow: none;
}

.export-start-button:focus-visible,
.export-cancel-button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.export-start-icon {
    font-size: 15px;
    line-height: 1;
}


/* =========================================================
   16. Export Running State
========================================================= */

.export-modal.is-exporting .export-format-card,
.export-modal.is-exporting .export-collapse-trigger,
.export-modal.is-exporting .export-option-card,
.export-modal.is-exporting .export-checkbox-option,
.export-modal.is-exporting .export-field select,
.export-modal.is-exporting .export-custom-pages input {
    pointer-events: none;
    opacity: .6;
}

.export-modal.is-exporting .export-start-button {
    pointer-events: none;
    cursor: wait;
}

.export-modal.is-exporting .export-cancel-button {
    opacity: .55;
}


/* 加载状态 */

.export-start-button.is-loading {
    pointer-events: none;
    opacity: .75;
    cursor: wait;
}

.export-start-button.is-loading .export-start-icon {
    animation: export-loading-rotate 1s linear infinite;
}

@keyframes export-loading-rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   17. Hidden State
========================================================= */

.export-custom-pages[hidden],
.export-settings-panel[hidden],
.export-progress-section[hidden],
.export-collapse-content[hidden] {
    display: none !important;
}


/* =========================================================
   18. Responsive
========================================================= */

@media (max-height: 820px) and (min-width: 761px) {
    .export-modal-body {
        padding-top: 20px;
    }

    .export-description {
        margin-bottom: 14px;
    }

    .export-section {
        margin-top: 14px;
    }

    .export-format-card {
        min-height: 118px;

        padding: 11px 10px;
    }

    .export-format-name {
        margin-top: 7px;

        font-size: 12.5px;
    }

    .export-format-desc {
        margin-top: 3px;
    }
}

@media (max-width: 760px) {

    .export-modal {
        width: calc(100vw - 28px);
        height: calc(100vh - 28px);
        max-height: calc(100vh - 28px);

        padding: 0;
    }

    .export-modal-body {
        padding: 24px 20px 20px;
    }

    .export-footer {
        padding: 14px 20px 16px;
    }

    .export-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .export-format-card {
        min-height: 140px;
    }

}


@media (max-width: 520px) {

    .export-modal {
        width: calc(100vw - 20px);
        height: calc(100dvh - 20px);
        max-height: calc(100dvh - 20px);

        padding: 0;

        border-radius: 13px;
    }

    .export-modal-body {
        padding: 21px 15px 16px;
    }

    .export-footer {
        padding: 12px 15px 14px;
    }

    .export-modal h2 {
        font-size: 20px;
    }

    .export-description {
        margin-bottom: 16px;

        font-size: 11px;
    }

    .export-section {
        margin-top: 17px;
    }

    .export-grid {
        gap: 8px;
    }

    .export-format-card {
        min-height: 137px;

        padding: 12px 10px;
    }

    .export-format-name {
        font-size: 12px;
    }

    .export-format-desc,
    .export-format-meta {
        font-size: 9px;
    }

    .export-icon {
        width: 33px;
        height: 33px;

        font-size: 15px;
    }

    .export-page-options {
        grid-template-columns: 1fr;

        gap: 7px;
    }

    .export-option-card {
        padding: 10px;
    }

    .export-settings-grid {
        grid-template-columns: 1fr;

        gap: 12px;
    }

    .export-collapse {
        margin-top: 10px;

        border-radius: 9px;
    }

    .export-collapse-trigger {
        min-height: 54px;

        padding: 10px 12px;
    }

    .export-collapse-content {
        padding: 0 12px 12px;
    }

    .export-footer {
        align-items: stretch;
        flex-direction: column;

        gap: 13px;
    }

    .export-footer-info {
        font-size: 10px;
    }

    .export-footer-actions {
        width: 100%;
    }

    .export-cancel-button,
    .export-start-button {
        flex: 1;

        min-height: 40px;
    }

    .export-progress-section {
        padding: 13px;
    }

    .export-progress-header strong {
        font-size: 20px;
    }

}


/* =========================================================
   19. Reduced Motion
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .export-modal *,
    .export-modal *::before,
    .export-modal *::after {
        scroll-behavior: auto !important;

        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }

}


/* =========================================================
   20. PNG Result
========================================================= */

.png-result-modal {
    position: relative;

    display: flex;
    flex-direction: column;

    width: min(1040px, 92vw);
    height: min(760px, 90vh);
    max-height: min(760px, 90vh);

    padding: 24px;

    overflow: hidden;

    border-radius: 18px;

    background: #ffffff;

    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.24);

    box-sizing: border-box;
}

.png-result-head {
    flex: 0 0 auto;

    padding-right: 42px;
}

.png-result-head .eyebrow {
    margin-bottom: 6px;
}

.png-result-head h2 {
    margin: 0;

    color: #172033;

    font-size: 22px;
    letter-spacing: -0.3px;
}

.png-result-meta {
    margin: 6px 0 0;

    color: #7c8798;

    font-size: 12px;
    line-height: 1.7;
}

.png-result-zip {
    display: flex;
    flex: 0 0 auto;
    align-items: center;

    gap: 14px;

    margin-top: 18px;
    padding: 14px 16px;

    border: 1px solid #dfe5f1;
    border-radius: 12px;

    background:
        linear-gradient(135deg, #f7f9ff, #eef2ff);
}

.png-result-zip[hidden] {
    display: none !important;
}

.png-result-zip-icon {
    display: grid;
    flex: 0 0 44px;

    width: 44px;
    height: 44px;

    place-items: center;

    border-radius: 10px;

    background: #5667e8;

    color: #ffffff;

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.png-result-zip-copy {
    display: flex;
    flex: 1;
    flex-direction: column;

    gap: 3px;

    min-width: 0;
}

.png-result-zip-copy b {
    color: #1e293b;

    font-size: 13px;
}

.png-result-zip-copy span {
    overflow: hidden;

    color: #7c8798;

    font-size: 11px;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.png-result-preview {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;

    min-height: 0;
    max-height: none;

    margin: 4px 0 14px;
    padding: 12px;

    overflow: hidden;

    border: 1px solid #e1e6ef;
    border-radius: 10px;

    background: #f7f8fb;
}

.png-result-preview img {
    display: block;

    max-width: 100%;
    max-height: 100%;

    object-fit: contain;

    background: #ffffff;

    box-shadow:
        0 4px 16px rgba(15, 23, 42, 0.10);
}

.png-result-modal.is-single {
    width: min(860px, 92vw);
}

.png-result-modal.is-single .png-result-preview {
    min-height: 0;
    max-height: none;
}

.png-result-modal.is-single .png-result-preview img {
    max-height: 100%;
}

.png-result-toolbar {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px;

    margin: 16px 0 12px;
}

.png-result-action {
    min-height: 34px;

    padding: 0 13px;

    border: 1px solid #5667e8;
    border-radius: 8px;

    background: #5667e8;

    color: #ffffff;

    font: inherit;
    font-size: 12px;
    font-weight: 680;

    cursor: pointer;
}

.png-result-action:hover {
    background: #4353d5;
}

.png-result-action.is-secondary {
    border-color: #dbe2ee;

    background: #ffffff;

    color: #46536a;
}

.png-result-action.is-secondary:hover {
    border-color: #b9c4d8;

    background: #f5f7fb;
}

.png-result-action:disabled {
    opacity: 0.45;

    cursor: default;
}

.png-result-hint {
    flex: 1;

    min-width: 160px;

    color: #8b95a6;

    font-size: 11px;
}

.png-result-grid {
    display: grid;
    flex: 1;

    grid-template-columns:
        repeat(auto-fill, minmax(132px, 1fr));

    gap: 10px;

    min-height: 120px;

    padding: 2px 2px 6px;

    overflow: auto;

    overscroll-behavior: contain;
}

.png-result-card {
    position: relative;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    border: 1px solid #e1e6ef;
    border-radius: 9px;

    background: #f7f8fb;

    color: #536078;

    text-decoration: none;
}

.png-result-card:hover {
    border-color: #9aa6ef;

    box-shadow:
        0 4px 14px rgba(86, 103, 232, 0.12);
}

.png-result-card img {
    display: block;

    width: 100%;
    aspect-ratio: 4 / 3;

    object-fit: contain;

    background: #ffffff;
}

.png-result-card span {
    overflow: hidden;

    padding: 6px 8px;

    font-size: 10px;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.png-result-note {
    flex: 0 0 auto;

    margin: 10px 0 0;

    color: #8b95a6;

    font-size: 10.5px;
    line-height: 1.7;
}

@media (max-width: 640px) {
    .png-result-modal {
        width: calc(100vw - 20px);
        max-height: 94vh;

        padding: 18px;
    }

    .png-result-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .png-result-hint {
        min-width: 0;
    }

    .png-result-grid {
        grid-template-columns:
            repeat(auto-fill, minmax(112px, 1fr));
    }
}
