@font-face{font-family:Manrope;src:url('assets/manrope.ttf');font-weight:200 800;font-display:swap}
@font-face{font-family:Cormorant;src:url('assets/cormorantgaramond.ttf');font-weight:300 700;font-display:swap}
:root{--studio-bg:#e8edf2;--studio-panel:#fbfcfd;--studio-ink:#253746;--studio-muted:#697988;--studio-accent:#426785;--studio-line:#d8e0e7;--studio-selected:#e4eef6;--studio-ui:Manrope,'PingFang SC','Microsoft YaHei',sans-serif;--studio-display:'Songti SC','Noto Serif CJK SC',Cormorant,serif;color-scheme:light}
*{box-sizing:border-box}body{margin:0;background:var(--studio-bg);color:var(--studio-ink);font:14px/1.6 var(--studio-ui);-webkit-font-smoothing:antialiased}button,input,select,textarea{font:inherit}button,a{touch-action:manipulation}button{padding:9px 13px;min-height:38px;border:0;border-radius:6px;background:#edf2f6;color:var(--studio-ink);cursor:pointer;transition:background .16s,color .16s}button:hover{background:#dfe9f1}button:disabled{opacity:.55;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--studio-accent);outline-offset:3px}.primary{background:var(--studio-accent);color:white}.primary:hover{background:#335772}a{color:inherit}h1,h2,h3,p{margin-top:0}h1,h2,h3{font-weight:500}.kicker{font-size:12px;color:var(--studio-muted);font-weight:500;letter-spacing:0}.small-note{font-size:12px;line-height:1.8;color:var(--studio-muted);margin:16px 0}.danger{color:#9b4d47}[hidden]{display:none!important}
.library-header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:26px 6vw;border-bottom:1px solid var(--studio-line);background:var(--studio-panel)}.brand{display:flex;align-items:baseline;gap:16px;font:24px/1.4 var(--studio-display);text-decoration:none}.brand span{font:12px/1.5 var(--studio-ui);color:var(--studio-muted)}.library-imports{display:flex;gap:8px;align-items:center}.library-header>button,.library-imports>button{background:transparent;font-size:13px}.library-header>button:hover,.library-imports>button:hover{background:#e8eff5}.library{max-width:1450px;margin:auto;padding:68px 6vw 64px}.library-intro{display:flex;align-items:center;justify-content:space-between;gap:40px;margin-bottom:60px}.library-intro .kicker{display:none}.library-intro h1{font:clamp(32px,4vw,50px)/1.3 var(--studio-display);letter-spacing:.02em;margin:8px 0 20px}.library-intro p:last-child{max-width:48ch;color:var(--studio-muted);line-height:1.9;font-size:14px;margin:0}.big{font-size:14px;padding:15px 25px;min-height:52px;white-space:nowrap;border-radius:7px}.library-heading{display:flex;align-items:baseline;justify-content:space-between;gap:24px;margin-bottom:24px}.library-heading h2{font:22px/1.4 var(--studio-display);margin:0}.library-heading span{font-size:12px;color:var(--studio-muted)}.project-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px}.project-card{background:var(--studio-panel);border-radius:9px;overflow:hidden;transition:box-shadow .2s}.project-card:hover{box-shadow:0 10px 30px #2537460d}.project-thumb{aspect-ratio:16/10;display:grid;place-items:center;background:#dbe4ec;overflow:hidden}.project-thumb img{width:100%;height:100%;object-fit:cover}.project-thumb span{font:46px/1.2 Cormorant,Georgia,serif;color:#5b7082}.project-info{padding:24px}.project-info h3{font-size:17px;line-height:1.65;margin-bottom:10px;overflow-wrap:break-word}.project-info p{color:var(--studio-muted);font-size:12px;margin-bottom:22px}.project-actions{display:flex;gap:6px;flex-wrap:wrap}.project-actions button{font-size:12px;padding:7px 12px;min-height:34px}.project-actions button:not(.primary){background:transparent}.empty{grid-column:1/-1;min-height:200px;display:grid;place-content:center;justify-items:center;background:#f2f6f9;border-radius:8px;color:var(--studio-muted);padding:40px}.empty p{font:23px/1.6 var(--studio-display)}.example{display:flex;align-items:center;gap:30px;margin-top:56px;padding-top:32px;border-top:1px solid var(--studio-line)}.example-art{width:180px;aspect-ratio:1.3;flex:none;background:#dbe4ec center/cover;border-radius:5px}.example .kicker{display:none}.example h2{font:32px/1.25 Cormorant,Georgia,serif;margin-bottom:10px}.example p{font-size:13px;color:var(--studio-muted)}.example #legacy-link{display:inline-flex;align-items:center;gap:32px;padding:10px 18px;border-radius:5px;background:var(--studio-accent);color:#fff;font-size:13px;text-decoration:none}.library-footer{padding:26px 6vw;border-top:1px solid var(--studio-line);font:12px/1.8 var(--studio-ui);color:var(--studio-muted)}
.editor-header{height:76px;display:grid;grid-template-columns:minmax(240px,1fr) auto auto;align-items:center;gap:16px;padding:14px 24px;background:var(--studio-panel);border-bottom:1px solid var(--studio-line)}.project-context,.project-save,.project-export{display:flex;align-items:center;gap:6px;min-width:0}.project-context{gap:16px}.project-context #project-name{width:100%;min-width:0;max-width:450px;border:0;border-left:1px solid var(--studio-line);border-radius:0;padding:5px 0 5px 18px;background:transparent;font-size:14px;font-weight:500;color:var(--studio-ink)}.editor-header button,.editor-header button.primary{flex:none;border:0;background:transparent;color:var(--studio-ink);font:13px/1.5 var(--studio-ui);padding:9px 10px;min-height:38px;white-space:nowrap;box-shadow:none}.editor-header button:hover{background:#e8eff5}.editor-header #save-status{font-size:11px;color:var(--studio-muted);white-space:nowrap;margin-right:6px}.project-export{border-left:1px solid var(--studio-line);padding-left:12px}.workspace{height:calc(100svh - 76px);display:grid;grid-template-columns:232px minmax(0,1fr) 312px}.workspace.inspector-closed{grid-template-columns:232px minmax(0,1fr)}.inspector-closed .inspector{display:none}.structure,.inspector{overflow:auto;background:var(--studio-panel);scrollbar-width:thin;scrollbar-color:#c4d0da transparent}.structure{padding:28px 20px;border-right:1px solid var(--studio-line)}.structure>.kicker{display:none}.structure h2{font:21px/1.4 var(--studio-display);margin:0 0 24px}.structure h3{font-size:12px;color:var(--studio-muted);margin-bottom:12px}.structure hr{border:0;border-top:1px solid var(--studio-line);margin:26px 0}.page-entry,.block-entry{width:100%;display:flex;align-items:flex-start;gap:11px;text-align:left;margin:4px 0;padding:12px 10px;background:transparent;border-radius:6px;font-size:13px;line-height:1.7;overflow-wrap:break-word}.page-entry>span,.block-entry>span{flex:0 0 24px;color:#8293a2;white-space:nowrap;font-size:11px;padding-top:2px}.page-entry.active,.block-entry.active{background:var(--studio-selected);color:#244c6c}.page-entry.active>span,.block-entry.active>span{color:var(--studio-accent)}.block-entry{font-size:12px;padding:9px 10px}.structure>button{width:100%;font-size:13px;margin-top:8px;background:#edf3f7}.add-blocks{display:none}
.preview-wrap{min-width:0;display:flex;flex-direction:column;align-items:center;padding:20px 24px;background:var(--studio-bg)}.preview-bar{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:0 0 14px;color:var(--studio-muted)}.canvas-insert,.canvas-view{display:flex;align-items:center;gap:5px;flex-wrap:wrap}.canvas-insert{gap:8px}.preview-bar button,.preview-bar select{font:13px/1.5 var(--studio-ui);padding:7px 10px;border:0;background:transparent;min-height:36px;color:var(--studio-ink);border-radius:5px;white-space:nowrap}.preview-bar button:hover{background:#dbe6ef}.preview-bar #insert-text,.preview-bar #insert-image{background:var(--studio-panel);padding:8px 14px}.preview-bar label{display:flex;align-items:center;gap:7px;font-size:12px;white-space:nowrap;margin-right:8px}.preview-bar input[type=checkbox]{accent-color:var(--studio-accent);width:14px;height:14px}.canvas-caption{width:100%;font-size:11px;line-height:1.5;color:var(--studio-muted);margin:0 0 10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.preview-wrap iframe{width:100%;flex:1;height:auto;min-height:0;border:0;border-radius:5px;background:#fff;box-shadow:0 8px 34px #25374612;transition:width .2s}.preview-wrap iframe.mobile{width:min(390px,100%)}
.inspector{padding:22px 22px 30px;border-left:1px solid var(--studio-line)}.tabs{display:flex;gap:3px;margin:0 0 26px;padding:4px;background:#edf2f6;border-radius:7px}.tabs button{flex:1;padding:8px 6px;min-height:34px;background:transparent;font-size:12px}.tabs button.active{background:var(--studio-panel);color:#244c6c;box-shadow:0 2px 7px #2537460a}.inspector h2{font:21px/1.4 var(--studio-display);margin-bottom:18px}.inspector h3{font-size:13px}.inspector label,dialog label{display:block;color:var(--studio-muted);font-size:12px;line-height:1.7;margin:17px 0}.inspector input:not([type=color]),.inspector textarea,.inspector select,dialog input,dialog select{display:block;width:100%;margin-top:7px;padding:10px 11px;border:1px solid var(--studio-line);border-radius:5px;background:#fff;color:var(--studio-ink);font:13px/1.7 var(--studio-ui)}.inspector textarea{min-height:130px;resize:vertical;line-height:1.9}.inspector textarea.short{min-height:75px}.inspector button{font-size:12px}.button-pair,.button-trio{display:flex;gap:7px;margin:15px 0}.button-pair>*{flex:1;min-width:0}.button-trio button{flex:1;padding:8px 3px}.art-thumb{display:block;width:100%;max-height:175px;object-fit:contain;margin-bottom:20px;background:transparent}.file-button{position:relative;display:block!important;text-align:center;padding:11px;border-radius:5px;background:#e7eff5;color:var(--studio-accent)!important;cursor:pointer}.file-button input{position:absolute;width:1px!important;height:1px;opacity:0}.gallery-entry{border-top:1px solid var(--studio-line);padding:18px 0}.gallery-entry .art-thumb{height:90px}.color-row{display:flex;align-items:center;gap:10px;margin-bottom:14px}.color-row label{flex:1;font-size:12px;margin:0}.color-row input[type=color]{flex:none;width:34px;height:34px;border:0;background:transparent;padding:2px;cursor:pointer;border-radius:5px}.color-row input[type=text]{flex:none;width:84px;margin:0!important;font-size:11px;padding:7px}.palette{display:grid;grid-template-columns:repeat(8,1fr);gap:8px;margin:20px 0}.palette button{width:23px;height:23px;min-height:0;padding:0;border-radius:50%;box-shadow:inset 0 0 0 1px #25374620}.theme-assistant{margin-bottom:24px;padding-bottom:22px;border-bottom:1px solid var(--studio-line)}.theme-assistant>button{width:100%;font-size:13px;background:#e7eff5;color:#355977;padding:11px}.theme-references{font-size:12px;line-height:1.8}.theme-references>a{display:block;margin:9px 0;color:var(--studio-accent)}.theme-references summary{cursor:pointer;color:var(--studio-muted)}
.dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:25px}dialog{width:min(490px,calc(100vw - 40px));max-height:85svh;overflow:auto;border:0;border-radius:10px;padding:34px;background:var(--studio-panel);color:var(--studio-ink);box-shadow:0 20px 80px #25374630}dialog::backdrop{background:#25374666;backdrop-filter:blur(4px)}dialog h2{font:28px/1.3 var(--studio-display);margin-bottom:18px}#pdf-dialog{width:min(560px,calc(100vw - 40px))}#pdf-dialog p{line-height:1.8}#pdf-progress{width:100%;height:7px;accent-color:var(--studio-accent)}#toast{position:fixed;left:50%;bottom:22px;transform:translateX(-50%);max-width:90vw;z-index:1000;padding:12px 20px;border-radius:7px;background:var(--studio-ink);color:#fff;font-size:13px;box-shadow:0 8px 30px #25374620}
/* Document editing controls: sizing and active state stay predictable. */
@media(max-width:1180px){.editor-header{grid-template-columns:minmax(200px,1fr) auto;gap:8px;height:110px;padding:10px 20px}.project-context{grid-column:1;grid-row:1}.project-save{grid-column:2;grid-row:1;justify-content:flex-end}.project-export{grid-column:1/-1;grid-row:2;justify-content:flex-end;border:0;padding:0}.workspace{height:calc(100svh - 110px);grid-template-columns:204px minmax(0,1fr) 286px}.workspace.inspector-closed{grid-template-columns:204px minmax(0,1fr)}.preview-wrap{padding:16px}.structure{padding:24px 15px}.inspector{padding:20px 17px}.preview-bar{gap:8px}.canvas-view{gap:2px}}
@media(max-width:900px){.project-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.workspace:not(.inspector-closed){grid-template-columns:174px minmax(0,1fr)}.workspace:not(.inspector-closed) .inspector{position:absolute;right:0;top:110px;bottom:0;width:min(320px,85vw);z-index:30;box-shadow:-10px 0 35px #25374618}.workspace.inspector-closed{grid-template-columns:174px minmax(0,1fr)}.preview-wrap{padding:14px}.page-entry{font-size:12px}.brand{font-size:21px}.brand span{display:none}}
@media(max-width:650px){.library-header{padding:20px 6vw;flex-wrap:wrap}.library-header>.library-imports{margin-left:auto}.library{padding:40px 6vw}.library-intro{flex-direction:column;align-items:flex-start;gap:25px;margin-bottom:40px}.library-intro h1{font-size:34px}.library-heading{align-items:flex-start}.library-heading span{font-size:11px;max-width:165px;text-align:right}.project-grid{grid-template-columns:1fr;gap:22px}.project-info{padding:22px}.example{align-items:flex-start;gap:18px}.example-art{width:95px}.example h2{font-size:26px}.editor-header{height:124px;padding:9px 12px;grid-template-columns:minmax(0,1fr) auto;gap:3px}.project-context{gap:5px}.project-context #project-name{padding-left:9px;font-size:12px}.editor-header button,.editor-header button.primary{font-size:12px;padding:8px;min-height:34px}.editor-header #save-status{display:none}.project-export{justify-content:flex-start;overflow-x:auto}.workspace,.workspace.inspector-closed{display:flex;height:calc(100svh - 124px)}.workspace,.workspace.inspector-closed{flex-direction:column}.structure{display:flex;flex:0 0 61px;align-items:center;gap:8px;padding:8px 10px;overflow-x:auto;overflow-y:hidden;border-right:0;border-bottom:1px solid var(--studio-line)}.structure>h2,.structure>h3,.structure>hr,.structure>.small-note,.structure>#block-list{display:none}.structure>#page-list{display:flex;flex:none;gap:4px}.structure .page-entry{width:auto;max-width:180px;align-items:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;padding:8px;font-size:12px;display:block}.structure .page-entry>span{margin-right:7px}.structure>#add-page{width:auto;flex:none;white-space:nowrap;margin:0;padding:8px;font-size:12px}.preview-wrap{width:100%;height:auto;flex:1;min-height:0;padding:10px}.preview-bar{padding-bottom:7px}.preview-bar label{margin-right:4px;font-size:11px}.preview-bar button,.preview-bar select{font-size:12px;padding:6px 8px}.canvas-caption{font-size:10px;margin-bottom:8px}.workspace:not(.inspector-closed) .inspector{top:124px;width:min(310px,90vw)}.library-footer{padding:24px 6vw}.canvas-insert,.canvas-view{gap:2px}.canvas-view{margin-left:auto}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

body .crop-dialog{background:var(--studio-panel);color:var(--studio-ink);border-color:var(--studio-line);font:13px/1.6 var(--studio-ui)}body .crop-dialog h2{font:24px/1.4 var(--studio-display)}body .crop-dialog p,body .crop-dimensions{color:var(--studio-muted)}body .crop-dialog button,body .crop-dialog select{font:13px/1.5 var(--studio-ui);color:var(--studio-ink);border:0;background:#edf2f6}body .crop-dialog .crop-primary{background:var(--studio-accent);color:#fff}body .crop-dialog .crop-workspace{background:#e5ebf0}body .crop-dialog .crop-handle{border:1px solid var(--studio-accent);background:#fff}

/* Creator scroll reveal: one entrance, no movement during editing. */
.studio-reveal{opacity:0;transform:translateY(12px);transition:none}.studio-reveal.studio-visible{opacity:1;transform:none;transition:opacity .48s ease,transform .48s cubic-bezier(.2,.7,.2,1)}.layout-editing .studio-reveal,.studio-reveal.page-entry,.studio-reveal.block-entry,.studio-reveal:focus-within{transform:none}.studio-reveal:focus-within,.studio-reveal.canvas-focus,.studio-reveal.layout-selected{opacity:1;transition:none}@media(prefers-reduced-motion:reduce){.studio-reveal{opacity:1!important;transform:none!important;transition:none!important}}
