.dialog:has(.invoice-live-preview){width:min(1080px,94vw);max-height:90vh;padding:32px;overflow-y:auto;overflow-x:hidden}
.dialog:has(.invoice-live-preview)>.x{top:18px;right:20px;width:38px;height:38px;padding:0;display:grid;place-items:center;background:#fff;z-index:2}
/* Legacy sizing applies only to the original four-column preview. */
.invoice-live-preview:not(.invoice-template-live-paper){width:100%;min-width:0;max-width:100%;overflow:hidden;color:#101d39}
.invoice-live-preview:not(.invoice-template-live-paper)>h1{margin:0 48px 24px 0;text-align:right;font:700 38px Georgia,serif;line-height:1.15}
.invoice-live-preview:not(.invoice-template-live-paper)>p{margin:0 0 18px;line-height:1.55}
.invoice-live-preview:not(.invoice-template-live-paper)>hr{margin:0 0 24px;border:0;border-top:1px solid #9ca5b1}
.invoice-live-preview:not(.invoice-template-live-paper) h3{margin:0 0 14px;font-size:18px}
.invoice-live-preview:not(.invoice-template-live-paper) table{width:100%;max-width:100%;table-layout:fixed;margin-top:24px}
.invoice-live-preview:not(.invoice-template-live-paper) th,.invoice-live-preview:not(.invoice-template-live-paper) td{overflow-wrap:anywhere;word-break:normal}
.invoice-live-preview:not(.invoice-template-live-paper) th:first-child{width:auto}
.invoice-live-preview:not(.invoice-template-live-paper) th:nth-child(2){width:72px}
.invoice-live-preview:not(.invoice-template-live-paper) th:nth-child(3),.invoice-live-preview:not(.invoice-template-live-paper) th:nth-child(4){width:98px}
.invoice-live-preview:not(.invoice-template-live-paper) td:nth-child(n+2),.invoice-live-preview:not(.invoice-template-live-paper) th:nth-child(n+2){white-space:nowrap;text-align:right}
.invoice-live-preview:not(.invoice-template-live-paper) .preview-balance{width:min(360px,100%);max-width:100%;margin:26px 0 0 auto}
@media(max-width:700px){.dialog:has(.invoice-live-preview){width:96vw;padding:22px 16px}.invoice-live-preview:not(.invoice-template-live-paper)>h1{font-size:30px;margin-right:42px}.invoice-live-preview:not(.invoice-template-live-paper) th:nth-child(2){width:52px}.invoice-live-preview:not(.invoice-template-live-paper) th:nth-child(3),.invoice-live-preview:not(.invoice-template-live-paper) th:nth-child(4){width:78px}.invoice-live-preview:not(.invoice-template-live-paper) th,.invoice-live-preview:not(.invoice-template-live-paper) td{padding:9px 6px;font-size:11px}}
