/* Integrated PNG preview: one bounded sheet or one detailed run at a time. */
.ex-studio{display:grid;grid-template-columns:minmax(0,1fr) minmax(210px,250px);gap:16px;align-items:start;color:var(--ink)}
.ex-studio [hidden]{display:none!important}
.ex-settings,.ex-sheet,.ex-output{min-width:0}
.ex-settings{grid-column:1/-1;display:flex;align-items:end;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:0 0 16px;border-bottom:1px solid var(--line)}
.ex-selects,.ex-layout,.ex-arrows,.ex-preview-head,.ex-sheet-top{display:flex;align-items:center}
.ex-selects{gap:12px;flex-wrap:wrap}
.ex-selects label,.ex-field-title{display:block;color:var(--muted);font-weight:700;font-size:11px;line-height:1.45}
.ex-selects select{display:block;min-width:103px;max-width:100%;margin-top:4px;font-size:13px;min-height:37px;padding:7px 10px}
.ex-layout{gap:3px;border:1px solid var(--line);border-radius:11px;background:var(--surface2);padding:3px;margin-top:4px}
.ex-layout button,.ex-page-tabs button,.ex-preview-head button{font:inherit;cursor:pointer;border:1px solid transparent;color:var(--muted);background:transparent}
.ex-layout button{display:inline-flex;align-items:center;justify-content:center;gap:6px;font-weight:700;font-size:12px;border-radius:7px;padding:7px 10px;white-space:nowrap}
.ex-layout button[aria-pressed=true]{background:var(--surface);border-color:var(--line);color:var(--accent);box-shadow:0 1px 3px #1111}
.ex-layout svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.35;stroke-linejoin:round}
.ex-sheet,.ex-output{border:1px solid var(--line);border-radius:13px;padding:15px;background:var(--surface)}
.ex-sheet-top,.ex-preview-head{justify-content:space-between;gap:10px}
.ex-sheet-top strong,.ex-eyebrow{display:block}
.ex-eyebrow{font-size:10px;color:var(--muted);font-weight:650;margin-bottom:2px}
.ex-sheet-top strong{font-size:17px;color:var(--ink)}
.ex-arrows{gap:5px}.ex-arrows .btn{width:36px;min-height:36px;font-size:21px;line-height:1;padding:0}.ex-arrows .btn:disabled{cursor:default;opacity:.35}
.ex-page-tabs{display:flex;flex-wrap:wrap;gap:5px;margin-top:9px}
.ex-page-tabs button{font-size:11px;font-weight:650;border-color:var(--line);padding:4px 8px;border-radius:7px}
.ex-page-tabs [aria-pressed=true]{color:var(--accent);border-color:var(--accent);background:var(--accent-light)}
.ex-sheet-hint,.ex-output-hint{color:var(--muted);font-size:12px;line-height:1.65;margin:7px 0 13px;word-break:keep-all;overflow-wrap:anywhere}
.ex-preview-head{margin:12px 0 6px;color:var(--muted);font-size:11px;font-weight:650}
.ex-preview-head button{padding:5px 8px;font-size:11px;font-weight:650;color:var(--accent);border-radius:6px;background:var(--surface2)}
.ex-preview{max-height:62vh;overflow:auto;overscroll-behavior:contain;padding:0;border-radius:8px;scrollbar-gutter:auto}
.ex-preview.ex-zoomed canvas{width:auto;max-width:none;height:auto}
.ex-output{background:var(--surface2)}
.ex-file-actions{display:grid;gap:7px}
.ex-file-actions .btn{min-height:40px;white-space:normal}
.ex-output .export-sharing{padding:12px 0 0;margin:12px 0 0;border-radius:0;border:0;border-top:1px solid var(--line);background:transparent}
.ex-output .export-share-actions{display:grid;grid-template-columns:1fr}
.ex-output .export-share-actions .btn{width:100%;white-space:normal;justify-content:center}
.ex-output .export-save-panel{padding:10px}
@media(max-width:840px){.ex-studio{grid-template-columns:minmax(0,1fr)}.ex-file-actions{grid-template-columns:repeat(3,minmax(0,1fr))}.ex-output .export-share-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.ex-output .export-sharing{margin-top:9px}.ex-sheet,.ex-output{padding:12px}.ex-preview{max-height:54vh}}
@media(max-width:480px){.ex-studio{gap:10px}.ex-settings{gap:10px;padding-bottom:10px}.ex-selects{gap:7px}.ex-selects select{min-width:86px}.ex-layout button{padding:6px 10px}.ex-layout{width:max-content}.ex-sheet-top strong{font-size:15px}.ex-page-tabs button{min-height:34px}.ex-sheet-hint,.ex-output-hint{font-size:11px}.ex-file-actions .btn{padding:7px 4px;line-height:1.5;font-size:11px}}
/* Export styles are independent of the color theme and page composition. */
.ex-style-picker{margin:0;padding:0;border:0;min-width:0;max-width:100%}
.ex-style-picker legend{padding:0}
.ex-style-options{display:inline-flex;gap:3px;border:1px solid var(--line);padding:3px;background:var(--surface2);border-radius:11px;margin-top:4px;max-width:100%}
.ex-style-options label{display:block;position:relative;min-width:0}
.ex-style-options input{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);padding:0;margin:0;border:0;white-space:nowrap}
.ex-style-choice{display:flex;align-items:center;justify-content:center;gap:7px;min-height:34px;padding:5px 11px;box-sizing:border-box;border:1px solid transparent;border-radius:7px;font-size:13px;font-weight:700;line-height:1.3;white-space:nowrap;color:var(--muted);cursor:pointer}
.ex-style-choice svg{width:17px;height:17px;flex:none;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.ex-style-options input:checked+.ex-style-choice{color:var(--accent);border-color:var(--accent);background:var(--accent-light)}
.ex-style-options label:hover .ex-style-choice{color:var(--ink)}
.ex-style-options input:focus-visible+.ex-style-choice{outline:2px solid var(--accent);outline-offset:2px}
@media(max-width:600px){.ex-style-picker{flex-basis:100%}.ex-style-options{display:flex;width:100%;box-sizing:border-box}.ex-style-options label{flex:1}.ex-style-choice{min-height:37px}}
