:root{--navy:#000e35;--red:#e42636;--blue:#0043ff;--cream:#f7f5ee;--muted:#697383;--line:#e1e4eb}*{box-sizing:border-box}body{margin:0;color:var(--navy);background:#f4f5f8;font:15px/1.5 Arial,sans-serif}button,input,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.4;cursor:default}button:focus-visible,a:focus-visible{outline:3px solid #718fff;outline-offset:4px}[hidden]{display:none!important}.top{height:90px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 max(5vw,24px)}.brand{display:flex;align-items:center;gap:18px;text-decoration:none;color:var(--navy)}.brand>b{font-size:31px;font-weight:900;letter-spacing:-2px}.brand>b>span{color:var(--red)}.brand-divider{height:30px;border-left:1px solid #ccd0d9}.brand strong{font-size:12px;letter-spacing:2px}.brand small{font-size:10px;display:block;letter-spacing:4px;color:#737d8c}.private{font-size:10px;letter-spacing:2px;color:var(--muted)}main{max-width:1400px;margin:auto;padding:42px 5vw}.eyebrow{font-size:10px;font-weight:bold;letter-spacing:2px;color:var(--muted);margin-bottom:18px}h1{font-size:36px;line-height:1.14;letter-spacing:-1.3px;margin:0}h1 em{font-style:normal;color:var(--blue)}p{margin:10px 0;color:var(--muted)}.login{max-width:850px;padding:30px 0 50px}.login h1{font-size:60px}.intro{max-width:450px;margin:24px 0 34px;font-size:17px}.login-box{max-width:470px;background:white;padding:26px;border:1px solid var(--line);border-radius:20px;display:grid;grid-template-columns:54px 1fr;gap:10px 16px;align-items:center}.avatar{width:52px;height:52px;border-radius:50%;object-fit:cover;object-position:top}.login-box small,.account small{display:block;color:var(--muted);font-size:12px}.login-box form,.login-box .error{grid-column:1/-1}.password-row{display:flex;gap:8px}.password-row input{min-width:0;margin:0}.password-row button,.primary{border:0;background:var(--blue);color:white;border-radius:9px;padding:13px 20px;font-weight:bold}.login-formats{display:flex;gap:36px;margin-top:32px;font-weight:bold}.login-formats small{font-size:12px;color:var(--muted);font-weight:normal;margin-left:8px}.welcome{display:flex;align-items:center;justify-content:space-between;margin-bottom:34px;gap:20px}.account{display:flex;align-items:center;gap:12px;min-width:175px}.text-button{border:0;background:none;padding:2px 0;color:var(--muted);text-decoration:underline;font-size:12px}.workspace{display:grid;grid-template-columns:350px minmax(0,1fr);gap:24px;align-items:start}.controls{display:grid;gap:20px}.panel,.preview-panel{background:white;border:1px solid var(--line);border-radius:16px;padding:24px}.section-title{display:flex;align-items:center;gap:12px}.section-title>span{font-size:10px;color:var(--blue);background:#eef2ff;border-radius:6px;padding:5px 8px;font-weight:bold}h2{font-size:16px;margin:0;font-weight:700}label{display:block;font-size:12px;font-weight:bold;margin:18px 0 7px}input:not([type=file]),select{display:block;width:100%;border:1px solid #d8dde6;border-radius:8px;padding:12px;color:var(--navy);background:#fff;outline-offset:2px}input:focus,select:focus{outline:2px solid #7291ff}.full{width:100%;margin-top:12px;display:flex;justify-content:space-between}.help{font-size:12px}.fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.fields.three{grid-template-columns:1fr 1fr 1fr;gap:8px}.fields input{min-width:0}.photos{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;max-height:220px;overflow:auto}.photo{padding:0;border:2px solid transparent;border-radius:7px;overflow:hidden;aspect-ratio:1;background:#f2f3f6}.photo.selected{border-color:var(--blue)}.photo img{width:100%;height:100%;object-fit:cover;display:block}.preview-top{display:flex;justify-content:space-between;align-items:center}.live-label{font-size:9px;letter-spacing:2px;color:var(--muted)}.formats{display:flex;gap:6px;margin:22px 0;background:#f1f3f7;padding:5px;border-radius:10px}.formats button{flex:1;background:none;border:0;border-radius:7px;padding:9px;color:var(--muted);font-weight:bold;font-size:14px}.formats small{font-size:11px;margin-left:7px;font-weight:normal}.formats .selected{background:#fff;color:var(--navy);box-shadow:0 2px 7px #0001}.canvas-area{min-height:445px;background:#edf0f4;border-radius:10px;padding:24px;display:flex;align-items:center;justify-content:center;overflow:hidden}canvas{width:auto;height:auto;max-width:100%;max-height:650px;box-shadow:0 7px 24px #001a3530}#empty{text-align:center;padding:40px 16px}#empty h3{font-size:18px}.empty-icon{font-size:50px;color:#b1bed4}.download-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:22px}.download-bar strong{font-size:12px}.download-bar small{display:block;font-size:11px;color:var(--muted)}.secondary{border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--navy);padding:12px;font-size:12px}.error{color:#bf2034;font-size:13px}.ephemeral{text-align:center;font-size:12px;margin:26px 0}footer{border-top:1px solid var(--line);padding:24px 5vw;color:#8991a0;font-size:10px;letter-spacing:1px;display:flex;justify-content:space-between}#status{font-size:13px}input[type=range]{padding:0;border:0;accent-color:var(--blue)}@media(max-width:950px){.workspace{grid-template-columns:300px minmax(0,1fr)}.formats small{display:block;margin:0}.download-bar{flex-wrap:wrap}.download-bar .primary{flex:1}.canvas-area{padding:14px}}@media(max-width:720px){.top{height:72px;padding:0 20px}.private{display:none}main{padding:28px 18px}.login{padding-top:18px}.login h1{font-size:44px}.welcome{align-items:start;flex-direction:column;gap:18px}h1{font-size:30px}.account .avatar{width:40px;height:40px}.account{align-items:center}.workspace{grid-template-columns:1fr}.panel,.preview-panel{padding:19px}.canvas-area{min-height:340px}.formats small{display:inline;margin-left:5px}.login-formats{gap:20px}.login-formats small{display:block;margin:0}.download-bar .primary{width:100%;flex:auto}.download-bar{gap:16px}.secondary{width:100%}canvas{max-height:600px}footer span{display:none}}

/* Compact working view: branding, account and the card controls. */
.top{height:82px}.brand{gap:14px}.brand img{display:block;width:144px;height:68px;object-fit:contain}.brand strong{font-size:12px}.account{min-width:0;font-size:13px}.account .text-button{margin-left:4px}main{padding-top:24px}#status:empty{display:none}@media(max-width:720px){.top{height:72px;padding:0 18px}.brand img{width:112px;height:56px}.brand{gap:8px}.brand strong{font-size:10px;letter-spacing:1px}.account{gap:8px;font-size:12px}main{padding-top:18px}}

/* Touch-first selection and one batch export, with no persisted editor state. */
.mode-switch{display:flex;gap:4px;padding:4px;background:#f1f3f7;border-radius:10px}.mode-switch button{flex:1;min-height:44px;background:transparent;border:0;border-radius:7px;color:var(--muted);font-size:13px;font-weight:700}.mode-switch .selected{background:#fff;color:var(--navy);box-shadow:0 2px 7px #0001}.photo{position:relative;min-height:44px}.photo-number{position:absolute;right:3px;top:3px;background:var(--blue);color:white;min-width:22px;height:22px;line-height:22px;border-radius:50%;font-weight:700;font-size:12px}.photo-number:empty{display:none}.photo.selected{box-shadow:0 0 0 1px var(--blue)}.preview-nav{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;margin:0 0 16px}.preview-nav .secondary{width:44px;min-height:44px;font-size:20px;padding:4px}.preview-nav strong{font-size:13px;min-width:96px;text-align:center}.preview-nav .text-button{min-height:44px;padding:4px 8px}.download-bar{flex-wrap:wrap}.download-bar>div{width:100%}.download-bar button{min-height:48px;flex:1;white-space:nowrap}.download-bar .primary{font-size:14px}#downloadStatus:empty{display:none}#selectionHint{font-size:12px;line-height:1.6}#exportHint:empty{display:none}[inert]{opacity:.6}
@media(max-width:720px){input:not([type=range]),select{font-size:16px}.photos{max-height:280px}.preview-nav{gap:8px}.preview-nav .text-button{font-size:12px}.download-bar{gap:10px}.download-bar button{width:100%;flex:auto}.preview-panel{scroll-margin-top:16px}.fields.three{gap:8px}}

/* The full-screen crop editor keeps touch controls and image together. */
.canvas-area{position:relative;padding-bottom:70px}.edit-photo-button{position:absolute;bottom:14px;left:50%;transform:translateX(-50%);border:1px solid #d8dde6;border-radius:24px;padding:10px 18px;background:#fff;color:var(--navy);font-weight:700;min-height:44px;box-shadow:0 3px 12px #102b4c12;white-space:nowrap}.edit-photo-button span{margin-left:8px;font-size:19px}
#photoEditor{padding:0;border:0;background:#f4f5f8;color:var(--navy);width:100vw;max-width:none;height:100vh;height:100dvh;max-height:none;margin:0;overflow:hidden;overscroll-behavior:contain}#photoEditor[open]{display:flex;flex-direction:column}#photoEditor::backdrop{background:#102b4ccc}.editor-header{display:flex;align-items:center;justify-content:space-between;padding:max(10px,env(safe-area-inset-top)) 18px 2px;background:#fff;flex:none}.editor-header h2{font-size:18px}.editor-close{width:44px;height:44px;background:transparent;border:0;font-size:32px;line-height:1;color:var(--navy)}#editorHelp{font-size:12px;text-align:center;margin:0;padding:5px 12px 10px;background:#fff;flex:none}.editor-body{flex:1;min-height:0;display:flex;justify-content:center;align-items:center;overflow:hidden;padding:8px 12px}.editor-body canvas{touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab;box-shadow:0 4px 20px #102b4c22;max-width:100%;max-height:100%;outline-offset:2px}.editor-body canvas.dragging{cursor:grabbing}.editor-toolbar{display:flex;align-items:center;justify-content:center;gap:10px;padding:8px 16px;flex:none;background:#fff}.editor-toolbar button{min-width:48px;height:48px;border:1px solid #d8dde6;border-radius:12px;background:#fff;font-size:25px;font-weight:700;color:var(--navy)}.editor-toolbar output{min-width:54px;text-align:center;font-size:14px;font-weight:700}.editor-toolbar .reset-crop{font-size:13px;padding:0 14px;margin-left:8px}.editor-done{flex:none;margin:0 16px max(12px,env(safe-area-inset-bottom));min-height:48px}body:has(#photoEditor[open]){overflow:hidden}
@media(min-width:721px){#photoEditor{width:min(920px,96vw);height:94vh;height:94dvh;margin:auto;border-radius:18px}.editor-done{max-width:380px;width:calc(100% - 32px);align-self:center}}

.cta-label{display:flex;justify-content:space-between;align-items:baseline;gap:12px}.cta-label span{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}

/* Larger touch targets beside the preview on phones and desktops. */
.canvas-area{padding-bottom:92px}
.edit-photo-button{width:calc(100% - 32px);max-width:360px;min-height:56px;bottom:16px;padding:14px 20px;border-radius:14px;font-size:16px;touch-action:manipulation}
.edit-photo-button span{font-size:24px;vertical-align:middle}
.preview-nav{display:grid;grid-template-columns:64px minmax(0,1fr) 64px;gap:10px;max-width:440px;margin:0 auto 18px}
.preview-nav .secondary{width:64px;height:56px;min-height:56px;padding:0;display:grid;place-items:center;border-color:#bbc6d8;font-size:30px;font-weight:700;touch-action:manipulation}
.preview-nav strong{min-width:0;font-size:14px}
.preview-nav .text-button{grid-column:1/-1;justify-self:center;min-height:44px;padding:8px 18px;font-size:13px;touch-action:manipulation}
.preview-nav button:disabled{opacity:.28}
.photo-count-control{margin:0 0 18px}.photo-count-control>label{margin-top:0}.photo-count-control .mode-switch button{min-height:48px;font-size:14px}.photo-count-control .help{margin-bottom:0}.editor-photo-tabs{flex:none;margin:0;padding:4px 16px;background:#fff;border-radius:0;gap:8px}.editor-photo-tabs button{background:#f1f3f7;min-height:44px}.editor-photo-tabs .selected{background:var(--navy);color:#fff}
.ad-guide-control{margin:0 0 14px}.ad-guide-control label{display:flex;align-items:center;gap:10px;margin:0;min-height:44px;font-size:13px;cursor:pointer}.ad-guide-control input[type=checkbox]{display:block;flex:none;width:22px;height:22px;margin:0;padding:0;accent-color:var(--blue)}.ad-guide-control small{display:block;font-size:11px;color:var(--muted);margin-left:32px}.editor-guide-control{flex:none;margin:0;padding:0 18px 8px;background:#fff}.editor-guide-control label{justify-content:center}.editor-guide-control small{text-align:center;margin:0}

/* Editable captions stay with the export controls, including both public links. */
.caption-panel{border-top:1px solid var(--line);margin-top:24px;padding-top:24px}.caption-panel textarea{display:block;width:100%;min-height:310px;resize:vertical;border:1px solid #d8dde6;border-radius:10px;background:#fff;color:var(--navy);font:15px/1.6 Arial,sans-serif;padding:14px;overflow-wrap:anywhere;outline-offset:2px}.caption-panel textarea:focus{outline:2px solid #7291ff}.caption-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;font-size:12px;color:var(--muted)}.caption-meta .text-button{min-height:44px;padding:8px 0;text-align:right}#copyCaption{margin-top:0;min-height:52px;font-size:16px}#captionStatus:empty{display:none}@media(max-width:720px){.caption-panel textarea{font-size:16px}}

.template-control{margin-top:18px}.template-control>label{margin-top:0}.template-control .mode-switch button{min-height:48px;font-size:14px}#templateHint{margin:8px 0 0}.template-control+.formats{margin-top:14px}.editor-photo-tabs button{min-width:0}

/* Choose the model before importing or editing its own fields. */
#studio>.template-control{margin:0 0 20px;max-width:650px}.template-control .mode-switch button{min-width:0;min-height:52px}.template-control>label{margin-top:0}

.broker-login{max-width:710px;margin:clamp(18px,7vh,100px) auto 32px}
.broker-panel{display:grid;grid-template-columns:minmax(140px,210px) minmax(0,1fr);gap:clamp(24px,4vw,48px);align-items:center;padding:clamp(24px,4vw,48px);background:#fff;border:1px solid var(--line);border-radius:18px}
.broker-portrait{display:block;width:100%;height:auto;aspect-ratio:3/4;object-fit:cover;object-position:50% 20%;border-radius:10px;background:#f3f3f3}
.broker-entry h1{font-size:clamp(28px,4vw,40px);line-height:1.1;overflow-wrap:break-word}
.broker-entry .registration{margin:9px 0 26px;color:#515969;font-size:14px}
.broker-entry .primary{min-height:48px;background:#003da5}
.broker-entry input{min-height:48px;font-size:16px}
.broker-entry .error:empty{display:none}
@media(max-width:580px){.broker-login{margin:4px auto 24px;max-width:380px}.broker-panel{grid-template-columns:1fr;padding:22px;gap:19px}.broker-portrait{width:132px;justify-self:center}.broker-entry h1,.broker-entry .registration{text-align:center}.broker-entry h1{font-size:30px}.broker-entry .registration{margin-bottom:20px}.top .account{min-width:0}.account strong{line-height:1.2;text-align:right}}

@media(max-width:520px){#templateControl .mode-switch{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}}

#priceAndOperation.campaign-only{grid-template-columns:1fr}#campaignPriceSummary{display:block;white-space:pre-line}

#filmPreview{scroll-margin-top:14px}
.film-title{margin:0 0 14px;font-size:1.3rem;color:var(--navy)}
.film-canvas{display:block;width:auto;max-width:100%;height:min(50vh,460px);height:min(50dvh,460px);aspect-ratio:9/16;margin:0 auto;border-radius:8px;background:#0c1b33}
.film-wide{width:100%;min-height:46px;display:flex;align-items:center;justify-content:center;margin-top:8px;text-decoration:none}
.film-settings{margin-top:16px}.film-settings fieldset{min-width:0;border:0;padding:0;margin:0 0 14px}
.film-settings legend{font-weight:700;margin:0 0 8px;padding:0}.film-settings .mode-switch button{min-height:46px}
.film-status{font-size:.9rem;color:#36425a;margin:8px 0 0}
.film-progress{margin:14px 0 10px;padding:15px;background:#eef3ff;border:1px solid #d7e2fc;border-radius:10px;color:var(--navy)}
.film-progress-heading{display:flex;justify-content:space-between;align-items:baseline;gap:12px;font-size:13px;line-height:1.4}
.film-progress-heading span{color:#003da5;font-weight:700;font-variant-numeric:tabular-nums;flex-shrink:0}
.film-progress progress{display:block;width:100%;height:10px;margin:11px 0 9px;border:0;border-radius:20px;overflow:hidden;appearance:none;background:#d9e2f3;accent-color:#003da5}
.film-progress progress::-webkit-progress-bar{background:#d9e2f3;border-radius:20px}
.film-progress progress::-webkit-progress-value{background:#003da5;border-radius:20px;transition:width .18s linear}
.film-progress progress::-moz-progress-bar{background:#003da5;border-radius:20px}
.film-progress progress:indeterminate{background:linear-gradient(90deg,#d9e2f3 25%,#6d94df 50%,#d9e2f3 75%);background-size:200% 100%;animation:film-progress-wait 1.5s linear infinite}
.film-progress progress:indeterminate::-webkit-progress-bar{background:transparent}
.film-progress small{display:block;color:#455470;font-size:12px;line-height:1.5}
@keyframes film-progress-wait{to{background-position:-200% 0}}
@media(prefers-reduced-motion:reduce){.film-progress progress:indeterminate{animation:none}.film-progress progress::-webkit-progress-value{transition:none}}
.manual-media{margin:20px 0;padding:16px;border:1px solid #d9e2f3;border-radius:12px;background:#f6f8fc}
.manual-media-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.manual-media-actions button{min-height:44px;padding:10px 8px}
.clip-source{width:100%;max-height:280px;background:#0c1b33;border-radius:12px}
.clip-settings{display:flex;flex-wrap:wrap;align-items:center;gap:16px;margin:16px 0}
.clip-settings label{display:flex;gap:8px;align-items:center}
.clip-settings input[type=checkbox]{width:auto}
.clip-actions{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}
.clip-preview{display:block;width:100%;height:auto;max-height:75vh;object-fit:contain;background:#edf1f8}
