/* TUCAS_BUILD_0_1_53 */
/* TUCAS_BUILD_0_1_43 */
/* TUCAS_BUILD_0_1_42 */
/* TUCAS_BUILD_0_1_41 */
/* TUCAS_BUILD_0_1_40 */
/* TUCAS_BUILD_0_1_39 */
/* TUCAS_BUILD_0_1_38 */
/* TUCAS_BUILD_0_1_37 */
/* TUCAS_BUILD_0_1_36 */
/* TUCAS_BUILD_0_1_35 */
/* TUCAS_BUILD_0_1_34 */
/* TUCAS_BUILD_0_1_33 */
/* TUCAS_BUILD_0_1_32 */
/* TUCAS_BUILD_0_1_31 */
/* TUCAS_BUILD_0_1_30 */
/* TUCAS_BUILD_0_1_29 */
/* TUCAS_BUILD_0_1_28 */
/* TUCAS_BUILD_0_1_27 */
body.tic-tool-page {
    overflow: hidden;
    --wp--style--global--content-size: 100%;
    --wp--style--global--wide-size: 100%;
}

body.tic-tool-page .tic-host {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
}

body.tic-tool-page .imgfr-custom-footer,
body.tic-tool-page .wp-block-template-part:has(footer),
body.tic-tool-page .wp-block-post-title {
    display: none !important;
}

body.tic-tool-page .entry-header,
body.tic-tool-page .page-header,
body.tic-tool-page .entry-title,
body.tic-tool-page .post-thumbnail,
body.tic-tool-page .comments-area {
    display: none !important;
}

