.template-workspace{min-height:100dvh;background:#121212;color:#f5f3f1;font-family:Outfit Variable,Outfit,ui-sans-serif,system-ui,sans-serif}.template-workspace-header{position:sticky;top:0;z-index:10;display:flex;min-height:var(--studio-header-height);align-items:center;justify-content:flex-end;gap:clamp(4px,1vw,12px);margin-inline-start:var(--grm-sidebar-width);padding-inline:clamp(8px,2vw,24px);background:#121212;border-bottom:1px solid #ffffff12}.template-workspace-offer{display:none}@media (min-width:960px){.template-workspace-offer{display:inline-flex;min-width:0;align-items:center;gap:8px;margin-inline-end:auto;padding:6px 10px;border:1px solid #ff765c40;border-radius:8px;color:#ff9d89;background:#ff765c12;font-size:13px;white-space:nowrap}.template-workspace-offer span:first-child{overflow:hidden;text-overflow:ellipsis}.template-workspace-offer:hover{background:#ff765c24}}.template-workspace-credits{display:inline-flex;align-items:center;gap:4px;padding-inline:4px;white-space:nowrap;font-size:13px;font-weight:600}.template-workspace-credits svg{color:#ff765c}.template-workspace-main{min-width:0;padding:clamp(16px,3vw,40px) clamp(16px,3vw,40px) calc(92px + env(safe-area-inset-bottom, 0px))}@media (min-width:768px){.template-workspace-main{margin-inline-start:var(--grm-sidebar-width);padding-bottom:40px}.template-workspace-main:has(>.template-workbench){--template-workbench-inset:clamp(16px,2vw,24px);padding:var(--template-workbench-inset)}}.template-library-heading,.template-workbench-heading{display:flex;align-items:center;gap:14px;margin-bottom:20px}.template-library-heading{flex-wrap:wrap;justify-content:space-between}.template-workspace h1{font-size:clamp(22px,3vw,32px);font-weight:700}.template-library-search{display:flex;align-items:center;width:min(100%,320px);border:1px solid #383838;border-radius:12px;background:#232323;color-scheme:dark}.template-library-search:focus-within{border-color:#ad6858}.template-library-search button{border-radius:10px;padding:10px;color:#bab6b2;cursor:pointer}.template-library-search button:hover{color:#fff}.template-library-search input{width:100%;min-width:0;padding:10px 12px 10px 0;background:transparent}.template-library-search input:focus{outline:none}.template-library-categories{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:20px}.template-library-categories a,.template-workbench-preview h2{border-radius:9px;padding:7px 12px;font-weight:650}.template-library-categories a{color:#bab6b2}.template-library-categories a:hover{background:#242424;color:#fff}.template-library-categories a[aria-current=page]{background:#30231e;color:#ff9178}.template-library-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,190px),1fr));gap:13px}.template-library-card{position:relative;display:grid;aspect-ratio:4/5;place-items:center;overflow:hidden;border-radius:13px;background:#252525}.template-library-card:hover{box-shadow:0 0 0 2px #ff785d}.template-library-card .scene-preview{position:absolute;inset:0;width:100%}.template-library-card video{object-fit:cover}.template-library-card>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.template-library-card[data-full-frame] :is(video,img){object-fit:contain}.template-library-card>span{position:absolute;inset:auto 0 0;background:linear-gradient(transparent,#000d);padding:28px 12px 10px;color:white;font-weight:650}.template-library-card-pending{position:absolute;inset:0;display:grid;place-items:center;background:#12121299;pointer-events:none}.template-navigation-spinner{inline-size:24px;block-size:24px;border:2px solid #ffffff38;border-inline-end-color:#ff765c;border-radius:50%}@media (prefers-reduced-motion:no-preference){.template-navigation-spinner{animation:template-navigation-spin .75s linear infinite}}@keyframes template-navigation-spin{to{transform:rotate(1turn)}}.template-library-empty{color:#bab6b2;padding-block:24px}.template-workbench{container:template-workbench/inline-size;--scene-ink:#f6f4f2;--scene-muted:#b6b0aa;--scene-surface:#232323;--scene-border:#3b3b3b;--scene-accent:#ff604a;--scene-field-error:#ff9b8b;--scene-mention-bg:#252525;--scene-mention-hover:#333;--scene-mention-selected-bg:#472b26;--scene-mention-selected-ink:#ffb6a8;--scene-mention-shadow:#0009}.template-workbench .scene-current-row{container:scene-current-row/inline-size;display:flex;align-items:stretch;gap:10px}.template-workbench .scene-template-back{width:44px;height:44px;border-color:var(--scene-border);border-radius:12px;background:var(--scene-surface);color:var(--scene-ink)}.template-workbench .scene-template-back:hover{border-color:#626262;background:#303030}.template-workbench .scene-current-row>.scene-template-back{height:auto}.template-workbench .scene-workbench{width:100%;grid-template-columns:minmax(0,1fr);gap:16px}.template-workbench :is(.scene-swap,.template-workbench-preview,.template-workbench-input){min-width:0;border:1px solid #ffffff16;border-radius:16px;background:#181818;padding:clamp(12px,2vw,22px)}.template-workbench .scene-current{min-width:0;min-height:52px;flex:1;border:1px solid var(--scene-border);padding-block:4px}.template-workbench .scene-current-media,.template-workbench .scene-current-media .scene-preview{width:42px;height:42px}.template-workbench .scene-current-title{overflow:hidden;font:inherit;text-overflow:ellipsis;white-space:nowrap}@container scene-current-row (width < 310px){.template-workbench .scene-current{gap:6px}.template-workbench .scene-current-media,.template-workbench .scene-current-media .scene-preview{width:36px;height:36px}}.template-workbench-origin{margin-block-start:24px;padding:clamp(12px,2vw,22px);border:1px solid #ffffff16;border-radius:16px;background:#181818}.template-workbench-origin h2{font-weight:600}.template-workbench-origin p{max-width:75ch;margin-block:8px;color:var(--scene-muted);line-height:1.6}.template-workbench-origin ul{display:flex;flex-wrap:wrap;gap:4px 16px}.template-workbench-origin a{color:#ff9d89;text-decoration:underline;text-underline-offset:3px}.template-workbench-preview{display:flex;flex-direction:column;gap:14px}.template-workbench-example{display:contents}.template-workbench .template-workbench-preview>.scene-history-toolbar{width:fit-content;max-width:100%;justify-content:flex-start}.template-workbench-preview>.scene-history-toolbar .scene-history-switch{justify-content:flex-start;margin-bottom:0}.template-workbench-preview h2{align-self:start;background:#303030;font-size:14px}.template-workbench-library{container-type:inline-size;height:clamp(330px,58vh,620px);overflow:auto;overscroll-behavior:contain;padding:3px}.template-workbench-library .template-library-grid{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:calc((100cqw - 16px) / 3 * .55);gap:8px;margin:0;padding:0;list-style:none}.template-workbench-library li{grid-row:span 3;min-width:0}.template-workbench-library .template-library-card-landscape{grid-row:span 1}.template-workbench-library .template-library-card{height:100%;aspect-ratio:auto;border-radius:10px}@container (max-width: 385px){.template-workbench-library .template-library-grid{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:calc((100cqw - 8px) / 2 * .55)}}.template-workbench-library .template-library-card[aria-current=page]{box-shadow:0 0 0 2px var(--scene-accent)}.template-workbench-library .template-library-card>span{padding:24px 8px 8px;font-size:13px}.template-workbench-preview{--template-preview-max-height:clamp(220px,calc(100svh - 285px),540px)}.template-workbench-preview .template-workbench-history{height:clamp(220px,calc(100svh - 285px),540px);min-height:0}.template-workbench-preview .scene-result{flex:0 1 auto;width:min(100%,calc(var(--template-preview-max-height) * var(--scene-intro-ratio, .5625)));height:auto;min-height:0;max-height:var(--template-preview-max-height);align-self:center;aspect-ratio:var(--scene-intro-ratio,.5625);background:#101010}.template-workbench-preview .template-workbench-history{position:relative}.template-workbench-preview:has(>.template-workbench-history:not([hidden])){display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto 1fr;gap:0;min-height:0}.template-workbench-preview>.template-workbench-history:not([hidden]){grid-area:1/1/3/2;min-width:0}.template-workbench-preview:has(>.template-workbench-history:not([hidden]))>.scene-history-toolbar{grid-area:1/1;justify-self:start;align-self:start;position:relative;z-index:1}.template-workbench-history .template-history-frame,.template-workbench-history .template-history-region{position:absolute;inset:0;height:100%}.template-workbench-preview .scene-result video{object-fit:contain;background:#101010}.template-workbench :is(.scene-reference-modes,.scene-output-settings .scene-setting){background:#252525;color:var(--scene-ink)}.template-workbench :is(.scene-reference-modes button,.scene-output-settings .scene-setting)[aria-pressed=true]{border-color:#8a4c3e;background:#36241e;color:#ffa28d}.template-workbench .scene-generate{color:#1c120e}.template-workbench .scene-swap-pinned .scene-swap-actions{position:sticky;z-index:2;bottom:0;display:grid;gap:8px;background:#181818}.template-workbench .scene-output-settings{display:flex;flex-wrap:wrap}.template-workbench .scene-output-settings .scene-setting{flex:1 0 auto;width:auto;white-space:nowrap}.template-workbench .scene-setting-value [data-slot=select-value]{white-space:nowrap}.template-workbench .scene-swap-pinned .scene-form-error{order:-1}.template-workspace a:focus-visible{outline:2px solid #ff785d;outline-offset:2px}@container template-workbench (width > 615px){.template-workbench-heading{min-height:48px;margin-bottom:16px}.template-workbench .scene-workbench{grid-template-columns:clamp(300px,30%,440px) minmax(0,1fr);grid-template-rows:minmax(0,1fr);align-items:stretch;height:max(var(--template-workbench-min-height,432px),calc(100dvh - var(--grm-offer-height, 0px) - var(--studio-header-height, 48px) - 2 * var(--template-workbench-inset, 16px) - var(--template-workbench-heading-space, 64px)))}.template-workbench .scene-workbench:has(>.scene-swap-pinned){--template-workbench-heading-space:0px;--template-workbench-min-height:0px}.template-workbench .scene-swap{display:flex;flex-direction:column}.template-workbench :is(.scene-swap,.template-workbench-input,.template-workbench-preview){min-height:0;padding:clamp(12px,1.25vw,20px)}.template-workbench :is(.scene-swap,.template-workbench-input){overflow:auto}.template-workbench-preview:not(:has(.template-history-region[data-playing])){overflow:clip}.template-workbench .scene-swap-pinned{display:grid;grid-template-rows:minmax(0,1fr) auto;overflow:visible}.template-workbench .scene-swap-pinned .scene-swap-body{display:flex;flex-direction:column;gap:inherit;min-height:0;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-width:thin;padding:2px;margin:-2px}.template-workbench .scene-swap-pinned .scene-swap-body>*{flex-shrink:0}.template-workbench .scene-swap-pinned .scene-swap-actions{position:static}.template-workbench .scene-references{flex:1 0 auto}.template-workbench .scene-generate{margin-top:auto}.template-workbench .scene-recast .scene-references{--scene-photo-height:138px}.template-workbench .scene-recast .scene-reference-photo{position:relative}.template-workbench .scene-recast .scene-photo-preview{position:absolute;inset:0;width:auto;height:auto}.template-workbench .scene-greeting .scene-mapping{flex:1 0 auto;grid-template-rows:auto minmax(164px,1fr)}.template-workbench .scene-greeting .scene-mapping textarea{height:100%}.template-workbench-preview>:is(.template-workbench-library,.template-workbench-history){flex:1 1 0;height:auto;min-height:0}.template-workbench-example{display:flex;min-height:0;flex:1;justify-content:center;container-type:size}.template-workbench-example>.scene-result{--template-preview-max-height:100cqh}.template-workbench-preview:has(>.template-workbench-history:not([hidden])){grid-template-rows:auto minmax(0,1fr)}}@container template-workbench (width <= 615px){.template-workbench-preview{--template-preview-max-height:min(60svh,480px)}.template-workbench-preview .scene-result{aspect-ratio:var(--scene-intro-ratio,.5625)}}@media (max-width:480px){.template-library-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}}