.download-ready{position:fixed;z-index:20;bottom:22px;right:22px;max-width:min(430px,calc(100vw - 32px));padding:17px 42px 17px 20px;background:#fff;border:1px solid #e7b8d6;border-radius:10px;box-shadow:0 10px 40px #a22c661b;font-size:14px}.download-ready span{display:block;color:#66596c;margin-bottom:5px}.download-ready a{color:#a31e65;font-weight:700;overflow-wrap:anywhere;text-decoration:underline}.download-ready button{position:absolute;right:10px;top:8px;font-size:24px}.download-ready~.toast{bottom:110px}
@font-face{font-family:Anton;src:url("./fonts/Anton-Regular.ttf") format("truetype");font-weight:400;font-style:normal;font-display:block}.reference-role{padding:10px 12px;border-radius:6px;background:#f8edf7;color:#7626a1;font-size:13px;font-weight:700}.highlight-tools{display:flex;flex-wrap:wrap;gap:6px 12px;margin-top:9px}.highlight-button{font-size:13px;font-weight:700;padding:10px;border-radius:6px;background:#ffed00;color:#181818}.checkbox-label{display:flex;align-items:center;gap:8px;font-size:13px;line-height:1.5;font-weight:400}.checkbox-label input{width:16px!important;height:16px;accent-color:#a31e65}output{font-size:12px;color:#66596c}#caption{font-size:16px;line-height:1.5}#referenceSettings{margin-top:24px;padding:14px;border:1px solid #eee5ed;border-radius:7px}#referenceSettings summary{font-size:14px;cursor:pointer;font-weight:600}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}.settings-grid label{font-size:12px}.settings-grid input{margin-top:7px}#referenceColor input{height:36px}
#videoControls{margin:20px 0;padding:15px;background:#f8edf7;border:1px solid #e6d7e3;border-radius:8px}#videoTime{font-size:12px;white-space:nowrap}.export-progress{display:grid;gap:12px;max-width:750px;margin:16px auto;background:#fff;padding:20px;border:1px solid #e7b8d6;border-radius:9px}.export-progress progress{width:100%;accent-color:#a31e65}.export-progress small{color:#66596c;font-size:12px}.export-progress .secondary{justify-self:start}
#exportedVideo{display:block;max-width:100%;height:190px;margin:12px auto 0;background:#000}#exportedVideoDetails{display:block;margin-top:7px;color:#66596c}
@font-face{font-family:Raleway;src:url("./fonts/Raleway.ttf") format("truetype");font-weight:100 900;font-style:normal;font-display:block}@font-face{font-family:Raleway;src:url("./fonts/Raleway-Italic.ttf") format("truetype");font-weight:100 900;font-style:italic;font-display:block}
.content-toolbar{display:flex;flex-wrap:wrap;gap:5px;margin:10px 0}.content-toolbar button{border:1px solid #e6d7e3;border-radius:5px;padding:7px 9px;font-size:12px;background:#faf8fb}.content-toolbar button:first-child{background:#dfe9ec;color:#375761}.content-settings{border:1px solid #eee5ed;padding:12px;margin:18px 0;border-radius:8px}.content-settings summary{font-size:14px;font-weight:600;cursor:pointer}#contentRoleHint{background:#e7eeef;color:#425e65}.content-intro{padding:12px;background:#f4f0e8;border-radius:8px;color:#54686f}#content2Title,#content2Body{font-size:15px}
.illustration-request{border-top:1px solid #eee5ed;margin-top:22px;padding-top:10px}.illustration-request h3{font-size:15px;margin-bottom:0}.illustration-request .secondary{margin:8px 6px 0 0}#contentOverlayOptions{padding:12px;background:#faf8fb;border-radius:8px}#applyClientPattern{margin:8px 0}#slideColorSettings{background:#faf8fb}

@font-face {
  font-family: Manrope;
  src: url("./fonts/manrope-variable.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}
* { box-sizing: border-box; }
:root {
  font-family: Manrope, "Segoe UI", sans-serif;
  color: #241b29;
  background: #faf8fb;
  --ink: #241b29;
  --muted: #66596c;
  --accent: #a31e65;
  --line: #eee5ed;
  --shadow: 0 12px 32px #a22c661b;
}
body { margin: 0; font-size: 14px; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button { color: inherit; border: 0; background: none; cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; }
:focus-visible { outline: 3px solid #ce77b4; outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(22px, 2.3vw, 30px); letter-spacing: -.8px; }
h2 { font-size: 17px; letter-spacing: -.25px; }
h3 { font-size: 15px; }
p { line-height: 1.55; }
.topbar {
  min-height: 70px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 26px; background: white; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; font-size: 21px; font-weight: 800; letter-spacing: -.7px; }
.brand-icon {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(145deg,#d6415b,#8626b3); color: white; font-size: 24px;
  box-shadow: 0 5px 12px #a22c661b;
}
.project-actions, .row { display: flex; align-items: center; gap: 9px; }
.project-actions { flex-wrap: wrap; }
.spread { justify-content: space-between; }
.primary, .secondary {
  padding: 9px 13px; min-height: 36px; border: 1px solid var(--line); border-radius: 9px;
  background: white; font-size: 13px; font-weight: 750;
}
.primary { color: white; background: linear-gradient(140deg,#d6415b,#8626b3); border-color: #a31e65; }
.primary:not(:disabled):hover { background: #a31e65; }
.secondary:not(:disabled):hover { background: #fff2f7; border-color: #e7b8d6; }
.button-tag { opacity: .8; margin-left: 5px; font-size: 10px; }
.workspace {
  display: grid; grid-template-columns: minmax(175px, 220px) minmax(260px, 1fr) minmax(300px, 365px);
  grid-template-areas: "sequence preview editor";
  height: calc(100dvh - 70px);
  min-height: 400px;
}
.filmstrip-wrap, .editor, .preview-area { min-height: 0; min-width: 0; }
.filmstrip-wrap {
  grid-area: sequence; display: flex; flex-direction: column; background: white;
  border-right: 1px solid var(--line); padding: 21px 13px 12px;
}
.sequence-heading { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin: 0 4px 14px; }
#slideTotal, .dimensions { background: #fff2f7; color: #7626a1; border-radius: 7px; padding: 4px 8px; font-size: 11px; font-weight: 750; white-space: nowrap; }
.add-slide { width: 100%; color: #a31e65; }
.drag-hint { margin: 11px 3px 5px; font-size: 11px; color: var(--muted); }
.filmstrip { overflow: auto; padding: 5px 3px 10px; scrollbar-width: thin; }
.slide-card { position: relative; display: flex; align-items: stretch; margin-bottom: 7px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.slide-card.active { border-color: #ce77b4; background: #fff2f7; }
.slide-card.dragging { opacity: .52; }
.slide-card.drop-before::before, .slide-card.drop-after::after { position: absolute; z-index: 1; content: ""; height: 3px; left: 0; right: 0; background: var(--accent); border-radius: 2px; pointer-events: none; }
.slide-card.drop-before::before { top: -5px; }
.slide-card.drop-after::after { bottom: -5px; }
.thumbnail { display: grid; grid-template-columns: 39px minmax(0,1fr); grid-template-rows: auto auto; align-content: center; flex: 1; min-width: 0; gap: 2px 8px; padding: 7px; text-align: left; }
.thumbnail canvas { grid-row: span 2; width: 39px; height: auto; align-self: center; border-radius: 4px; background: #241b29; }
.thumbnail small { color: var(--muted); font-size: 10px; white-space: nowrap; }
.thumbnail span { font-size: 11px; font-weight: 750; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.slide-handle { display: grid; place-items: center; width: 25px; flex: 0 0 25px; color: #66596c; cursor: grab; touch-action: none; user-select: none; font-size: 20px; }
.slide-handle:active { cursor: grabbing; }
.editor {
  grid-area: editor; overflow-y: auto; scrollbar-width: thin; background: white;
  border-left: 1px solid var(--line); padding: 21px 20px 27px;
}
.editor-heading { margin-bottom: 12px; }
.tabs { display: flex; gap: 5px; padding: 4px; background: #f8edf7; border-radius: 10px; margin-bottom: 16px; }
.tabs button { flex: 1; border-radius: 7px; padding: 8px 5px; font-size: 12px; font-weight: 750; color: var(--muted); }
.tabs button[aria-selected=true] { color: #a31e65; background: white; box-shadow: 0 1px 3px #a22c661b; }
.section-heading { margin: 13px 0; }
.group-title { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); }
label { display: block; margin: 13px 0 6px; font-size: 13px; font-weight: 700; }
.counter, output, .help-note { color: var(--muted); font-size: 12px; }
.help-note { margin: 9px 0 13px; }
textarea, select, input[type=text], input[type=number], input:not([type]) {
  width: 100%; padding: 8px 10px; border: 1px solid #e6d7e3; border-radius: 8px; background: #faf8fb; color: var(--ink);
}
textarea { resize: vertical; min-height: 62px; }
input[type=range] { width: 100%; accent-color: var(--accent); }
input[type=color] { display: block; width: 100%; min-height: 34px; background: white; border: 1px solid var(--line); border-radius: 7px; margin-top: 5px; }
.upload { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px dashed #ce77b4; border-radius: 9px; background: #fff2f7; color: #7626a1; cursor: pointer; }
.upload input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.upload:focus-within { outline: 3px solid #ce77b4; outline-offset: 2px; }
.upload small { display: block; color: var(--muted); font-weight: 500; }
.upload-icon { font-size: 20px; }
.text-button { color: #a31e65; font-weight: 750; padding: 5px 0; font-size: 12px; }
.text-button:hover { text-decoration: underline; }
.danger { color: #a1374d; }
.color-grid, .settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 10px; }
.palettes { display: flex; flex-wrap: wrap; gap: 6px; }
.palettes button { border: 1px solid var(--line); border-radius: 7px; padding: 6px; font-size: 11px; }
.palettes span { display: inline-block; width: 8px; height: 10px; }
.template-actions { margin-top: 18px; flex-wrap: wrap; }
.preview-area { grid-area: preview; padding: 21px clamp(13px,2.5vw,34px); overflow-y: auto; }
.preview-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.preview-toolbar p { color: var(--muted); margin-top: 4px; }
.stage {
  min-height: 235px; height: calc(100dvh - 245px); display: flex; align-items: center; justify-content: center;
  padding: 15px; border: 1px solid var(--line); border-radius: 14px; background-color: #f8edf7;
  background-image: radial-gradient(#e6d7e3 1px, transparent 1px); background-size: 17px 17px;
}
.stage canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 9px 26px #a22c661b; }
.preview-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.preview-actions .row { flex-wrap: wrap; justify-content: flex-end; }
#slidePosition { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 750; }
.icon-button { border: 1px solid var(--line); border-radius: 7px; width: 30px; height: 30px; background: white; }
.icon-button:not(:disabled):hover { background: #fff2f7; }
.separator { height: 16px; width: 1px; background: var(--line); }
.warning { margin-top: 11px; border: 1px solid #f0d7a8; border-radius: 9px; padding: 9px 12px; background: #fff8ea; color: #79490f; font-size: 12px; }
dialog { width: min(560px, calc(100% - 28px)); padding: 25px; color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
dialog::backdrop { background: #36203c80; }
dialog h2, dialog p { margin-bottom: 12px; }
dialog p { color: var(--muted); }
.dialog-close { position: absolute; top: 7px; right: 8px; font-size: 23px; }
#bulkDialog > .primary { width: 100%; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: 18px; transform: translateX(-50%); max-width: 90vw; padding: 12px 17px; color: white; background: var(--ink); border-radius: 9px; box-shadow: var(--shadow); }
.toast.error { background: #8f2340; }
@media (max-width: 800px) {
  .topbar { padding: 9px 14px; }
  .brand { font-size: 17px; }
  .workspace { height: auto; grid-template-columns: minmax(0,1fr); grid-template-areas: "sequence" "preview" "editor"; }
  .filmstrip-wrap { display: grid; grid-template-columns: 1fr auto; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 13px 5px; }
  .sequence-heading { justify-content: flex-start; margin: 0; }
  .drag-hint, .filmstrip { grid-column: 1 / -1; }
  .filmstrip { display: flex; gap: 7px; }
  .slide-card { flex: 0 0 143px; margin: 0; }
  .slide-card.drop-before::before, .slide-card.drop-after::after { height: auto; width: 3px; top: 0; bottom: 0; }
  .slide-card.drop-before::before { left: -5px; right: auto; }
  .slide-card.drop-after::after { right: -5px; left: auto; }
  .preview-area { padding: 14px; }
  .stage { height: min(53vh, 475px); }
  .editor { border-left: 0; border-top: 1px solid var(--line); padding: 15px; }
  .preview-actions .separator { display: none; }
}

.brand #projectTitle { max-width: min(420px,60vw); overflow-wrap: anywhere; }
.brand-icon { flex-shrink: 0; }
.project-actions a { display: inline-grid; place-items: center; color: #a31e65; text-decoration: none; }


/* Shared wordmark */
.studio-wordmark { display:inline-flex; align-items:center; gap:10px; white-space:nowrap; color:inherit; font:800 21px/1 Manrope,"Segoe UI",sans-serif; letter-spacing:-.8px; }
.studio-wordmark small { margin-left:5px; color:#66596c; font-size:.62em; font-weight:750; letter-spacing:0; }
.studio-mark { position:relative; display:grid; place-items:center; flex:none; width:39px; height:39px; border-radius:12px; background:linear-gradient(35deg,#f9a326 3%,#f04c39 27%,#d62478 56%,#863bd3 92%); color:#fff; box-shadow:0 5px 12px #a22c6630; }
.studio-mark svg { display:block; width:70%; height:70%; margin:auto; }
.editor-identity { display:flex; min-width:0; align-items:center; gap:16px; }
.editor-identity #projectTitle { max-width:min(300px,40vw); border-left:1px solid var(--line); padding-left:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:750; }
.preview-label { display:block; margin-bottom:4px; color:var(--muted); font-size:11px; font-weight:750; }
.stage { background-image:none; background-color:#f8edf7; }

#compareTemplates{margin-top:5px}#templateExamples{width:min(720px,94vw);max-height:90dvh;overflow:auto}#templateExamples section{margin-top:20px}#templateExamples figure{min-width:0;margin:0}#templateExamples figcaption{font-size:12px;color:var(--muted);margin-top:5px}.template-example-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:8px}.template-example-grid canvas{display:block;width:100%;height:auto;aspect-ratio:4/5;object-fit:contain;background:#f8edf7;border-radius:5px}
#templateExamples{max-width:860px;width:min(860px,95vw);padding:23px}
.gallery-layout{display:grid;grid-template-columns:minmax(185px, .75fr) minmax(0,1.3fr);gap:20px}
.gallery-options{display:grid;align-content:start;gap:9px}
.gallery-options button[data-preview-model]{text-align:left;border:1px solid var(--line);background:#fff;border-radius:9px;padding:12px}
.gallery-options button[aria-pressed=true]{border-color:#a31e65;background:#fff2f7}
.gallery-options small{display:block;color:var(--muted);margin-top:4px}
.gallery-stage{min-width:0;text-align:center;background:#faf8fb;border-radius:10px;padding:12px}
.gallery-stage canvas{display:block;width:auto;max-width:100%;height:auto;max-height:57dvh;margin:auto}
.gallery-nav{display:flex;justify-content:center;align-items:center;gap:12px;margin:10px 0}
#newsReference img{display:block;width:min(100%,350px);margin:8px auto 0}
@media(max-width:590px){.gallery-layout{grid-template-columns:1fr;gap:10px}.gallery-stage canvas{max-height:46dvh}}


:root{
  --studio-action:linear-gradient(130deg,#c83c22 0%,#b3185c 48%,#7626a9 100%);
  --studio-action-hover:linear-gradient(130deg,#b3301c 0%,#99124c 48%,#64218f 100%);
}
.primary{background:var(--studio-action);border-color:transparent}
.primary:not(:disabled):hover{background:var(--studio-action-hover)}