body.tic-tool-page #primary,
body.tic-tool-page .site-main,
body.tic-tool-page .content-area,
body.tic-tool-page .entry-content {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.tic {
    --tic-card: 180px;
    --tic-gap: 34px;

    position: relative;
    display: flex;
    flex-direction: column;

    width: 100%;
    height: calc(
        100dvh - var(--tic-top, 100px)
    );
    min-width: 0;
    min-height: 0;

    overflow: hidden;

    background: #17191c;
    color: #f3f4f6;

    font:
        13px/1.4
        system-ui,
        sans-serif;
}

.tic,
.tic * {
    box-sizing: border-box;
}

.tic button,
.tic input {
    font: inherit;
}

.tic-toolbar-wrap {
    flex: none;

    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;

    border-bottom: 1px solid #262b32;
    background: #15171b;

    scrollbar-width: thin;
    scrollbar-color: #5c6572 #15181d;
}

.tic-toolbar {
    display: flex;

    width: max-content;
    min-width: 100%;
    min-height: 45px;

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

    gap: 7px;
    padding: 8px 14px;
}

.tic-control {
    flex: none;

    min-height: 29px;
    padding: 5px 11px;

    border: 1px solid #424852;
    border-radius: 5px;
    outline: 0;

    background: #1d2025;
    color: #f1f3f5;

    font-size: 12px;
    white-space: nowrap;

    cursor: pointer;
}

.tic-control:hover {
    border-color: #626b78;
    background: #252930;
}

.tic-control:active {
    transform: translateY(1px);
}

.tic-workspace {
    position: relative;

    flex: 1;

    width: 100%;
    min-width: 0;
    min-height: 0;

    overflow: auto;

    padding: 24px;

    background-color: #15181d;

    background-image:
        linear-gradient(
            45deg,
            #1c2026 25%,
            transparent 25%
        ),
        linear-gradient(
            -45deg,
            #1c2026 25%,
            transparent 25%
        ),
        linear-gradient(
            45deg,
            transparent 75%,
            #1c2026 75%
        ),
        linear-gradient(
            -45deg,
            transparent 75%,
            #1c2026 75%
        );

    background-position:
        0 0,
        0 8px,
        8px -8px,
        -8px 0;

    background-size: 16px 16px;

    scrollbar-width: thin;
    scrollbar-color: #5c6572 #15181d;

    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.tic-workspace::-webkit-scrollbar,
.tic-toolbar-wrap::-webkit-scrollbar {
    width: 10px;
    height: 8px;
}

.tic-workspace::-webkit-scrollbar-track,
.tic-toolbar-wrap::-webkit-scrollbar-track {
    background: #15181d;
}

.tic-workspace::-webkit-scrollbar-thumb,
.tic-toolbar-wrap::-webkit-scrollbar-thumb {
    border: 2px solid #15181d;
    border-radius: 999px;
    background: #525b68;
}

.tic-workspace.is-drop-active {
    box-shadow:
        inset 0 0 0 2px #d9b622;
}

.tic-grid {
    display: flex;

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

    flex-wrap: wrap;
    align-content: flex-start;
    align-items: flex-start;
    justify-content: flex-start;

    gap: var(--tic-gap);
}

.tic:not(.has-files) .tic-grid {
    align-content: center;
    align-items: center;
    justify-content: center;
}

.tic-card {
    position: relative;

    flex: 0 0 var(--tic-card);
    width: var(--tic-card);
    min-width: 0;

    cursor: grab;

    transition:
        transform .18s ease,
        opacity .18s ease,
        filter .18s ease;
}

.tic-card:active {
    cursor: grabbing;
}

.tic-import-card {
    cursor: pointer;
}

.tic:not(.has-files) .tic-import-card {
    flex: 0 0 250px;
    width: 250px;
}

.tic-sheet {
    position: relative;

    display: grid;
    width: 100%;

    aspect-ratio: 4 / 3;

    place-items: center;

    overflow: hidden;

    border: 1px solid #3b414a;
    border-radius: 3px;

    background: #20242a;

    box-shadow:
        0 3px 12px #0006;
}

.tic-card:hover .tic-sheet {
    border-color: #596270;
}

.tic-import-card .tic-sheet {
    border-style: dashed;
    border-color: #666d7a;
    background: #191c21ef;
}

.tic:not(.has-files)
.tic-import-card
.tic-sheet {
    min-height: 188px;
}

.tic-import-inner {
    display: grid;

    gap: 5px;
    place-items: center;

    padding: 12px;

    text-align: center;
}

.tic-import-plus {
    color: #f5d34e;
    font-size: 24px;
    line-height: 1;
}

.tic:not(.has-files)
.tic-import-plus {
    font-size: 30px;
}

.tic-import-title {
    color: #f3f4f6;
    font-size: 12px;
    font-weight: 600;
}

.tic:not(.has-files)
.tic-import-title {
    font-size: 14px;
}

.tic-import-note {
    color: #9ca4b0;
    font-size: 10px;
}

.tic:not(.has-files)
.tic-import-note {
    margin-top: 2px;
    font-size: 11px;
}

.tic.has-files
.tic-import-note {
    display: none;
}

.tic-preview {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;

    background: #f7f7f7;

    pointer-events: none;
    -webkit-user-drag: none;
}

.tic-placeholder {
    display: grid;

    width: 100%;
    height: 100%;

    place-items: center;

    color: #9ca4b0;

    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.tic-caption {
    margin-top: 8px;

    overflow: hidden;

    color: #e5e7eb;

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

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

.tic-meta {
    margin-top: 3px;

    color: #9ca4b0;

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

.tic-remove,
.tic-group-toggle {
    position: absolute;
    z-index: 4;

    display: grid;

    width: 25px;
    height: 25px;

    place-items: center;
    padding: 0;

    border-radius: 50%;
    outline: 0;

    cursor: pointer;
}

.tic-remove {
    top: -8px;
    right: -8px;

    border: 1px solid #59616d;

    background: #292d34;
    color: #fff;

    font-size: 17px;
    line-height: 1;
}

.tic-remove:hover {
    background: #363b44;
}

.tic-group-toggle {
    top: 5px;
    left: 5px;

    border: 1px solid #665c39;

    background: #22252eed;
    color: #f5d34e;

    font-size: 20px;
    line-height: 1;
}

.tic-file-group .tic-sheet {
    box-shadow:
        4px 4px 0 #6b7280,
        8px 8px 0 #424955,
        0 3px 12px #0006;
}

.tic-card.is-dragging {
    opacity: .28;
    filter: saturate(.45);
    transform: scale(.96);
}

.tic-drag-ghost {
    position: fixed !important;
    z-index: 1000 !important;

    margin: 0 !important;

    pointer-events: none !important;

    opacity: .86;

    filter:
        drop-shadow(
            0 14px 18px #000b
        );

    transform:
        rotate(1.5deg)
        scale(1.025);
}

.tic-drop-slot {
    position: relative;

    flex: 0 0 50px;

    width: 50px;
    height: calc(
        var(--tic-card) * .75
    );

    border-radius: 7px;

    background: #f5cc4b12;

    box-shadow:
        inset 0 0 0 1px #f5cc4b70;
}

.tic-drop-slot::after {
    content: "";

    position: absolute;

    top: 7px;
    bottom: 7px;
    left: 50%;

    width: 3px;

    border-radius: 3px;

    background: #f5cc4b;

    transform:
        translateX(-50%);
}

@media (max-width: 640px) {
    .tic {
        --tic-card: 138px;
        --tic-gap: 20px;
    }

    .tic-toolbar-wrap {
        overflow-x: hidden;
    }

    .tic-toolbar {
        justify-content: center;

        width: 100%;
        min-width: 0;

        gap: 3px;
        padding: 7px 5px;
    }

    .tic-control {
        min-height: 29px;
        padding: 5px 7px;

        font-size: 11px;
    }

    .tic-workspace {
        padding: 18px;
    }

    .tic:not(.has-files)
    .tic-import-card {
        flex-basis: 210px;
        width: 210px;
    }

    .tic:not(.has-files)
    .tic-import-card
    .tic-sheet {
        min-height: 158px;
    }
}

/*
 * TUCAS IMAGE CONVERTER 0.1.3
 * Exact viewport shell.
 *
 * --tic-viewport-top is measured from the live site header.
 */

body.tic-tool-page {
    overflow: hidden !important;
}

body.tic-tool-page .imgfr-custom-footer,
body.tic-tool-page .wp-block-template-part:has(footer),
body.tic-tool-page footer,
body.tic-tool-page .wp-block-post-title {
    display: none !important;
}

body.tic-tool-page .tic {
    position: fixed !important;

    z-index: 50;

    top: var(--tic-viewport-top, 0px) !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;

    width: auto !important;
    height: auto !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 0 !important;

    min-width: 0 !important;
    min-height: 0 !important;

    border: 0 !important;

    display: flex !important;
    flex-direction: column !important;

    overflow: hidden !important;
}

body.tic-tool-page .tic-toolbar-wrap {
    flex: none;

    width: 100% !important;
    max-width: none !important;

    margin: 0 !important;
}

body.tic-tool-page .tic-workspace {
    flex: 1;

    width: 100% !important;
    max-width: none !important;

    min-width: 0 !important;
    min-height: 0 !important;

    margin: 0 !important;
}

/*
 * TUCAS IMAGE CONVERTER 0.1.4
 * PPM visual system + Access-driven empty import panel.
 */

.tic {
    --tic-gold: #f5d34e;
}

body.tic-tool-page .tic-toolbar-wrap {
    border-bottom: 1px solid #262b32 !important;
    background: #15171b !important;
}

body.tic-tool-page .tic-toolbar {
    min-height: 45px;
    background: #15171b;
}

.tic .tic-control {
    min-height: 29px;
    padding: 5px 11px;

    border: 1px solid #424852;
    border-radius: 5px;

    background: #1d2025;
    color: #f1f3f5;

    font-size: 12px;
}

.tic .tic-control:hover:not(:disabled) {
    border-color: #626b78;
    background: #252930;
}

.tic .tic-control:disabled,
.tic .tic-import-trigger:disabled {
    opacity: .5;
    cursor: default;
}

body.tic-tool-page .tic-workspace {
    background-color: #15181d !important;

    background-image:
        linear-gradient(
            45deg,
            #1c2026 25%,
            transparent 25%
        ),
        linear-gradient(
            -45deg,
            #1c2026 25%,
            transparent 25%
        ),
        linear-gradient(
            45deg,
            transparent 75%,
            #1c2026 75%
        ),
        linear-gradient(
            -45deg,
            transparent 75%,
            #1c2026 75%
        ) !important;

    background-position:
        0 0,
        0 8px,
        8px -8px,
        -8px 0 !important;

    background-size:
        16px 16px !important;
}

.tic-empty-import {
    display: flex;

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

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

    padding: 18px;
}

.tic.has-files .tic-empty-import {
    display: none;
}

.tic:not(.has-files) .tic-grid {
    display: none;
}

.tic-import-panel {
    display: block;

    width: min(100%, 720px);
    max-width: 720px;

    margin: 0;
    padding: 14px;

    border: 1px solid #343a43;
    border-radius: 9px;

    background: #191c21ef;

    box-shadow:
        0 8px 24px #0003;

    text-align: center;
}

.tic .tic-import-trigger {
    display: flex;

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

    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 4px;

    padding: 14px 10px;

    border: 1px dashed #555e6b;
    border-radius: 7px;

    outline: 0;

    background: #15171b;
    color: #f1f3f5;

    cursor: pointer;
}

.tic .tic-import-trigger:hover:not(:disabled) {
    border-color: var(--tic-gold);
    background: #1c2026;
}

.tic .tic-import-trigger strong {
    font-size: 15px;
}

.tic .tic-import-trigger small {
    color: #9098a5;

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

.tic .tic-import-trigger .tic-import-plus {
    color: var(--tic-gold);

    font-size: 22px;
    line-height: 1;
}

.tic-requirements {
    width: 100%;

    margin-top: 12px;
    padding: 0;

    overflow: hidden;

    border: 1px solid #3b414a;
    border-radius: 7px;

    background: #15171b;
}

.tic-requirements > strong {
    display: block;

    margin: 0;
    padding: 11px 12px;

    border-bottom: 1px solid #3b414a;

    font-size: 15px;
    line-height: 1.25;
}

.tic-requirements-grid {
    display: grid;

    width: 100%;

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

.tic-requirements dl {
    min-width: 0;

    margin: 0;
    padding: 10px 12px;
}

.tic-requirements dl + dl {
    border-left: 1px solid #343a43;
}

.tic-requirements dl > div {
    display: grid;

    grid-template-columns:
        minmax(120px, .9fr)
        minmax(0, 1.1fr);

    gap: 10px;

    margin: 4px 0;

    text-align: left;

    font-size: 11.5px;
    line-height: 1.45;
}

.tic-requirements dt {
    color: #9ca4b0;
    text-align: right;
}

.tic-requirements dd {
    margin: 0;

    color: #f1f3f5;

    font-weight: 600;

    overflow-wrap: anywhere;
}

.tic-config-error {
    position: absolute;

    z-index: 20;

    top: 12px;
    left: 50%;

    width: min(
        calc(100% - 24px),
        620px
    );

    padding: 10px 12px;

    border: 1px solid #784747;
    border-radius: 6px;

    background: #2b1c1e;
    color: #f1b8b8;

    font-size: 11px;

    transform:
        translateX(-50%);
}

.tic.has-files .tic-grid {
    display: flex;

    min-height: 0;

    align-content: flex-start;
    align-items: flex-start;
    justify-content: flex-start;
}

/*
 * Populated-state Import card:
 * normal grid card, always first.
 */
.tic.has-files .tic-import-card {
    flex: 0 0 var(--tic-card);
    width: var(--tic-card);
}

.tic.has-files .tic-import-card .tic-sheet {
    width: 100%;
    aspect-ratio: 4 / 3;

    border: 1px dashed #555e6b;
    border-radius: 3px;

    background: #15171b;
}

.tic.has-files .tic-import-card:hover .tic-sheet {
    border-color: var(--tic-gold);
    background: #1c2026;
}

.tic.has-files .tic-import-plus {
    color: var(--tic-gold);
    font-size: 22px;
}

.tic.has-files .tic-import-title {
    font-size: 12px;
}

@media (max-width: 640px) {
    .tic-empty-import {
        padding: 10px;
    }

    .tic-import-panel {
        padding: 10px;
    }

    .tic-requirements > strong {
        font-size: 13px;
    }

    .tic-requirements-grid {
        grid-template-columns:
            minmax(0, 1fr);
    }

    .tic-requirements dl + dl {
        border-top:
            1px solid #343a43;

        border-left: 0;
    }

    .tic-requirements dl > div {
        grid-template-columns: 1fr;

        font-size: 12px;
    }

    .tic-requirements dt {
        text-align: left;
    }
}

/*
 * TUCAS IMAGE CONVERTER 0.1.5
 *
 * Grid geometry follows Pro PDF Merge:
 *   --cell: 180px
 *   gap: 24px
 *
 * Converter difference:
 * preview sheet is fixed so source aspect ratio never
 * changes card geometry.
 */

body.tic-tool-page .tic-workspace {
    overflow: auto !important;
    padding: 22px !important;

    overscroll-behavior: contain;

    scrollbar-gutter: stable;
}

/* ---------- GRID ---------- */

.tic.has-files .tic-grid {
    display: flex !important;

    width: var(--tic-grid-width, 100%);

    min-height: 100%;

    margin-inline: auto;

    flex-wrap: wrap;

    align-items: flex-start;
    align-content: flex-start;
    justify-content: flex-start;

    gap: 24px;

    --tic-cell: 180px;
}

/* ---------- ALL CARDS ---------- */

.tic.has-files .tic-card,
.tic.has-files .tic-import-card {
    position: relative;

    flex: 0 0 var(--tic-cell) !important;

    width: var(--tic-cell) !important;
    min-width: var(--tic-cell) !important;
    max-width: var(--tic-cell) !important;

    margin: 0 !important;

    padding: 0 !important;

    border: 0 !important;

    background: transparent !important;

    box-shadow: none !important;

    user-select: none;
}

/*
 * Fixed preview footprint.
 *
 * 180 × 135 = 4:3.
 * The source itself never controls this geometry.
 */
.tic.has-files .tic-sheet {
    position: relative;

    display: flex;

    width: 180px !important;
    height: 135px !important;

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

    overflow: hidden;

    border: 0 !important;
    border-radius: 0 !important;

    outline: 2px solid transparent;

    background: #fff !important;

    box-shadow:
        0 3px 12px #0006;
}

/* ---------- FILE PREVIEW ---------- */

.tic.has-files .tic-sheet img,
.tic.has-files .tic-preview,
.tic.has-files .tic-card img {
    display: block;

    width: 100% !important;
    height: 100% !important;

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

    margin: 0 !important;

    object-fit: contain !important;
    object-position: center center !important;

    background: transparent;

    transform: none;
}

/*
 * Protect the fixed preview box from intrinsic dimensions
 * or old ratio rules.
 */
.tic.has-files
.tic-card
.tic-sheet[style] {
    aspect-ratio: auto !important;
}

.tic.has-files
.tic-card
.tic-sheet > * {
    max-width: 100%;
    max-height: 100%;
}

/* ---------- CAPTION / META ---------- */

.tic.has-files .tic-caption,
.tic.has-files .tic-name,
.tic.has-files .tic-card-name {
    display: block;

    width: 100%;

    min-width: 0;

    padding-top: 8px;

    overflow: hidden;

    color: #b4bac5;

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

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

.tic.has-files .tic-meta,
.tic.has-files .tic-card-meta {
    display: block;

    width: 100%;

    min-width: 0;

    margin-top: 3px;

    overflow: hidden;

    color: #9098a5;

    font-size: 10px;
    line-height: 1.3;

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

/* ---------- REMOVE ---------- */

.tic.has-files .tic-remove {
    position: absolute;

    z-index: 3;

    top: 5px;
    right: 5px;

    width: 24px;
    height: 24px;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: #242832e8;
    color: #fff;

    font-size: 18px;
    line-height: 24px;
}

/* ---------- IMPORT CARD ---------- */

.tic.has-files .tic-import-card {
    cursor: pointer;
}

.tic.has-files
.tic-import-card
.tic-sheet {
    flex-direction: column;

    gap: 4px;

    border:
        1px dashed #555e6b !important;

    background:
        #15171b !important;

    box-shadow: none;
}

.tic.has-files
.tic-import-card:hover
.tic-sheet {
    border-color:
        var(--tic-gold) !important;

    background:
        #1c2026 !important;
}

.tic.has-files
.tic-import-card
.tic-import-plus {
    color: var(--tic-gold);

    font-size: 22px;
    line-height: 1;
}

.tic.has-files
.tic-import-card
.tic-import-title {
    color: #f1f3f5;

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

/*
 * Old rules must not center/stretch populated cards.
 */
.tic.has-files .tic-card {
    align-self: flex-start;
}

@media (max-width: 640px) {
    body.tic-tool-page .tic-workspace {
        padding: 18px !important;
    }

    .tic.has-files .tic-grid {
        gap: 18px;
    }
}

/*
 * TUCAS IMAGE CONVERTER 0.1.6
 *
 * PPM-style natural sheet geometry:
 * - card width remains 180px;
 * - file sheet follows source aspect ratio;
 * - no artificial 4:3 white area;
 * - image fills its own sheet exactly;
 * - Import remains a fixed control card.
 */

.tic.has-files .tic-card {
    flex: 0 0 var(--tic-cell) !important;

    width: var(--tic-cell) !important;
    min-width: var(--tic-cell) !important;
    max-width: var(--tic-cell) !important;
}

/*
 * File sheet:
 * JS supplies aspect-ratio from the actual preview.
 */
.tic.has-files
.tic-card:not(.tic-import-card)
.tic-sheet {
    display: block;

    width: 100% !important;
    height: auto !important;

    aspect-ratio:
        var(--tic-source-ratio, 4 / 3) !important;

    overflow: hidden;

    background: transparent !important;
}

/*
 * Actual image occupies the natural-ratio sheet.
 * Because sheet and image have the same ratio,
 * contain produces no artificial side/top bands.
 */
.tic.has-files
.tic-card:not(.tic-import-card)
.tic-sheet img,
.tic.has-files
.tic-card:not(.tic-import-card)
.tic-preview {
    display: block;

    width: 100% !important;
    height: 100% !important;

    max-width: none !important;
    max-height: none !important;

    object-fit: contain !important;
    object-position: center !important;

    background: transparent !important;
}

/*
 * Import is a control, not source media.
 * Keep a predictable PPM-like card footprint.
 */
.tic.has-files
.tic-import-card
.tic-sheet {
    width: 100% !important;
    height: auto !important;

    aspect-ratio: 4 / 3 !important;
}

/*
 * TUCAS IMAGE CONVERTER 0.1.7
 * Workspace zoom + no text selection.
 */

.tic,
.tic * {
    -webkit-user-select: none !important;
    user-select: none !important;

    -webkit-user-drag: none;
}

.tic img {
    -webkit-user-drag: none;
    user-drag: none;

    pointer-events: none;
}

.tic-workspace {
    /*
     * JS handles two-finger pinch.
     * Single-finger interaction remains available for
     * future card drag/reorder.
     */
    touch-action: pan-x pan-y;
}

/*
 * Zoom variables.
 * Natural media aspect ratio remains untouched.
 */
.tic.has-files .tic-grid {
    --tic-cell:
        calc(
            180px *
            var(--tic-zoom, 1)
        );

    gap:
        calc(
            24px *
            var(--tic-zoom, 1)
        );
}

.tic.has-files
.tic-import-card
.tic-import-plus {
    font-size:
        calc(
            22px *
            var(--tic-zoom, 1)
        );
}

.tic.has-files
.tic-import-card
.tic-import-title {
    font-size:
        clamp(
            9px,
            calc(
                12px *
                var(--tic-zoom, 1)
            ),
            32px
        );
}

.tic.has-files .tic-caption,
.tic.has-files .tic-name,
.tic.has-files .tic-card-name {
    padding-top:
        calc(
            8px *
            var(--tic-zoom, 1)
        );

    font-size:
        clamp(
            8px,
            calc(
                11px *
                var(--tic-zoom, 1)
            ),
            30px
        );
}

.tic.has-files .tic-meta,
.tic.has-files .tic-card-meta {
    margin-top:
        calc(
            3px *
            var(--tic-zoom, 1)
        );

    font-size:
        clamp(
            8px,
            calc(
                10px *
                var(--tic-zoom, 1)
            ),
            28px
        );
}

.tic.has-files .tic-remove {
    width:
        clamp(
            18px,
            calc(
                24px *
                var(--tic-zoom, 1)
            ),
            48px
        );

    height:
        clamp(
            18px,
            calc(
                24px *
                var(--tic-zoom, 1)
            ),
            48px
        );

    font-size:
        clamp(
            14px,
            calc(
                18px *
                var(--tic-zoom, 1)
            ),
            36px
        );

    line-height: 1;
}


/*
 * TUCAS IMAGE CONVERTER 0.1.9
 *
 * Responsive workspace:
 * - desktop base card: 180px;
 * - mobile base card: 112px;
 * - natural wrapping across available width;
 * - no JS-calculated grid width;
 * - one-finger touch belongs to native scrolling;
 * - two-finger pinch remains owned by ZOOM_017.
 */

.tic.has-files .tic-grid {
    --tic-base-cell: 180px;
    --tic-base-gap: 24px;

    --tic-cell:
        calc(
            var(--tic-base-cell) *
            var(--tic-zoom, 1)
        );

    width: 100% !important;
    max-width: none !important;

    margin-inline: 0 !important;

    justify-content: flex-start !important;
    align-content: flex-start !important;

    gap:
        calc(
            var(--tic-base-gap) *
            var(--tic-zoom, 1)
        ) !important;
}

.tic-workspace {
    overflow: auto !important;

    touch-action: pan-x pan-y !important;

    overscroll-behavior: contain;

    -webkit-overflow-scrolling: touch;
}

@media (max-width: 640px) {

    .tic-workspace {
        /*
         * Keep only a small workspace inset.
         * Do not center a calculated grid width.
         */
        padding:
            12px !important;
    }

    .tic.has-files .tic-grid {
        --tic-base-cell: 112px;
        --tic-base-gap: 12px;

        width: 100% !important;

        margin: 0 !important;

        justify-content: flex-start !important;
    }

    .tic.has-files .tic-card {
        flex:
            0 0
            var(--tic-cell) !important;

        width:
            var(--tic-cell) !important;

        min-width:
            var(--tic-cell) !important;

        max-width:
            var(--tic-cell) !important;
    }
}


/*
 * TUCAS IMAGE CONVERTER 0.1.12
 * Selection + context menu.
 */

.tic-workspace,
.tic-workspace * {
    -webkit-touch-callout: none !important;
}

.tic-card.is-selected .tic-sheet {
    outline:
        2px solid
        #d8aa45 !important;

    outline-offset: 2px;
}

.tic-context-menu {
    position: fixed;
    z-index: 2147483000;

    min-width: 180px;

    padding: 6px;

    border:
        1px solid
        #3d434d;

    border-radius: 8px;

    background: #1b1e23;

    box-shadow:
        0 10px 30px
        rgba(0,0,0,.42);

    user-select: none;
    -webkit-user-select: none;

    touch-action: manipulation;
}

.tic-context-item {
    display: block;

    width: 100%;

    padding: 10px 12px;

    border: 0;
    border-radius: 5px;

    background: transparent;

    color: #f2f2f2;

    font: inherit;
    font-size: 13px;

    line-height: 1.25;

    text-align: left;

    cursor: pointer;
}

.tic-context-item:hover,
.tic-context-item:focus-visible {
    background: #2a2f37;
}

.tic-context-item + .tic-context-item {
    margin-top: 2px;
}

/*
 * Quarter-turn preview.
 * The sheet geometry remains unchanged for now;
 * conversion later consumes item.rotation as source state.
 */
.tic-preview.is-quarter-turned {
    object-fit: contain !important;
}

/*
 * TUCAS_IMAGE_CONVERTER_IMPORT_PROGRESS_CSS_0116
 */

.tic-import-progress-layer {
    position: absolute;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .42);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.tic-import-progress-layer[hidden] {
    display: none !important;
}

.tic-import-progress-card {
    width: min(420px, calc(100vw - 32px));
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    grid-template-areas:
        "spinner copy percent"
        "track track track";
    gap: 12px 14px;
    align-items: center;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 14px;
    background: #171717;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .35);
}

.tic-import-progress-spinner {
    grid-area: spinner;
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, .22);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: tic-import-progress-spin .8s linear infinite;
}

.tic-import-progress-copy {
    grid-area: copy;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tic-import-progress-title {
    font-size: 14px;
    line-height: 1.25;
    font-weight: 700;
}

.tic-import-progress-detail {
    overflow: hidden;
    font-size: 12px;
    line-height: 1.35;
    opacity: .72;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tic-import-progress-track {
    grid-area: track;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
}

.tic-import-progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: currentColor;
    transition: width .16s ease;
}

.tic-import-progress-percent {
    grid-area: percent;
    min-width: 36px;
    font-size: 12px;
    line-height: 1;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.tic-import-progress-layer.is-indeterminate
.tic-import-progress-bar {
    animation:
        tic-import-progress-indeterminate
        1.15s ease-in-out infinite;
}

@keyframes tic-import-progress-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes tic-import-progress-indeterminate {
    0% {
        transform: translateX(-130%);
    }

    50% {
        transform: translateX(85%);
    }

    100% {
        transform: translateX(260%);
    }
}

@media (max-width: 640px) {
    .tic-import-progress-layer {
        padding: 14px;
    }

    .tic-import-progress-card {
        width: 100%;
        padding: 15px;
        gap: 10px 12px;
    }
}

/*
 * ==========================================================
 * TUCAS_IMAGE_CONVERTER_UI_0118
 * PPM-style import progress + stronger group toggle
 * ==========================================================
 */

/*
 * ----------------------------------------------------------
 * GROUP + / -
 * ----------------------------------------------------------
 */

.tic-group-toggle {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 0 !important;

    border:
        1px solid
        rgba(255,255,255,.30) !important;

    border-radius: 999px !important;

    background:
        rgba(15,17,20,.88) !important;

    color: #fff !important;

    box-shadow:
        0 3px 12px rgba(0,0,0,.34),
        inset 0 0 0 1px rgba(255,255,255,.035) !important;

    font-size: 20px !important;
    line-height: 1 !important;
    font-weight: 500 !important;

    cursor: pointer !important;

    -webkit-backdrop-filter:
        blur(5px);

    backdrop-filter:
        blur(5px);

    transition:
        transform .14s ease,
        border-color .14s ease,
        background .14s ease,
        box-shadow .14s ease !important;
}

.tic-group-toggle:hover {
    border-color:
        rgba(255,255,255,.62) !important;

    background:
        rgba(26,29,34,.96) !important;

    box-shadow:
        0 4px 15px rgba(0,0,0,.42),
        inset 0 0 0 1px rgba(255,255,255,.06) !important;

    transform:
        scale(1.06);
}

.tic-group-toggle:active {
    transform:
        scale(.95);
}

.tic-group-toggle:focus-visible {
    outline: none !important;

    border-color:
        rgba(255,255,255,.78) !important;
}


/*
 * ----------------------------------------------------------
 * IMPORT PROGRESS OVERLAY
 *
 * Visual language follows the PPM progress:
 * white floating card, blue spinner, subtle track,
 * title/detail at left, percent at right.
 * ----------------------------------------------------------
 */

.tic-import-progress-layer {
    position: absolute !important;
    inset: 0 !important;
    z-index: 80 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 24px !important;

    /*
     * PPM-style dark workspace veil.
     */
    background:
        rgba(8,17,32,.68) !important;

    -webkit-backdrop-filter:
        blur(1.5px);

    backdrop-filter:
        blur(1.5px);
}

.tic-import-progress-layer[hidden] {
    display: none !important;
}

.tic-import-progress-card {
    width:
        min(
            520px,
            calc(100vw - 40px)
        ) !important;

    min-height: 104px !important;

    display: grid !important;

    grid-template-columns:
        38px minmax(0,1fr) 44px !important;

    grid-template-areas:
        "spinner copy percent"
        "track track track" !important;

    column-gap: 16px !important;
    row-gap: 14px !important;

    align-items: center !important;

    padding:
        19px 21px 18px !important;

    border:
        1px solid
        rgba(15,23,42,.14) !important;

    border-radius:
        17px !important;

    background:
        rgba(255,255,255,.985) !important;

    color:
        #0f172a !important;

    box-shadow:
        0 18px 55px
        rgba(2,8,23,.26) !important;
}


/*
 * Spinner
 */

.tic-import-progress-spinner {
    grid-area: spinner !important;

    width: 34px !important;
    height: 34px !important;

    box-sizing:
        border-box !important;

    border:
        4px solid
        #e5edf9 !important;

    border-top-color:
        #6d92ff !important;

    border-right-color:
        #b9ccff !important;

    border-radius:
        999px !important;

    animation:
        tic-import-progress-spin
        .82s linear infinite !important;
}


/*
 * Copy
 */

.tic-import-progress-copy {
    grid-area: copy !important;

    min-width: 0 !important;

    display: flex !important;
    flex-direction: column !important;

    gap: 4px !important;
}

.tic-import-progress-title {
    margin: 0 !important;

    color:
        #0f172a !important;

    font-size:
        15px !important;

    line-height:
        1.2 !important;

    font-weight:
        700 !important;

    letter-spacing:
        -.01em !important;
}

.tic-import-progress-detail {
    display: block !important;

    overflow: hidden !important;

    color:
        #64748b !important;

    font-size:
        12px !important;

    line-height:
        1.35 !important;

    font-weight:
        400 !important;

    white-space:
        nowrap !important;

    text-overflow:
        ellipsis !important;
}


/*
 * Percent
 */

.tic-import-progress-percent {
    grid-area: percent !important;

    min-width: 42px !important;

    color:
        #0f172a !important;

    font-size:
        12px !important;

    line-height:
        1 !important;

    font-weight:
        700 !important;

    text-align:
        right !important;

    font-variant-numeric:
        tabular-nums !important;
}


/*
 * Progress track
 */

.tic-import-progress-track {
    grid-area: track !important;

    position: relative !important;

    width: 100% !important;
    height: 6px !important;

    overflow: hidden !important;

    border-radius:
        999px !important;

    background:
        #e7edf6 !important;
}

.tic-import-progress-bar {
    width: 0;
    height: 100% !important;

    border-radius:
        999px !important;

    background:
        #5f86ff !important;

    box-shadow:
        0 0 0 1px
        rgba(70,107,255,.04) !important;

    transition:
        width .18s ease !important;
}


/*
 * Indeterminate
 */

.tic-import-progress-layer.is-indeterminate
.tic-import-progress-bar {
    width: 32% !important;

    animation:
        tic-import-progress-indeterminate
        1.1s ease-in-out infinite !important;
}


/*
 * ----------------------------------------------------------
 * MOBILE
 * ----------------------------------------------------------
 */

@media (max-width: 640px) {

    .tic-group-toggle {
        width: 28px !important;
        height: 28px !important;

        min-width: 28px !important;
        min-height: 28px !important;

        font-size: 19px !important;
    }

    .tic-import-progress-layer {
        padding:
            16px !important;
    }

    .tic-import-progress-card {
        width:
            min(
                520px,
                calc(100vw - 32px)
            ) !important;

        min-height:
            100px !important;

        grid-template-columns:
            36px minmax(0,1fr) 40px !important;

        column-gap:
            13px !important;

        row-gap:
            13px !important;

        padding:
            17px 18px !important;

        border-radius:
            16px !important;
    }

    .tic-import-progress-spinner {
        width: 32px !important;
        height: 32px !important;
    }

    .tic-import-progress-title {
        font-size:
            14px !important;
    }

    .tic-import-progress-detail {
        font-size:
            11px !important;
    }
}

/*
 * TUCAS_IMAGE_CONVERTER_ERROR_UI_0123
 */

.tic-config-error {
    display: flex;

    gap: 12px;

    align-items: center;
}

.tic-config-error[hidden] {
    display: none;
}

.tic-config-error-message {
    min-width: 0;
    flex: 1 1 auto;

    overflow-wrap: anywhere;
}

.tic-config-error-close {
    display: inline-flex;

    width: 24px;
    height: 24px;

    flex: 0 0 24px;

    padding: 0;

    border: 0;
    border-radius: 4px;

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

    background: transparent;
    color: currentColor;

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

    cursor: pointer;

    opacity: .82;
}

.tic-config-error-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, .08);
}

.tic-config-error-close:active {
    transform: translateY(1px);
}

.tic-config-error-close:focus,
.tic-config-error-close:focus-visible {
    outline: none;
}


/* TUCAS_CONTEXT_AND_GROUP_UI_0129 */
.tic .tic-group-toggle {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    background: #111827 !important;
    color: #fff !important;
    border: 2px solid #fff !important;
    border-radius: 9px !important;
    box-shadow:
        0 0 0 2px rgba(0,0,0,.75),
        0 4px 14px rgba(0,0,0,.55) !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    opacity: 1 !important;
    z-index: 5 !important;
    cursor: pointer !important;
}

.tic .tic-group-toggle:hover {
    background: #283548 !important;
    border-color: #f4c15b !important;
    color: #f4c15b !important;
}

.tic .tic-group-toggle[aria-expanded="true"] {
    background: #243047 !important;
}

@media (max-width: 640px) {
    .tic .tic-group-toggle {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        font-size: 22px !important;
    }
}


/*
 * TUCAS_BUTTON_ALIGNMENT_0130
 * Optical centering for ×, + and −.
 */

.tic .tic-remove,
.tic .tic-group-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    text-align: center !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
}

/* Correct glyph baseline inside the fixed button boxes. */
.tic .tic-remove {
    font-family: Arial, sans-serif !important;
    font-size: 19px !important;
    font-weight: 500 !important;
    text-indent: 0 !important;
    padding-bottom: 2px !important;
}

.tic .tic-group-toggle {
    font-family: Arial, sans-serif !important;
    font-size: 23px !important;
    font-weight: 600 !important;
    text-indent: 0 !important;
    padding-bottom: 3px !important;
}

@media (max-width: 640px) {
    .tic .tic-group-toggle {
        font-size: 22px !important;
    }
}


/* TUCAS_VECTOR_BUTTON_ALIGNMENT_0131 */
.tic .tic-remove,
.tic .tic-group-toggle {
    display: grid !important;
    place-items: center !important;
    padding: 0 !important;
    text-indent: 0 !important;
    line-height: 0 !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: 18px 18px !important;
}

.tic .tic-icon-delete {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6L18 18M18 6L6 18' stroke='white' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") !important;
}

.tic .tic-icon-expand {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12H19M12 5V19' stroke='white' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") !important;
}

.tic .tic-icon-collapse {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12H19' stroke='white' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") !important;
}


/*
 * TUCAS_VECTOR_PSEUDO_ICONS_0132
 * SVG icons independent of background and hover.
 */

.tic .tic-remove.tic-icon-delete,
.tic .tic-group-toggle.tic-icon-expand,
.tic .tic-group-toggle.tic-icon-collapse {
    background-image: none !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
}

.tic .tic-icon-delete::before,
.tic .tic-icon-expand::before,
.tic .tic-icon-collapse::before {
    content: "" !important;
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    flex: none !important;
    background-color: #fff !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
}

.tic .tic-icon-delete::before {
    clip-path: polygon(
        17% 9%, 50% 42%, 83% 9%,
        91% 17%, 58% 50%, 91% 83%,
        83% 91%, 50% 58%, 17% 91%,
        9% 83%, 42% 50%, 9% 17%
    ) !important;
}

.tic .tic-icon-expand::before {
    clip-path: polygon(
        42% 8%, 58% 8%,
        58% 42%, 92% 42%,
        92% 58%, 58% 58%,
        58% 92%, 42% 92%,
        42% 58%, 8% 58%,
        8% 42%, 42% 42%
    ) !important;
}

.tic .tic-icon-collapse::before {
    clip-path: polygon(
        8% 42%, 92% 42%,
        92% 58%, 8% 58%
    ) !important;
}

.tic .tic-group-toggle:hover::before,
.tic .tic-group-toggle:focus-visible::before {
    background-color: #f4c15b !important;
}


/* TUCAS_CONVERT_MODAL_0136 */
.tic-convert-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0,0,0,.72);
}

.tic-convert-dialog {
    width: min(600px,100%);
    max-height: min(760px,90dvh);
    overflow-y: auto;
    padding: 22px;
    border: 1px solid #424955;
    border-radius: 14px;
    background: #1b1e23;
    color: #f3f4f6;
    font: 13px/1.5 system-ui,sans-serif;
    box-shadow: 0 20px 65px rgba(0,0,0,.5);
}

.tic-convert-dialog * {
    box-sizing: border-box;
}

.tic-convert-header,
.tic-convert-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tic-convert-header h2 {
    margin: 0;
    font-size: 18px;
    color: #fff;
}

.tic-convert-close,
.tic-convert-cancel,
.tic-convert-confirm,
.tic-convert-format {
    appearance: none;
    font: inherit;
    cursor: pointer;
}

.tic-convert-close {
    width: 32px;
    height: 32px;
    border: 1px solid #555e69;
    border-radius: 8px;
    background: #292e36;
    color: #fff;
    font-size: 22px;
}

.tic-convert-note {
    margin: 12px 0;
    color: #b5bdc9;
}

.tic-convert-formats {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(100px,1fr));
    gap: 10px;
    margin: 16px 0;
}

.tic-convert-format {
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #505967;
    border-radius: 9px;
    background: #292e36;
    color: #f4f5f7;
    font-weight: 600;
}

.tic-convert-format.is-selected {
    border-color: #e6b64e;
    color: #f1c66a;
    background: #353026;
}

.tic-convert-format:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.tic-convert-settings {
    min-height: 70px;
    padding: 10px 0;
    border-top: 1px solid #3b414b;
}

.tic-convert-section-title {
    margin: 8px 0 12px;
    font-size: 14px;
    color: #fff;
}

.tic-convert-setting,
.tic-convert-checkbox {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 14px 0;
}

.tic-convert-setting {
    flex-wrap: wrap;
}

.tic-convert-setting input[type="range"] {
    width: 100%;
    accent-color: #e6b64e;
}

.tic-convert-value {
    margin-left: auto;
}

.tic-convert-footer {
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid #3b414b;
}

.tic-convert-cancel,
.tic-convert-confirm {
    min-height: 38px;
    padding: 8px 16px;
    border: 1px solid #606977;
    border-radius: 8px;
    background: #303640;
    color: #fff;
}

.tic-convert-confirm {
    border-color: #c49a44;
    background: #9b772e;
}

.tic-convert-confirm:disabled {
    opacity: .45;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .tic-convert-dialog {
        padding: 15px;
    }

    .tic-convert-formats {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }
}

/* TUCAS_COMPACT_FORMATS_0137 */

.tic-convert-formats {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-content: flex-start;
    gap: 6px;
    margin: 12px 0;
}

.tic-convert-format {
    flex: 0 0 72px;
    width: 72px;
    min-width: 0;
    min-height: 34px;
    height: 34px;
    padding: 5px 6px;
    border-radius: 7px;
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
}

@media (max-width: 480px) {
    .tic-convert-formats {
        display: flex;
        grid-template-columns: none;
        gap: 6px;
    }

    .tic-convert-format {
        flex-basis: 72px;
        width: 72px;
    }
}

/* TUCAS_RESPONSIVE_MODAL_0138 */

.tic-convert-dialog {
    width: min(480px, calc(100vw - 20px));
    max-width: 100%;
}

.tic-convert-formats {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(66px, 1fr)
    );
    gap: 6px;
}

.tic-convert-format {
    width: 100%;
    min-width: 0;
    height: 34px;
    min-height: 34px;
    padding: 5px 4px;
    font-size: 11px;
}

@media (max-width: 480px) {
    .tic-convert-overlay {
        padding: 10px;
    }

    .tic-convert-dialog {
        width: 100%;
        padding: 15px;
    }

    .tic-convert-formats {
        display: grid;
        grid-template-columns: repeat(
            auto-fit,
            minmax(62px, 1fr)
        );
        gap: 6px;
    }
}

/* TUCAS_CANCEL_ONLY_0139 */
.tic-convert-close {
    display: none !important;
}

/* TUCAS_ENCODER_OPTIONS_UI_0145 */
.tic-convert-setting { display:block; margin:10px 0; }
.tic-convert-option-name { display:block; margin-bottom:6px; font-size:12px; font-weight:600; }
.tic-convert-option-input { display:block; width:100%; box-sizing:border-box; min-height:36px; padding:8px 10px; border:1px solid #596272; border-radius:6px; background:#252b33; color:#f5f5f5; font:inherit; }
.tic-convert-option-input:invalid { border-color:#dc7777; }

/* TUCAS_FRIENDLY_OPTIONS_0146 */
.tic-convert-slider-row { display:flex; align-items:center; gap:12px; }
.tic-convert-slider { flex:1; min-width:0; accent-color:#c69832; cursor:pointer; }
.tic-convert-slider-value { min-width:56px; text-align:right; font-size:12px; font-variant-numeric:tabular-nums; }
.tic-convert-toggle { display:inline-flex; gap:9px; align-items:center; font-size:12px; cursor:pointer; }
.tic-convert-checkbox { width:17px; height:17px; accent-color:#c69832; cursor:pointer; }
.tic-convert-option-help { margin:4px 0 0; font-size:11px; color:#aeb7c4; }


/* TUCAS_UI_COLORS_0147 */

/* Blue conversion sliders */
.tic-convert-modal input[type="range"] {
    accent-color: #3b82f6 !important;
}

.tic-convert-modal input[type="range"]::-webkit-slider-thumb {
    background: #3b82f6 !important;
}

.tic-convert-modal input[type="range"]::-moz-range-thumb {
    background: #3b82f6 !important;
}

/* Convert button matches selected format */
.tic-convert-modal button[data-tucas-convert-confirm]:not(:disabled) {
    background: #302a1d !important;
    border: 1px solid #d6a43c !important;
    color: #f4c45c !important;
}

.tic-convert-modal button[data-tucas-convert-confirm]:disabled {
    background: #343a43 !important;
    border: 1px solid #596272 !important;
    color: #9ca3af !important;
}


/* TUCAS_UI_COLORS_0148 */

/* Blue sliders: track and thumb */
.tic-convert-dialog input.tic-convert-slider[type="range"] {
    accent-color: #3b82f6 !important;
    cursor: pointer;
}

.tic-convert-dialog input.tic-convert-slider[type="range"]::-webkit-slider-thumb {
    accent-color: #3b82f6 !important;
}

.tic-convert-dialog input.tic-convert-slider[type="range"]::-moz-range-thumb {
    background-color: #3b82f6 !important;
}

/* Enabled Convert matches selected WEBP format */
.tic-convert-dialog .tic-convert-confirm:not(:disabled) {
    background: #353026 !important;
    border: 1px solid #e6b64e !important;
    color: #f1c66a !important;
    opacity: 1 !important;
}

/* Disabled Convert remains neutral */
.tic-convert-dialog .tic-convert-confirm:disabled {
    background: #303640 !important;
    border: 1px solid #606977 !important;
    color: #aeb7c4 !important;
    opacity: .45 !important;
}

/* TUCAS 0.1.54: contract-only options; no codec presets. */

/* 0.1.55 contract option editor */
.tic-convert-option-input {flex:1;min-width:180px;max-width:100%;background:#242a32;color:#fff;border:1px solid #606977;border-radius:6px;padding:9px 10px;}
.tic-convert-option-input:invalid {border-color:#dc6565;}

/* 0.1.56: JPEG white matte, no UI changes. */

/* TUCAS_MANIFEST_CONTROLS_0157 */
.tic-convert-setting[hidden] {display:none !important;}
.tic-convert-option-checkbox {width:18px;height:18px;accent-color:#d6a845;}
.tic-convert-option-value {font-variant-numeric:tabular-nums;margin-left:8px;}

/* TUCAS 0.1.58 routing regression fix; styles unchanged. */

/* TUCAS 0.1.59: restore full-resolution conversion helpers; CSS unchanged. */

/* TUCAS_MANIFEST_OPTION_UI_0162 — compact, responsive codec-driven controls */
.tic-convert-settings { min-height:0; padding:12px 0 6px; }
.tic-convert-option-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 14px; align-items:start; }
.tic-convert-option-card { display:flex; flex-direction:column; align-items:stretch; gap:7px; margin:0; min-width:0; position:relative; }
.tic-convert-option-card[hidden] { display:none !important; }
.tic-convert-option-name { display:block; font-size:12px; font-weight:600; color:#e2e5ec; }
.tic-convert-range-wrap { display:flex; align-items:center; gap:10px; min-height:34px; }
.tic-convert-option-range { flex:1; min-width:0; width:100%; accent-color:#e6b64e; cursor:pointer; }
.tic-convert-range-value { min-width:35px; text-align:right; font-size:12px; color:#f2cb77; font-variant-numeric:tabular-nums; }
.tic-convert-option-card .tic-convert-option-input { width:100%; min-width:0; box-sizing:border-box; background:#272e38; border:1px solid #535e6e; border-radius:7px; color:#f5f6f8; padding:9px 11px; font:inherit; }
.tic-convert-dropdown { position:relative; width:100%; min-width:0; }
.tic-convert-dropdown-trigger { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; min-height:36px; padding:8px 11px; border:1px solid #535e6e; border-radius:7px; background:#272e38; color:#f4f5f8; text-align:left; font:inherit; cursor:pointer; }
.tic-convert-dropdown-trigger[aria-expanded="true"] { border-color:#e6b64e; }
.tic-convert-dropdown-chevron { color:#e6b64e; }
.tic-convert-dropdown-menu { position:absolute; z-index:40; left:0; right:0; top:calc(100% + 4px); max-height:190px; overflow-y:auto; padding:5px; border:1px solid #535e6e; border-radius:8px; background:#252b34; box-shadow:0 10px 24px #0008; }
.tic-convert-dropdown-menu[hidden] { display:none !important; }
.tic-convert-dropdown-option { display:block; width:100%; padding:9px 10px; border:0; border-radius:5px; background:transparent; color:#eef0f5; text-align:left; font:inherit; cursor:pointer; }
.tic-convert-dropdown-option:hover, .tic-convert-dropdown-option[aria-selected="true"] { background:#3d3628; color:#f1c66a; }
.tic-convert-switch { display:inline-flex; align-items:center; width:max-content; cursor:pointer; }
.tic-convert-switch input { position:absolute; opacity:0; width:1px; height:1px; }
.tic-convert-switch-track { display:block; position:relative; width:38px; height:22px; border-radius:20px; background:#4b5564; transition:background .15s; }
.tic-convert-switch-track:after { content:""; position:absolute; left:3px; top:3px; width:16px; height:16px; border-radius:50%; background:#f5f6f8; transition:transform .15s; }
.tic-convert-switch input:checked + .tic-convert-switch-track { background:#b38a34; }
.tic-convert-switch input:checked + .tic-convert-switch-track:after { transform:translateX(16px); }
.tic-convert-switch input:focus-visible + .tic-convert-switch-track { outline:2px solid #f1c66a; outline-offset:3px; }
.tic-convert-settings .tic-convert-note { margin:13px 0 3px; font-size:12px; line-height:1.5; }
@media(max-width:520px) { .tic-convert-option-grid { grid-template-columns:minmax(0,1fr); gap:12px; } }

/* TUCAS_OPTION_DROPDOWN_PORTAL_0163 — menu outside scrollable dialog */
.tic-convert-overlay > .tic-convert-dropdown-menu[data-tucas-portal="1"] {
    z-index: 2147483640;
    margin: 0;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.tic-convert-overlay > .tic-convert-dropdown-menu[data-tucas-portal="1"]:not([hidden]) {
    display: block;
}

/* TUCAS_DROPDOWN_COMPACT_0164 — same typography as dialog, no scroll for short lists */
.tic-convert-overlay > .tic-convert-dropdown-menu[data-tucas-portal="1"] {
    padding: 4px;
    font-size: 12px;
    line-height: 1.3;
    scrollbar-width: thin;
    scrollbar-color: #657080 transparent;
}
.tic-convert-overlay > .tic-convert-dropdown-menu[data-tucas-portal="1"] .tic-convert-dropdown-option {
    height: 32px;
    min-height: 32px;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 20px;
    font-weight: 400;
    box-sizing: border-box;
}
.tic-convert-dropdown-trigger { font-size: 12px; }

/* TUCAS_BATCH_EXPORT_PROGRESS_0165 */
.tic-convert-export-progress {padding: 10px 0 6px; font-size: 12px;}
.tic-convert-export-progress[hidden] {display:none !important;}
.tic-convert-export-detail {margin-bottom: 7px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.tic-convert-export-track {height:6px; background:#343b47; border-radius:6px; overflow:hidden;}
.tic-convert-export-fill {width:0; height:100%; background:#efb94b; transition:width .12s linear;}
.tic-convert-export-percent {margin-top:5px; font-size:11px; color:#b9c1ce;}

/* Tucas 0.1.66 — original page export routing */

/* TUCAS_ACCESS_EXPORT_GATE_0167 */
.tic-convert-access-badge:not([hidden]) {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 12px;margin:12px 0 2px;border:1px solid #826629;border-radius:8px;background:#2b271d;color:#f2db9e;font-size:12px;line-height:1.5;}
.tic-convert-access-action {flex:none;padding:7px 12px;border:1px solid #d7a83c;border-radius:6px;background:#3b3120;color:#f5c65a;font:inherit;font-size:12px;cursor:pointer;}
.tic-convert-access-action:hover {background:#514027;}
@media(max-width:540px){.tic-convert-access-badge:not([hidden]){align-items:stretch;flex-direction:column}.tic-convert-access-action{align-self:flex-start}}

/* TUCAS_ACCESS_MODAL_0168 — isolated handoff modal; preserve Convert state. */
.tic-access-overlay{position:fixed;inset:0;z-index:2147483600;display:grid;place-items:center;padding:16px;background:rgba(8,11,16,.82);backdrop-filter:blur(5px)}
.tic-access-card{position:relative;display:flex;flex-direction:column;align-items:center;gap:16px;width:min(560px,100%);padding:30px 26px 26px;border:1px solid #3b4350;border-radius:18px;background:#171b22;color:#eef2f7;text-align:center;box-shadow:0 24px 80px #000c;box-sizing:border-box}
.tic-access-card h2{margin:0;color:#f7f9fc;font-size:23px;font-weight:500;line-height:1.25}
.tic-access-icon{display:grid;place-items:center;width:58px;height:58px;border:1px solid #f5cc4b;border-radius:50%;background:#f5cc4b12;color:#f5cc4b;font-size:28px}
.tic-access-detail{max-width:400px;margin:0;color:#aab4c2;font-size:14px;line-height:1.55}
.tic-access-x{position:absolute;top:14px;right:14px;width:38px;height:38px;border:1px solid #687282;border-radius:10px;background:#222832;color:#f5cc4b;font-size:27px;cursor:pointer}
.tic-access-actions{display:flex;justify-content:center;gap:12px}
.tic-access-secondary,.tic-access-primary{min-height:42px;padding:0 17px;border-radius:10px;font-size:13px;font-weight:700;cursor:pointer}
.tic-access-secondary{border:1px solid #46505e;background:#232933;color:#d8dee8}
.tic-access-primary{border:1px solid #f5cc4b;background:#f5cc4b;color:#171b22}
.tic-convert-overlay[hidden]{display:none!important}
