/* Compact work rows for both Drafts and Published on the Writing Desk. */
body main.writing-desk :is(#dashboard-draft-list, #dashboard-work-list) {
    display: grid;
    gap: 12px;
}
body main.writing-desk .dashboard-find {
    max-width: 360px;
    margin: 4px 0 22px;
}
body main.writing-desk .dashboard-find label {
    display: block;
    margin-bottom: 6px;
    font-size: .85rem;
}
body main.writing-desk .dashboard-find input {
    box-sizing: border-box;
    width: 100%;
    padding: 9px 11px;
}
body main.writing-desk .dashboard-list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 12px;
}
body main.writing-desk .dashboard-list-heading h2 { margin: 0; }
body main.writing-desk .dashboard-list-heading label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    font-size: .82rem;
}
body main.writing-desk .dashboard-list-heading select {
    max-width: 170px;
    padding: 6px 8px;
    font: inherit;
}
body main.writing-desk .dashboard-published { margin-top: 28px; }
body main.writing-desk .dashboard-work[hidden],
body main.writing-desk .dashboard-empty[hidden] { display: none !important; }
body main.writing-desk .dashboard-work {
    margin: 0 !important;
    padding: 16px 18px !important;
    border-radius: 11px !important;
    border-left: 3px solid color-mix(in srgb, var(--gm-accent, currentColor) 58%, transparent) !important;
    background-image: linear-gradient(110deg, color-mix(in srgb, var(--gm-accent, currentColor) 5%, transparent), transparent 55%) !important;
}
body main.writing-desk .dashboard-work-row {
    display: grid !important;
    grid-template-columns: 76px minmax(0, 1fr) !important;
    grid-template-areas: "jacket info" "jacket controls" !important;
    align-items: start !important;
    gap: 7px 17px !important;
}
body main.writing-desk .dashboard-work-row:not(:has(> .gm-work-jacket-media)) {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas: "info" "controls" !important;
}
body main.writing-desk .dashboard-work-row > .gm-work-jacket-media {
    grid-area: jacket;
    width: 76px !important;
    margin: 0 !important;
    align-self: start !important;
}
body main.writing-desk .dashboard-work-info {
    grid-area: info;
    display: block !important;
    min-width: 0 !important;
    width: auto !important;
}
body main.writing-desk .dashboard-work-info h3 {
    min-width: 0 !important;
    width: auto !important;
    margin: 0 !important;
    font-size: clamp(1.15rem, 2vw, 1.35rem) !important;
    line-height: 1.24;
}
body main.writing-desk .dashboard-series-label,
body main.writing-desk .dashboard-work-meta {
    display: block;
    margin: 5px 0 0;
    font-size: .82rem;
    line-height: 1.35;
    opacity: .82;
}
body main.writing-desk .dashboard-work-meta {
    display: flex !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 9px;
    opacity: 1;
}
body main.writing-desk .dashboard-work-state {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid color-mix(in srgb, var(--gm-accent, currentColor) 52%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--gm-accent, currentColor) 13%, transparent);
    font: 600 .7rem/1.25 var(--font-ui, sans-serif);
    letter-spacing: .02em;
}
body main.writing-desk .dashboard-work-stats { opacity: .8; }
body main.writing-desk .dashboard-work-controls {
    grid-area: controls;
    display: block !important;
    min-width: 0 !important;
    width: auto !important;
}
body main.writing-desk .dashboard-work-controls .work-actions {
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    gap: 7px !important;
    margin: 4px 0 0 !important;
}
body main.writing-desk .dashboard-work-controls .work-actions > :is(a, button) {
    border-radius: 7px !important;
    min-height: 34px !important;
    padding: 7px 10px !important;
    font-size: .78rem !important;
}
body main.writing-desk .dashboard-work-controls .move-work-to-drafts-button {
    background: transparent !important;
    border-color: color-mix(in srgb, currentColor 55%, transparent) !important;
    color: inherit !important;
}
body main.writing-desk .dashboard-work-controls .crosspost-work-link,
body main.writing-desk .dashboard-work-controls .delete-work-button {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    text-decoration: none !important;
}
body main.writing-desk .dashboard-work-controls .crosspost-work-link {
    color: inherit !important;
    opacity: .76;
}
body main.writing-desk .dashboard-work-controls .delete-work-button { opacity: .82; }
body main.writing-desk .dashboard-work-controls :is(.crosspost-work-link, .delete-work-button):hover {
    opacity: 1;
    text-decoration: underline !important;
    text-underline-offset: 3px;
}
@media (max-width: 640px) {
    body main.writing-desk .dashboard-list-heading { align-items: flex-start; }
    body main.writing-desk .dashboard-list-heading label { font-size: 0; }
    body main.writing-desk .dashboard-list-heading select { font-size: .8rem; max-width: 145px; }
    body main.writing-desk .dashboard-work { padding: 14px !important; }
    body main.writing-desk .dashboard-work-row {
        grid-template-columns: 64px minmax(0, 1fr) !important;
        grid-template-areas: "jacket info" "controls controls" !important;
        gap: 9px 12px !important;
    }
    body main.writing-desk .dashboard-work-row > .gm-work-jacket-media { width: 64px !important; }
    body main.writing-desk .dashboard-work-info h3 { font-size: 1.15rem !important; }
    body main.writing-desk .dashboard-work-controls .work-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 0 !important;
    }
    body main.writing-desk .dashboard-work-controls .work-actions > :is(a, button) {
        width: 100% !important;
        min-width: 0 !important;
        white-space: normal;
    }
}

body main.writing-desk .dashboard-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 14px 0 0;
    font: .85rem/1.4 var(--font-ui, sans-serif);
}
body main.writing-desk .dashboard-pagination[hidden] { display: none !important; }
body main.writing-desk .dashboard-pagination button {
    min-width: 44px;
    min-height: 44px;
    padding: 6px 12px;
    font: inherit;
}
body main.writing-desk .dashboard-pagination button:disabled { opacity: .4; cursor: default; }
body main.writing-desk :is(.dashboard-drafts, .dashboard-published) { scroll-margin-top: 100px; }
