/* Application workspace; no prototype routes or pilot-only widgets. */
body .workspace-content{max-width:1640px;width:100%;min-width:0}
body .template-workspace{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(290px,.8fr);gap:28px;align-items:start}
body .template-workspace>form{min-width:0}body .template-preview-panel{position:sticky;top:90px;min-width:0;max-height:calc(100dvh - 105px);overflow:auto;border-inline-start:1px solid var(--border);padding-inline-start:24px}
body .template-preview-panel video,body .creative-preview-image{width:100%;max-height:68dvh;object-fit:contain;background:var(--surface);border-radius:12px}
body .creative-style-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
body .creative-style-grid button{display:flex;flex-direction:column;gap:10px;text-align:start;min-width:0;white-space:normal;padding:14px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text)}
body .creative-style-grid button[aria-pressed=true],body .creative-background-grid button[aria-pressed=true]{outline:2px solid var(--accent);outline-offset:2px}
.creative-style-symbol{display:grid;place-items:center;min-height:54px;font-size:32px;font-weight:800;border-radius:8px;width:100%;color:#f8f8ff;background:#172138}.style-game{color:#d7fb57}.style-editorial{font-family:Georgia,serif;background:#f5eee1;color:#33241b}.style-immersive{background:linear-gradient(135deg,#23352c,#4e656b)}.style-bold{background:#efd16c;color:#141414;transform:skew(-4deg)}
body .creative-background-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-block:12px}
body .creative-background-grid button{padding:5px;min-width:0;white-space:normal;font-size:12px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text)}
.creative-background-grid img{display:block;width:100%;height:85px;object-fit:cover;border-radius:5px}.creative-background-grid span{display:block;margin-top:4px}
body #creative-controls{display:grid;gap:16px}body #creative-controls fieldset{min-width:0;border:0;padding:0;margin:0}body #creative-controls legend{margin-bottom:10px;font-weight:650}body #creative-options{display:grid;gap:16px}
body #creative-options[hidden]{display:none}body #creative-controls [hidden]{display:none}body .template-workspace #template-actionbar{position:sticky;bottom:16px;z-index:4;border:1px solid var(--border);border-radius:12px;padding:12px;background:var(--surface)}
@media(min-width:1440px){body .workspace-layout{grid-template-columns:220px minmax(0,1fr)}body .workspace-content{padding-inline:30px}}
@media(max-width:1100px){body .template-workspace{grid-template-columns:minmax(0,1fr)}body .template-preview-panel{position:static;max-height:none;border:0;padding:0}body .creative-preview-image,body .template-preview-panel video{max-height:55dvh}body .template-workspace #template-actionbar{bottom:calc(12px + env(safe-area-inset-bottom));padding-bottom:12px}body .template-workspace #template-form{padding-bottom:10px}}
@media(max-width:430px){body .creative-background-grid{grid-template-columns:repeat(3,minmax(0,1fr))}body .creative-style-grid button{padding:10px;font-size:13px}}
body #template-preview:has(.creative-preview-image){display:block;overflow:visible;padding-bottom:0}
body #template-preview .creative-preview-image{display:block;width:100%;height:auto;max-height:65dvh;object-fit:contain}
body .template-preview-panel #template-actionbar{position:static;margin-top:14px;max-width:none}
body .template-preview-panel #template-preview-note{font-size:.82rem;line-height:1.45;color:var(--text-muted)}
body #creative-controls input[type=color]{height:42px;padding:5px;width:100%;cursor:pointer}
body #creative-controls input[type=checkbox]{width:20px;height:20px;padding:0}
@media(max-width:800px){body .template-workspace .template-preview-panel #template-actionbar{position:fixed;inset-inline:0;bottom:0;margin:0;border-radius:0;padding:10px 16px calc(10px + env(safe-area-inset-bottom));z-index:80}body.workspace-editing .template-preview-panel #template-actionbar{visibility:hidden;pointer-events:none}}
body .creative-style-grid button{display:grid;grid-template-columns:58px minmax(0,1fr);align-items:center;gap:12px}
.creative-style-thumb{display:block;width:58px;height:100px;object-fit:cover;border-radius:5px}
body #creative-advanced>div,body #creative-advanced>label{margin-block:12px}
/* Keep form ownership/legacy selectors while placing its actions beside the desktop preview. */
body .template-workspace #template-actionbar{position:fixed;left:var(--creative-action-left,auto);right:auto;width:var(--creative-action-width,320px);bottom:16px;margin:0;max-width:none;box-sizing:border-box;z-index:40}
body .template-preview-panel{padding-bottom:125px}
body #template-preview .creative-preview-image{max-height:calc(100dvh - 285px)}
@media(max-width:800px){body .template-workspace #template-actionbar{left:0;right:0;bottom:0;width:auto;border-radius:0;padding:10px 16px calc(10px + env(safe-area-inset-bottom));z-index:80}body #template-preview .creative-preview-image{max-height:55dvh}}
