.output-preview-row{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin:18px 0 12px;font-size:12px;color:#788479}
.preview-post-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 16px;border:1px solid #cbd8cc;border-radius:11px;background:#fff;color:#244f40;font-weight:650;box-shadow:0 2px 4px #244f4005}
.preview-post-button::before{content:'';width:18px;height:18px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M2 10s3-5 8-5 8 5 8 5-3 5-8 5-8-5-8-5Z' fill='none' stroke='%23244f40' stroke-width='1.5'/%3E%3Ccircle cx='10' cy='10' r='2.3' fill='none' stroke='%23244f40' stroke-width='1.5'/%3E%3C/svg%3E") center/contain no-repeat}
.preview-post-button:not(:disabled):hover{background:#eff5ec;border-color:#a8c09e}
.post-preview{width:min(1120px,calc(100vw - 40px));max-width:none;max-height:calc(100dvh - 40px);margin:auto;padding:0;border:1px solid #ffffff26;border-radius:22px;background:#16201c;color:#f5f7f4;box-shadow:0 30px 100px #0008;overflow:hidden;font:14px/1.5 system-ui,sans-serif}
.post-preview[open]{display:flex;flex-direction:column}
.post-preview::backdrop{background:#07120dd9;backdrop-filter:blur(12px)}
.post-preview-header{display:flex;align-items:center;justify-content:space-between;flex-shrink:0;gap:20px;padding:20px 24px;border-bottom:1px solid #ffffff12}
.post-preview-eyebrow{display:block;margin-bottom:3px;font-size:10px;font-weight:650;letter-spacing:1.8px;color:#a5bbae}
.post-preview-header h2{margin:0;font:600 20px/1.3 system-ui,sans-serif;letter-spacing:-.4px;color:#fff}
.post-preview button{min-height:42px;padding:10px 16px;border:1px solid #ffffff26;border-radius:10px;background:#ffffff0a;color:#e9efeb;font-size:12px;font-weight:600;cursor:pointer}
.post-preview button:hover{background:#ffffff17}
.post-preview .post-preview-close{display:grid;place-items:center;width:42px;min-height:42px;padding:0;font-size:0}
.post-preview-close::before{content:'';display:block;width:18px;height:18px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 5 10 10M15 5 5 15' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat}
.post-preview-surface{display:flex;align-items:center;justify-content:center;min-height:0;flex:1 1 auto;padding:24px;background:radial-gradient(ellipse at top,#26342c,#0d1511);overflow:auto}
.post-preview-surface canvas,.post-preview-surface video{display:block;width:auto;height:auto;max-width:100%;max-height:calc(100dvh - 250px);object-fit:contain;border-radius:3px;box-shadow:0 12px 40px #0006;cursor:default;touch-action:auto}
.post-preview.is-video .post-preview-surface canvas,.post-preview.is-video .post-preview-surface video{max-height:calc(100dvh - 320px)}
.post-preview-footer{display:flex;align-items:center;justify-content:space-between;flex-shrink:0;flex-wrap:wrap;gap:16px;padding:16px 24px;border-top:1px solid #ffffff12}
.post-preview-meta{font-size:12px;color:#aebfb3;font-variant-numeric:tabular-nums}
.post-preview-actions{display:flex;flex-wrap:wrap;gap:8px}
.post-preview .post-preview-primary{border-color:#dce9d6;background:#e0edd9;color:#1e3b2b}
.post-preview .post-preview-primary:hover{background:#eef5e9}
.post-preview-player{display:flex;align-items:center;gap:14px;flex-shrink:0;padding:12px 24px;border-top:1px solid #ffffff12}
.post-preview-player input[type=range]{flex:1;min-width:0;width:auto;margin:0;accent-color:#d2e5c8}
.post-preview-player span{white-space:nowrap;font-size:11px;color:#b8c8bd;font-variant-numeric:tabular-nums}
.post-preview button:focus-visible{outline:2px solid #c9e0bb;outline-offset:3px}
body:has(.post-preview[open]){overflow:hidden}
@media(max-width:540px){.post-preview{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:16px}.post-preview-header{padding:16px}.post-preview-header h2{font-size:18px}.post-preview-surface{padding:12px}.post-preview-surface canvas,.post-preview-surface video{max-height:calc(100dvh - 280px)}.post-preview-footer{padding:14px 16px;gap:10px}.post-preview-actions{width:100%}.post-preview-actions button{flex:1;min-height:44px}.post-preview-player{padding:10px 12px;gap:8px}.post-preview-player button{padding:8px 12px}.output-preview-row{font-size:11px}}

/* Keep the dialog close to the artwork instead of stretching across the screen. */
.post-preview.is-fitted{--preview-space:240px;width:min(980px,calc(100vw - 24px),max(300px,calc((100dvh - var(--preview-space)) * var(--preview-ratio,1) + 20px)));height:auto;max-height:calc(100dvh - 24px)}
.post-preview.is-fitted .post-preview-header{padding:8px 14px}
.post-preview.is-fitted .post-preview-eyebrow{display:none}
.post-preview.is-fitted .post-preview-header h2{font-size:18px}
.post-preview.is-fitted .post-preview-surface{flex:0 1 auto;padding:10px;overflow:auto}
.post-preview.is-fitted .post-preview-surface canvas{width:auto;height:auto;max-width:100%;max-height:calc(100dvh - var(--preview-space));object-fit:contain;border-radius:2px;box-shadow:none}
.post-preview.is-fitted .post-preview-player{padding:8px 14px}
.post-preview.is-fitted .post-preview-footer{padding:10px 14px;gap:8px}
@media(max-width:540px){.post-preview.is-fitted{--preview-space:250px;max-height:calc(100dvh - 16px);border-radius:12px}.post-preview.is-fitted .post-preview-header h2{font-size:16px}.post-preview.is-fitted .post-preview-surface{padding:6px}.post-preview.is-fitted .post-preview-player{gap:8px;padding:6px 10px}.post-preview.is-fitted .post-preview-footer{padding:8px 10px}.post-preview.is-fitted .post-preview-actions button{padding:8px 10px;min-height:40px}.post-preview.is-fitted .post-preview-meta{font-size:10px}}
