/* Montage uses the shared shell palette and the approved concept-v2 geometry. */
body.montage-page{margin:0;background:var(--zs-bg);color:var(--zs-text);font:13px/1.45 var(--zs-font)}
.mg{box-sizing:border-box;padding:24px 26px 32px;max-width:1600px;margin:auto}.mg *{box-sizing:border-box}.mg [hidden]{display:none!important}.mg h1,.mg h2,.mg p{margin:0}.mg h1{font-size:22px;line-height:30px;letter-spacing:-.7px;font-weight:600}.mg h2{font-size:15px;line-height:22px;letter-spacing:-.25px;font-weight:600}.mg a{color:var(--zs-primary)}.mg svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex:none}
.mg button,.mg input,.mg select,.mg textarea{font:inherit;color:inherit;touch-action:manipulation}.mg button,.mg a{touch-action:manipulation}.mg button{cursor:pointer}.mg button:disabled{opacity:.5;cursor:not-allowed}.mg :is(button,a,input,textarea,select):focus-visible{outline:3px solid var(--zs-primary);outline-offset:3px}.mg-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:20px}.mg-head p{color:var(--zs-text-3);font-size:12px;margin-top:6px}.mg-saved{font-size:11px;color:var(--zs-text-3);white-space:nowrap}
.mg-projectbar{display:flex;align-items:center;gap:10px;margin-bottom:20px}.mg-projectbar label{margin:0;white-space:nowrap}.mg-projectbar select{max-width:280px;flex:1;min-width:0}.mg-projectbar .mg-btn{margin-left:auto}.mg-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:20px;align-items:start}.mg-stack,.mg-preview-column{display:flex;flex-direction:column;gap:16px;min-width:0}.mg-card{border:1px solid var(--zs-border);border-radius:12px;background:var(--zs-bg);padding:18px 20px;min-width:0}.mg-step{display:flex;gap:10px;align-items:center;margin-bottom:12px}.mg-step>span{width:24px;height:24px;display:grid;place-items:center;background:var(--zs-bg-2);border-radius:7px;font-size:12px;color:var(--zs-text-3)}.mg .mg-intro{color:var(--zs-text-3);font-size:12px;line-height:18px;margin:6px 0 14px}.mg label,.mg legend{display:block;font-size:12px;font-weight:600;margin-bottom:7px}.mg fieldset{border:0;padding:0;margin:20px 0 0;min-width:0}.mg fieldset:first-of-type{margin-top:0}.mg textarea,.mg input,.mg select{border:1px solid var(--zs-border-2);border-radius:8px;background:var(--zs-bg);padding:10px 12px;max-width:100%;font-size:12px}.mg textarea{display:block;width:100%;height:88px;min-height:72px;resize:vertical}.mg select{min-height:38px}.mg-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:36px;padding:0 12px;border:1px solid var(--zs-border-2);border-radius:8px;background:var(--zs-bg);font-size:12px;font-weight:500;text-decoration:none}.mg-btn:hover:not(:disabled){background:var(--zs-bg-2)}.mg .mg-primary{background:var(--zs-primary-strong);border-color:var(--zs-primary-strong);color:#fff;width:100%;min-height:46px}.mg-primary:hover:not(:disabled){filter:brightness(.95);background:var(--zs-primary-strong)}.mg-chips{display:flex;flex-wrap:wrap;gap:7px}.mg-chips .mg-btn{border-color:var(--zs-border)}.mg .mg-btn[aria-pressed=true]{background:var(--zs-primary-soft);color:var(--zs-primary);border-color:var(--zs-primary-strong)}.mg-custom{display:flex;gap:10px;align-items:center;margin-top:10px;color:var(--zs-text-3);font-size:11px}.mg-custom label{margin:0;font-weight:400;font-size:11px}.mg-custom input{width:100px;min-height:36px}.mg-formats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.mg-formats .mg-btn{height:48px}.mg-frame-icon{display:inline-block;width:var(--w);height:var(--h);border:1.4px solid currentColor;border-radius:2px}.mg-field{margin-top:12px}.mg-field select{width:100%}
.mg-clips{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px 10px}.mg-clip{min-width:0;position:relative}.mg-still{position:relative;height:90px;background:var(--zs-bg-2);border-radius:6px;overflow:hidden}.mg-still img{width:100%;height:100%;object-fit:cover}.mg-time{position:absolute;bottom:4px;right:4px;background:#20242c;color:#fff;border-radius:3px;padding:1px 4px;font-size:9px}.mg-clip-name{font-size:10px;line-height:16px;overflow-wrap:anywhere;margin-top:7px;display:flex;gap:6px}.mg-clip-name b{font-weight:500;color:var(--zs-text-3)}.mg-clip-tools{display:flex;gap:4px;margin-top:6px}.mg-clip-tools button{min-width:30px;min-height:30px;padding:0 6px}.mg-clip-tools button:last-child{margin-left:auto}.mg-clip[draggable=true]{cursor:grab}.mg-clip.is-dragging{opacity:.5}.mg-drop{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:14px;border:1px dashed var(--zs-border-2);border-radius:8px;background:var(--zs-bg-2);margin-top:16px}.mg-drop p{font-size:12px;flex:1;min-width:130px}.mg-drop small{width:100%;color:var(--zs-text-3);font-size:11px}.mg-drop.is-over{outline:2px solid var(--zs-primary);background:var(--zs-primary-soft)}.mg-help{font-size:11px;color:var(--zs-text-3);line-height:18px;margin-top:10px!important}.mg progress{width:100%;height:6px;accent-color:var(--zs-primary-strong)}#mgUpload{margin-top:14px;font-size:12px;overflow-wrap:anywhere}.mg-preview{background:var(--zs-bg-2);padding:16px}.mg-preview-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.mg-preview-head h2{font-size:12px}.mg-badge{font-size:10px;color:var(--zs-text-3);border:1px solid var(--zs-border-2);border-radius:4px;padding:2px 7px;background:var(--zs-bg)}.mg-preview-frame{position:relative;aspect-ratio:9/16;width:100%;max-width:260px;margin:auto;border:1px solid var(--zs-border);border-radius:9px;background:var(--zs-bg);overflow:hidden;display:grid;place-items:center;text-align:center}.mg-preview-frame img{position:absolute;width:100%;height:100%;object-fit:contain}.mg-preview-frame p{font-size:12px;color:var(--zs-text-3);margin-top:12px}.mg-source-tag{position:absolute;top:16px;left:16px;font-size:9px;letter-spacing:1px;background:#20242c;color:white;padding:5px 8px;border-radius:4px}.mg-preview-note{font-size:11px;color:var(--zs-text-3);text-align:center;margin-top:12px!important}.mg-story{padding:18px}.mg-story h2{font-size:13px}.mg-story ol{list-style:none;margin:16px 0 0;padding:0;counter-reset:story}.mg-story li{position:relative;counter-increment:story;padding-left:28px;margin-top:14px}.mg-story li:before{content:counter(story);position:absolute;left:0;top:1px;border:1px solid var(--zs-border);border-radius:50%;width:19px;height:19px;display:grid;place-items:center;font-size:10px;color:var(--zs-text-3)}.mg-story b{font-size:12px;font-weight:500;display:block}.mg-story li span{font-size:11px;color:var(--zs-text-3);display:block;margin-top:3px}.mg-cta p{text-align:center}.mg-alert{border:1px solid #c86363;color:var(--zs-text);background:var(--zs-bg-2);border-radius:8px;padding:12px 16px;margin-bottom:16px;overflow-wrap:anywhere}.mg-empty{max-width:550px;margin:70px auto;text-align:center;padding:32px}.mg-empty p{margin:14px 0 24px;color:var(--zs-text-3)}
.mg-progress-layout{display:grid;grid-template-columns:1.2fr 1fr;gap:24px;align-items:start}.mg-stages{list-style:none;padding:0;margin:24px 0}.mg-stages li{position:relative;display:flex;gap:12px;padding:16px 0;align-items:center}.mg-stages li:not(:last-child):after{content:'';position:absolute;left:13px;top:44px;height:32px;width:1px;background:var(--zs-border)}.mg-stage-marker{display:grid;place-items:center;flex:none;width:28px;height:28px;border:1px solid var(--zs-border-2);border-radius:50%;font-size:11px;background:var(--zs-bg)}.mg-stages .is-active{color:var(--zs-primary);font-weight:600}.mg-stages .is-active .mg-stage-marker{color:#fff;background:var(--zs-primary-strong);border-color:var(--zs-primary-strong)}.mg-stages .is-done .mg-stage-marker{background:var(--zs-primary-soft);color:var(--zs-primary)}.mg-stages small{margin-left:auto;font-size:10px;color:var(--zs-text-3)}.mg-analysis{grid-template-columns:1fr 1fr;margin-top:16px}.mg-analysis .mg-still{height:144px}.mg-notes{padding-left:18px;font-size:12px;color:var(--zs-text-3);line-height:20px;overflow-wrap:anywhere}.mg-notes li{margin-top:12px}.mg-result-layout{display:grid;grid-template-columns:1fr 1fr;gap:24px;align-items:start}.mg-player-well{padding:24px;background:var(--zs-bg-2);border:1px solid var(--zs-border);border-radius:12px;text-align:center}.mg-player-well video{display:block;width:100%;max-height:650px;margin:auto;background:#151820;border-radius:8px}.mg-result-layout .mg-btn{margin-top:16px}
/* No price or credit UI on this invitation stage, including the shared shell. */
body.montage-page :is(.zs-credits,#zsCreditsTop,.zs-acc-card,.zs-acc-buy,.zs-acc-row[href='/pricing.html']){display:none!important}
@media(max-width:1100px) and (min-width:769px){.mg-layout{grid-template-columns:minmax(0,1fr) 270px}.mg-clips{grid-template-columns:1fr 1fr}.mg-formats{grid-template-columns:1fr 1fr}}
@media(max-width:768px){.mg{box-sizing:border-box;padding:22px 16px 150px}.mg-head{display:block;margin-bottom:20px}.mg-head h1{font-size:22px}.mg-saved{display:block;margin-top:10px}.mg-projectbar{flex-wrap:wrap;gap:8px}.mg-projectbar label{width:100%}.mg-projectbar select{max-width:none}.mg-layout,.mg-progress-layout,.mg-result-layout{grid-template-columns:1fr;gap:16px}.mg-card{padding:18px 16px}.mg-clips{grid-template-columns:1fr 1fr}.mg-still{height:100px}.mg-clip-name{font-size:11px}.mg-clip-tools button{min-height:44px;min-width:44px}.mg-btn{min-height:44px}.mg textarea{min-height:112px;font-size:13px;line-height:21px}.mg select,.mg input{font-size:16px;min-height:44px}.mg-formats{grid-template-columns:1fr 1fr}.mg-formats .mg-btn{height:52px}.mg-custom{flex-wrap:wrap}.mg-custom label{width:100%;font-size:12px}.mg fieldset{margin-top:20px}.mg-cta{position:fixed;z-index:990;bottom:0;left:0;right:0;padding:10px 16px calc(8px + env(safe-area-inset-bottom));background:var(--zs-bg-glass);border-top:1px solid var(--zs-border);backdrop-filter:blur(14px)}.mg-cta .mg-help{margin-top:4px!important;font-size:10px}.mg-preview-column{gap:14px}.mg-empty{margin:25px auto}.mg-stages small{display:none}.mg-player-well{padding:16px}.mg-projectbar .mg-btn{flex:none}.mg-analysis .mg-still{height:120px}}
/* invite-only card: open tool first, home second; stacked on phones */
/* example video link (step 2) */
.mg-ref{margin-top:16px}.mg-ref input{display:block;width:100%;min-height:38px}.mg-ref input[aria-invalid=true]{border-color:#c86363}.mg-field-error{font-size:11px;line-height:18px;color:#b44b4b;margin-top:6px!important}
.mg-help.is-todo{color:#b45309;font-weight:600}
.mg-help.is-flash{animation:mg-flash .9s ease 2}
.is-needed{outline:2px solid var(--zs-primary)!important;outline-offset:3px;animation:mg-pulse 1.2s ease 2}
.mg-drop.is-needed{background:var(--zs-primary-soft)}
@keyframes mg-pulse{0%,100%{box-shadow:0 0 0 0 rgba(37,99,235,0)}50%{box-shadow:0 0 0 8px rgba(37,99,235,.18)}}
@keyframes mg-flash{0%,100%{opacity:1}50%{opacity:.35}}
@media (prefers-reduced-motion:reduce){.is-needed,.mg-help.is-flash{animation:none}}
.mg-link{display:grid;gap:6px;margin-top:12px}
.mg-link label{font-size:12px;font-weight:600;color:var(--zs-text-2)}
.mg-link-row{display:flex;gap:8px}
.mg-link-row input{flex:1;min-width:0;height:38px;padding:0 12px;border:1px solid var(--zs-border-2);border-radius:8px;background:var(--zs-bg);color:var(--zs-text);font:inherit;font-size:13px}
.mg-link-row input:focus{outline:2px solid var(--zs-primary);outline-offset:1px;border-color:var(--zs-primary)}
.mg-link small{color:var(--zs-text-3);font-size:11px}
@media (max-width:520px){.mg-link-row{flex-direction:column}}
/* Montage price line under the order button (server pricing; hidden for studio owners). */
.mg-price{margin-top:6px!important;color:var(--zs-text-2)}.mg-price.is-low{color:#b45309;font-weight:600}.mg-price a{color:var(--zs-primary);font-weight:600;margin-left:6px;white-space:nowrap}
/* Correction box on the finished montage */
.mg-note textarea{margin-top:12px}
.mg-note .mg-btn:disabled{opacity:.55;cursor:default}
/* Ready styles: four 9:16 tiles (3 saved studio montages + own style); example plays inside the tile. */
.mg-templates{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px}
.mg-tpl{display:flex;flex-direction:column;min-width:0;border:1px solid var(--zs-border);border-radius:10px;overflow:hidden;background:var(--zs-bg);transition:border-color .15s,box-shadow .15s}
.mg-tpl.is-on{border-color:var(--zs-primary-strong);box-shadow:0 0 0 1px var(--zs-primary-strong)}
.mg-tpl-media{position:relative;aspect-ratio:4/5;background:var(--zs-bg-2);overflow:hidden}
.mg-tpl-media img,.mg-tpl-media video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;background:#000}
.mg .mg-tpl-play{position:absolute;left:50%;bottom:12px;transform:translateX(-50%);display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 12px 0 10px;border:0;border-radius:999px;background:rgba(10,12,16,.72);color:#fff;font-size:12px;font-weight:500;white-space:nowrap;backdrop-filter:blur(6px)}
.mg .mg-tpl-play:hover:not(:disabled){background:rgba(10,12,16,.88)}
.mg-tpl-icon svg{width:14px;height:14px;fill:currentColor;stroke:none;display:block}
.mg .mg-tpl-pick{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:3px;text-align:left;width:100%;flex:1;padding:11px 36px 12px 12px;border:0;border-top:1px solid var(--zs-border);border-radius:0;background:var(--zs-bg)}
.mg .mg-tpl-pick:hover:not(:disabled){background:var(--zs-bg-2)}
.mg .mg-tpl-pick[aria-pressed=true]{background:var(--zs-primary-soft)}
.mg-tpl-pick b{font-size:13px;font-weight:600;line-height:18px}.mg-tpl-pick span{font-size:11px;line-height:16px;color:var(--zs-text-3)}
.mg-tpl-check{position:absolute;top:12px;right:12px;width:18px;height:18px;border:1.5px solid var(--zs-border-2);border-radius:50%;background:var(--zs-bg)}
.mg-tpl-pick[aria-pressed=true] .mg-tpl-check{border-color:var(--zs-primary-strong);background:var(--zs-primary-strong) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center/12px no-repeat}
.mg-tpl-own .mg-tpl-media{display:grid;place-items:center;padding:16px;text-align:center;border:0;background:repeating-linear-gradient(135deg,var(--zs-bg-2) 0 10px,var(--zs-bg) 10px 20px)}
.mg-tpl-own .mg-tpl-media p{font-size:12px;line-height:18px;color:var(--zs-text-2);max-width:150px}

@media(max-width:768px){.mg-templates{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}}
.mg-tpl-media img{object-position:50% 22%}.mg-tpl-media video{object-fit:contain}
