    .tool-hero {
        padding: 44px 0 8px;
    }

    .crumb {
        font-size: 13px;
        color: var(--muted);
        margin: 0 0 14px;
    }

    .crumb a {
        text-decoration: none;
        color: var(--muted);
    }

    .crumb a:hover {
        color: var(--ink);
    }

    .tool-sub {
        font-size: 16px;
        color: var(--muted);
        max-width: 60ch;
        margin: 0;
    }

    main {
        padding-bottom: 60px;
    }

    /* Upload dropzone */
    .dropzone {
        margin-top: 28px;
        border: 1.5px dashed var(--line);
        border-radius: 14px;
        background: var(--paper-raise);
        padding: 40px 24px;
        text-align: center;
        cursor: pointer;
        transition: border-color .15s ease, background .15s ease;
    }

    .dropzone.drag {
        border-color: var(--teal);
        background: var(--tag-bg);
    }

    .dropzone .dz-icon {
        font-size: 30px;
        margin-bottom: 10px;
    }

    .dropzone h3 {
        margin: 0 0 6px;
        font-size: 17px;
    }

    .dropzone p {
        margin: 0;
        color: var(--muted);
        font-size: 14px;
    }

    .dropzone input[type="file"] {
        display: none;
    }

    /* Status line while pages are being rendered */
    .status-line {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-top: 16px;
        font-size: 14px;
        color: var(--muted);
        min-height: 20px;
    }

    .spinner {
        width: 14px;
        height: 14px;
        border-radius: 50%;
        border: 2px solid var(--line);
        border-top-color: var(--teal);
        animation: spin .7s linear infinite;
        display: none;
    }

    .spinner.on {
        display: inline-block;
    }

    @keyframes spin {
        to {
            transform: rotate(360deg);
        }
    }

    /* Toolbar above the page grid */
    .pages-toolbar {
        display: none;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        flex-wrap: wrap;
        margin-top: 30px;
    }

    .pages-toolbar.on {
        display: flex;
    }

    .pages-toolbar h2 {
        font-size: 19px;
        margin: 0;
    }

    .pages-toolbar .hint {
        font-size: 13px;
        color: var(--muted);
        margin: 2px 0 0;
    }

    .toolbar-actions {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }

    /* Sortable page grid */
    .page-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 14px;
        margin-top: 18px;
        padding: 0;
        list-style: none;
    }

    .page-card {
        background: var(--paper-raise);
        border: 1px solid var(--line);
        border-radius: 10px;
        padding: 10px;
        cursor: grab;
        position: relative;
        user-select: none;
    }

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

    .page-card img {
        width: 100%;
        display: block;
        border-radius: 5px;
        border: 1px solid var(--line);
        background: #fff;
    }

    .page-card .pg-num {
        position: absolute;
        top: 16px;
        left: 16px;
        background: var(--ink);
        color: var(--paper);
        font-size: 11px;
        font-weight: 700;
        padding: 2px 7px;
        border-radius: 6px;
        font-family: 'IBM Plex Mono', monospace;
    }

    .page-card .pg-remove {
        position: absolute;
        top: 14px;
        right: 14px;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        background: rgba(20, 24, 31, .72);
        color: #fff;
        border: none;
        font-size: 13px;
        line-height: 22px;
        text-align: center;
        cursor: pointer;
        padding: 0;
    }

    .page-card .pg-file {
        margin: 8px 2px 0;
        font-size: 11.5px;
        color: var(--muted);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .page-card.ui-sortable-placeholder {
        visibility: visible !important;
        background: var(--tag-bg);
        border: 1.5px dashed var(--line);
    }

    .page-card.ui-sortable-helper {
        box-shadow: 0 10px 24px rgba(20, 24, 31, .18);
    }

    /* "Add more PDFs" card at the end of the grid */
    .add-more-card {
        border: 1.5px dashed var(--line);
        border-radius: 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 150px;
        cursor: pointer;
        color: var(--muted);
        background: transparent;
        font-family: inherit;
        font-size: 13px;
        font-weight: 700;
    }

    .add-more-card:hover {
        border-color: var(--teal);
        color: var(--teal-deep);
    }

    .add-more-card .plus {
        font-size: 22px;
        line-height: 1;
    }

    .add-more-card input[type="file"] {
        display: none;
    }

    /* Result / download box shown after export */
    .result-box {
        display: none;
        margin-top: 30px;
        background: var(--teal-deep);
        color: #F4F2EA;
        border-radius: 16px;
        padding: 28px 30px;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 16px;
    }

    .result-box.on {
        display: flex;
    }

    .result-box h3 {
        margin: 0 0 4px;
        color: #fff;
        font-size: 18px;
    }

    .result-box p {
        margin: 0;
        color: #D9E4DF;
        font-size: 14px;
    }

    .empty-note {
        margin-top: 10px;
        font-size: 13px;
        color: var(--muted);
    }

    /* Responsive tweaks for the new elements */
    @media (max-width:640px) {
        .page-grid {
            grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        }

        .result-box {
            flex-direction: column;
            align-items: flex-start;
        }
    }