/* Compact creative tools. The document, not the inspector, owns the screen. */
.pro-launcher{display:flex;gap:6px;padding:5px 12px;background:var(--panel,#fff);border-bottom:1px solid var(--border,#d5d8dc);overflow-x:auto;flex:none}.pro-launcher button{border:1px solid var(--border,#d5d8dc);border-radius:8px;background:var(--surface,#fff);color:var(--text,#202832);padding:7px 12px;white-space:nowrap;font:600 12px system-ui;cursor:pointer}
#pro-studio{--pro-bg:#f3f1ec;--pro-panel:#fffdf9;--pro-ink:#202c33;--pro-line:#d9dcd7;--pro-accent:#165f57;position:fixed;inset:0;z-index:850;display:flex;flex-direction:column;color:var(--pro-ink);background:var(--pro-bg);font:14px/1.45 system-ui,-apple-system,sans-serif;isolation:isolate;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}#pro-studio[hidden]{display:none!important}body.pro-active{overflow:hidden}#pro-studio *{box-sizing:border-box}#pro-studio button,#pro-studio select,#pro-studio input,#pro-studio textarea{font:inherit;color:inherit}#pro-studio button{min-height:36px;border:1px solid var(--pro-line);border-radius:7px;background:var(--pro-panel);padding:6px 10px;cursor:pointer;white-space:nowrap}#pro-studio button:hover{background:#e8efeb}#pro-studio button:disabled{opacity:.45;cursor:default}#pro-studio :focus-visible{outline:3px solid #b04b21;outline-offset:2px}#pro-studio button[aria-pressed=true],#pro-studio button[aria-current=step],#pro-studio button[aria-current=true]{background:#dceae3;border-color:var(--pro-accent);color:#11473f}#pro-studio .pro-primary{background:#165f57;color:white;border-color:#165f57;width:100%}#pro-studio label{display:flex;flex-direction:column;gap:3px;font-size:12px;min-width:0}#pro-studio input,#pro-studio select,#pro-studio textarea{border:1px solid #aeb8b2;border-radius:5px;background:#fff;color:#202c33;min-height:34px;padding:5px 7px;max-width:100%}#pro-studio textarea{min-height:100px;resize:vertical}#pro-studio input[type=color]{width:42px;padding:3px}#pro-studio input[type=range]{width:100%;padding:0}#pro-studio summary{cursor:pointer;font-weight:600;padding:7px 0}#pro-studio details{min-width:0}#pro-studio p{margin:6px 0}#pro-studio header{display:flex;align-items:center;gap:6px}#pro-studio header strong{flex:1}.pro-header{padding:7px 10px;flex:none;background:var(--pro-panel);border-bottom:1px solid var(--pro-line);min-width:0}.pro-header #pro-title{flex:1;width:80px;min-width:60px;font-weight:650;background:transparent;border-color:transparent}.pro-header #pro-mode{font-weight:650;width:180px}.pro-file{position:relative}.pro-file>summary{padding:6px 10px!important}.pro-file>div{position:absolute;right:0;top:100%;min-width:225px;padding:8px;display:grid;gap:5px;background:#fff;border:1px solid var(--pro-line);border-radius:8px;box-shadow:0 8px 25px #0002;z-index:20}.pro-steps{display:flex;align-items:center;gap:5px;padding:5px 10px;background:var(--pro-panel);flex:none;overflow:auto}.pro-step-spacer{flex:1}.pro-toolbar{display:flex;align-items:center;gap:5px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;padding:5px 10px 7px;flex:none;background:#fffdf9;border-bottom:1px solid var(--pro-line);touch-action:pan-x}.pro-toolbar>*{flex:none}.pro-toolbar label{gap:1px!important;font-size:10px!important}.pro-toolbar label select{width:112px}.pro-toolbar label input[type=number]{width:57px}.pro-toolbar button{align-self:flex-end}.pro-toolbar [data-key=heading]{width:99px}.pro-grip{min-height:16px!important;height:20px;padding:0!important;flex:none;border:0!important;border-bottom:1px solid var(--pro-line)!important;border-radius:0!important;background:#e6e8e1!important;font-size:10px!important;touch-action:none;user-select:none;cursor:ns-resize!important}.pro-tools-hidden #pro-format{display:none}.pro-body{display:flex;flex:1;min-height:0;min-width:0;position:relative;overflow:hidden}.pro-nav{width:190px;flex:none;display:flex;flex-direction:column;border-right:1px solid var(--pro-line);background:var(--pro-panel);padding:10px;gap:8px;overflow:auto;overscroll-behavior:contain}.pro-nav header{flex:none}.pro-sequence{display:flex;flex-direction:column;gap:5px;overflow:auto;min-height:0}.pro-sequence>button{display:flex;align-items:center;gap:8px;white-space:normal!important;text-align:left;min-height:47px!important}.pro-seq-number{font-size:11px;background:#ecece6;border-radius:5px;min-width:24px;text-align:center;padding:4px}.pro-nav-actions{display:flex;flex-wrap:wrap;gap:4px;margin-top:auto;padding-top:8px}.pro-nav-actions button{font-size:11px!important}.pro-stage{flex:1;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;padding:24px;position:relative;scrollbar-gutter:stable;touch-action:pan-x pan-y}.pro-page-shell{width:min(100%,720px);position:relative;margin:0 auto 22px;box-shadow:0 5px 25px #0002;background:white;flex:none}.pro-comic-page{transform-origin:top left;position:absolute;inset:0;overflow:hidden}.pro-object{position:absolute;transform:rotate(var(--rotation));touch-action:none;cursor:move;user-select:none}.pro-object.master{pointer-events:none}.pro-object.locked{cursor:default}.pro-object-art{position:absolute;inset:0;overflow:hidden}.pro-object-art img{width:100%;height:100%;object-fit:cover;pointer-events:none}.pro-object-words{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;white-space:pre-wrap;overflow-wrap:anywhere;overflow:hidden;padding:9px;pointer-events:none;line-height:1.2}.pro-object-words:empty{display:none}.pro-art-placeholder{position:absolute;inset:0;display:grid;place-items:center;color:#66746e;font:14px system-ui;background:repeating-linear-gradient(135deg,#e8ede7 0 10px,#eef1ec 10px 20px);pointer-events:none}.pro-object.selected{outline:3px solid #138270;outline-offset:4px}.pro-handle{position:absolute!important;width:20px!important;height:20px!important;min-height:20px!important;padding:0!important;border:2px solid #fff!important;background:#147d6c!important;border-radius:50%!important;z-index:5}.pro-handle.nw{top:-12px;left:-12px;cursor:nwse-resize}.pro-handle.ne{top:-12px;right:-12px;cursor:nesw-resize}.pro-handle.sw{bottom:-12px;left:-12px;cursor:nesw-resize}.pro-handle.se{bottom:-12px;right:-12px;cursor:nwse-resize}.pro-tail{position:absolute;bottom:-20px;left:23%;height:30px;width:25px;background:var(--fill);border-right:var(--stroke-width) solid var(--stroke);border-bottom:var(--stroke-width) solid var(--stroke);clip-path:polygon(0 0,100% 0,0 100%)}.pro-tail-right{left:auto;right:23%;transform:scaleX(-1)}.pro-tail-none{display:none}.pro-tail-both:after{content:'';position:absolute;width:25px;height:30px;background:var(--fill);left:70px}.pro-thought .pro-object-art{border-style:dashed!important}.pro-inspector{width:264px;flex:none;overflow:auto;overscroll-behavior:contain;background:var(--pro-panel);border-left:1px solid var(--pro-line);padding:10px;display:flex;flex-direction:column;gap:9px}.pro-inspector[hidden]{display:none}.pro-inspector>header{position:sticky;top:-10px;background:var(--pro-panel);z-index:2;padding:5px 0}.pro-pair{display:grid;grid-template-columns:1fr 1fr;gap:6px}.pro-layouts,.pro-themes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.pro-layouts button{display:flex;flex-direction:column;align-items:center;gap:5px;padding:5px!important;white-space:normal!important;font-size:10px!important;text-transform:capitalize}.pro-layout-icon{display:block;width:45px;height:58px;position:relative;border:1px solid #5a6e62;background:white}.pro-layout-icon i{position:absolute;border:2px solid white;background:#91aca0}.pro-themes{grid-template-columns:repeat(2,minmax(0,1fr))}.pro-themes button{display:flex;flex-direction:column;align-items:center;gap:3px;white-space:normal!important}.pro-themes button span{font-size:30px}.pro-object-actions{display:flex;flex-wrap:wrap;gap:5px}.pro-object-actions button{font-size:11px!important}.pro-hint{font-size:12px;color:#536158}.pro-checks{font-size:12px;border:1px solid #d6decf;border-radius:7px;padding:8px;background:#f3f5ee}.pro-checks ul{padding-left:18px;margin:5px 0}.pro-book-page{width:min(100%,750px);min-height:850px;background:#fffdf9;color:#202a2e;padding:60px 64px;box-shadow:0 5px 25px #0001;margin:0 auto;font-family:var(--book-font);font-size:var(--book-size);line-height:var(--book-line)}#pro-chapter-title{display:block;border:0!important;border-radius:0!important;background:transparent!important;padding:0!important;width:100%;font:700 30px/1.25 var(--book-font)!important;color:var(--book-accent)!important;margin:0 0 28px}#pro-manuscript{min-height:580px;outline:none;overflow-wrap:anywhere;white-space:normal}#pro-manuscript p{margin:0 0 .8em}#pro-manuscript h2,#pro-manuscript h3{color:var(--book-accent);line-height:1.25}#pro-manuscript img{max-width:100%;height:auto}#pro-manuscript blockquote{border-left:3px solid var(--book-accent);padding-left:18px;margin:1em 0}.pro-phone-preview .pro-book-page{max-width:390px;padding:30px 24px}.pro-preview .pro-object{outline:none;pointer-events:none}.pro-preview .pro-handle{display:none}.pro-spread{display:flex;align-items:flex-start;gap:12px}.pro-spread .pro-page-shell{width:calc(50% - 6px);margin:0}.pro-focus .pro-nav,.pro-focus .pro-inspector,.pro-focus .pro-steps{display:none!important}.pro-footer{flex:none;display:flex;justify-content:space-between;gap:10px;padding:5px 12px;font-size:11px;background:var(--pro-panel);border-top:1px solid var(--pro-line);min-height:28px}.pro-footer .error{color:#a02122}.pro-overlay{position:absolute;inset:0;background:#112a2866;z-index:30;display:grid;place-items:center;padding:15px}.pro-overlay[hidden]{display:none}.pro-overlay>section{display:flex;flex-direction:column;gap:10px;max-width:470px;width:100%;max-height:90%;overflow:auto;background:var(--pro-panel);padding:18px;border-radius:12px;box-shadow:0 10px 50px #0004}.pro-overlay button small{display:block;font-size:10px;font-weight:400}.pro-overlay>section>button{white-space:normal!important}
@media(max-width:1000px){.pro-nav{width:155px}.pro-inspector{width:235px}.pro-stage{padding:16px}.pro-book-page{padding:40px 35px}}@media(max-width:760px){.pro-header{padding:5px;gap:4px;flex-wrap:wrap}.pro-header #pro-mode{width:166px}.pro-header #pro-title{order:5;flex-basis:100%;height:30px;min-height:30px}.pro-header>button{font-size:11px!important;padding:5px 8px!important}.pro-header>button[data-pro=focus]{margin-left:auto}.pro-file>div{right:0}.pro-steps{padding:4px;gap:4px}.pro-steps button{font-size:11px!important;min-height:34px!important;padding:5px 7px!important}.pro-step-spacer{display:none}.pro-steps [data-pro=navigator]{margin-left:auto}.pro-toolbar{padding:4px 6px 6px;gap:4px}.pro-toolbar button{min-height:34px!important}.pro-nav{position:absolute;left:0;top:0;bottom:0;z-index:10;width:min(260px,80vw);box-shadow:10px 0 25px #0002;display:none}.pro-nav-open .pro-nav{display:flex}.pro-stage{padding:12px 9px 35px}.pro-inspector{position:absolute;right:0;top:0;bottom:0;z-index:12;width:min(285px,85vw);box-shadow:-8px 0 25px #0002}.pro-book-page{padding:28px 24px;min-height:650px;font-size:max(16px,var(--book-size))}.pro-footer{padding:4px 7px}.pro-footer #pro-status{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pro-footer #pro-count{white-space:nowrap}.pro-launcher{padding:4px 8px}.pro-launcher button{flex:1}.pro-handle{width:26px!important;height:26px!important;min-height:26px!important}.pro-handle.nw,.pro-handle.ne{top:-15px}.pro-handle.sw,.pro-handle.se{bottom:-15px}.pro-handle.nw,.pro-handle.sw{left:-15px}.pro-handle.ne,.pro-handle.se{right:-15px}}@media(orientation:landscape) and (max-height:550px){.pro-header #pro-title{order:0;flex-basis:auto}.pro-header{flex-wrap:nowrap}.pro-header #pro-mode{width:154px;font-size:12px}.pro-header button{min-height:30px!important}.pro-steps{padding:2px 5px}.pro-steps button{min-height:28px!important}.pro-toolbar{padding-top:2px;padding-bottom:3px}.pro-toolbar input,.pro-toolbar select{min-height:27px!important;height:27px}.pro-footer{min-height:22px;padding:2px 7px}.pro-stage{padding-top:12px}.pro-page-shell{max-width:520px}}
@media(prefers-reduced-motion:reduce){#pro-studio *{scroll-behavior:auto!important;transition:none!important}}

.header-actions>.pro-launcher{padding:0;border:0;background:transparent;max-width:320px}.header-actions>.pro-launcher button{font-size:11px;padding:6px 8px}.pro-active .fd-demo-banner{display:none!important}
@media(max-width:850px){.header-actions>.pro-launcher{max-width:100%;order:90;flex-basis:100%;width:100%}.header-actions:has(>.pro-launcher){flex-wrap:wrap}.header-actions>.pro-launcher button{min-height:30px}}

.pro-letter-outline .pro-object-words{-webkit-text-stroke:1px var(--stroke)}.pro-letter-shadow .pro-object-words{text-shadow:3px 4px 3px #0008}.pro-letter-3d .pro-object-words{text-shadow:1px 1px var(--stroke),2px 2px var(--stroke),3px 3px var(--stroke),4px 4px var(--stroke),5px 5px var(--stroke)}.pro-shape-circle .pro-object-art{border-radius:50%}.pro-shape-diamond .pro-object-art{clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%)}.pro-shape-star .pro-object-art{clip-path:polygon(50% 0,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%)}.pro-shape-arrow .pro-object-art{clip-path:polygon(0 30%,60% 30%,60% 0,100% 50%,60% 100%,60% 70%,0 70%)}

.pro-object-words .pro-arc{width:100%;height:100%;overflow:visible;fill:currentColor;stroke:none;flex:1}
@media print{body.pro-active>*:not(#pro-studio){display:none!important}#pro-studio{position:static!important;display:block!important}.pro-header,.pro-steps,#pro-format,.pro-grip,.pro-nav,.pro-inspector,.pro-footer{display:none!important}.pro-body,.pro-stage{display:block;overflow:visible!important;padding:0}.pro-page-shell{break-after:page;box-shadow:none}.pro-book-page{box-shadow:none}}

@media(max-width:760px){#pro-studio input,#pro-studio textarea,#pro-studio select{font-size:16px}.pro-toolbar label select{width:120px}.pro-header #pro-mode{font-size:16px;width:174px}.pro-header{align-content:start}#pro-studio{height:100dvh;max-height:100dvh}}

#pro-manuscript table{border-collapse:collapse;width:100%;margin:1em 0;font-size:.85em}#pro-manuscript :is(td,th){border:1px solid #9daaa0;padding:8px;text-align:left}.pro-footnotes{font-size:.75em;border-top:1px solid #aab3a8;margin-top:30px;padding-top:12px}

.pro-object{touch-action:pan-y}.pro-handle{touch-action:none}.pro-move{position:absolute!important;top:-34px;left:calc(50% - 18px);width:36px;height:30px;min-height:30px!important;line-height:18px;border:1px solid white!important;background:#147d6c!important;color:white!important;touch-action:none;cursor:move;z-index:6;padding:3px!important}.pro-preview .pro-move{display:none}

/* Property editing must leave the comic visible, including short landscape screens. */
.pro-handle,.pro-move{transform:scale(var(--pro-hit-scale,1));transform-origin:center}
@media(max-width:760px){.pro-body{flex-direction:column}.pro-stage{flex:1;min-height:0}.pro-inspector{position:relative;right:auto;top:auto;bottom:auto;width:100%;max-height:35%;min-height:0;flex:none;border-left:0;border-top:1px solid var(--pro-line);box-shadow:0 -3px 10px #0001;padding:8px 10px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:7px}.pro-inspector>header,.pro-inspector>.pro-layouts,.pro-inspector>.pro-themes,.pro-inspector>.pro-object-actions,.pro-inspector>.pro-hint,.pro-inspector>.pro-checks,.pro-inspector>details,.pro-inspector>textarea,.pro-inspector>.pro-primary{grid-column:1/-1}.pro-inspector>header{top:-8px}.pro-inspector>label:has(textarea){grid-column:1/-1}.pro-inspector textarea{min-height:60px}.pro-handle{width:36px!important;height:36px!important;min-height:36px!important}.pro-move{min-width:44px;min-height:36px!important;height:36px;left:calc(50% - 22px)}}

/* Artwork occupies the existing contextual dock; writing and canvas remain visible. */
.pro-object-art>.pro-vector{position:absolute;inset:0;pointer-events:none}.pro-object-art>.pro-vector>svg{width:100%;height:100%;display:block}.pro-book-page{position:relative}#pro-manuscript img[data-pro-art]{cursor:pointer;object-fit:fill}.pro-book-selection{position:absolute;outline:2px solid #147d6c;pointer-events:none;z-index:4}.pro-book-selection button{pointer-events:auto}.pro-book-selection .pro-move,.pro-book-selection .pro-handle{touch-action:none}.pro-artwork-panel{width:320px;display:flex!important;gap:7px}.pa-tabs{display:flex;gap:4px;overflow-x:auto;flex:none}.pa-tabs button{font-size:11px!important;padding:5px 7px!important}.pa-content{min-width:0;display:flex;flex-direction:column;gap:7px}.pa-check{flex-direction:row!important;align-items:center}.pa-check input{min-height:20px!important}.pa-status{font-size:12px}.pa-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.pa-gallery button{min-width:0;padding:5px!important;white-space:normal!important;display:flex;flex-direction:column;align-items:center;gap:4px;font-size:10px!important}.pa-gallery img{width:48px;height:48px;object-fit:contain}.pa-shapes{display:flex;flex-wrap:wrap;gap:4px}.pa-drawing{width:100%;aspect-ratio:3/2;background:#fff;border:1px solid #a6b9ad;touch-action:none}.pro-artwork-panel .fd-image-browser{padding:0;border:0;background:transparent;min-width:0}.pro-artwork-panel .fd-image-browser>header{display:none}.pro-artwork-panel .fd-image-results{grid-template-columns:repeat(2,minmax(0,1fr))}.pro-artwork-panel .fd-image-tabs{gap:3px}.pro-artwork-panel .fd-image-tabs button{font-size:11px!important;padding:4px 6px!important;min-height:30px!important}.pro-artwork-panel .fd-image-browser label,.pro-artwork-panel .fd-image-browser form{min-width:0}.pro-artwork-panel .fd-image-browser form{display:flex;flex-wrap:wrap}.pro-artwork-panel .fd-image-browser input{min-width:0;flex:1}.pro-artwork-panel .fd-image-browser h2{font-size:14px}.pro-artwork-panel .fd-image-note{font-size:11px}.pro-artwork-panel .fd-image-result{min-width:0}.pro-artwork-panel .fd-image-result img{width:100%;height:90px;object-fit:contain}.pro-artwork-panel .fd-image-result a{font-size:10px;overflow-wrap:anywhere}.pro-artwork-panel .pa-content button{max-width:100%}
@media(max-width:760px){.pro-artwork-panel{width:100%;max-height:45%;display:flex!important}.pro-artwork-panel>header{position:sticky;top:-8px;z-index:2}.pro-artwork-panel .pa-gallery{grid-template-columns:repeat(4,minmax(0,1fr))}.pro-artwork-panel .fd-image-results{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(orientation:landscape) and (max-height:550px){.pro-artwork-panel{max-height:45%;overflow:auto}}

/* Publication chrome follows Appearance; authored pages retain their own design. */
html[data-fd-appearance] #pro-studio{--pro-bg:var(--fd-bg,#f3f1ec);--pro-panel:var(--fd-panel,#fffdf9);--pro-ink:var(--fd-ink,#202c33);--pro-line:var(--fd-line,#d9dcd7);--pro-accent:var(--fd-accent,#165f57);color:var(--pro-ink);background:var(--pro-bg);color-scheme:inherit}
html[data-fd-appearance] #pro-studio :is(.pro-header,.pro-steps,.pro-toolbar,.pro-nav,.pro-inspector,.pro-footer,.pro-file>div,.pro-overlay>section){background:var(--pro-panel);color:var(--pro-ink);border-color:var(--pro-line)}
html[data-fd-appearance] #pro-studio :is(button,input,select,textarea){background-color:var(--pro-panel);color:var(--pro-ink);border-color:var(--fd-control,var(--pro-line));color-scheme:inherit}
html[data-fd-appearance] #pro-studio button:hover{background:var(--fd-soft,var(--pro-bg))}
html[data-fd-appearance] #pro-studio button:is([aria-pressed=true],[aria-current=step],[aria-current=true]){background:var(--fd-accent-soft,var(--fd-soft,var(--pro-panel)));color:var(--fd-accent,var(--pro-ink));border-color:var(--fd-accent,var(--pro-line))}
html[data-fd-appearance] #pro-studio .pro-primary{background:var(--fd-accent,#165f57);color:var(--fd-on-accent,#fff);border-color:var(--fd-accent,#165f57)}
html[data-fd-appearance] #pro-studio .pro-grip{background:var(--fd-soft,var(--pro-bg))!important;color:var(--pro-ink);border-color:var(--pro-line)!important}
html[data-fd-appearance] #pro-studio :is(.pro-seq-number,.pro-checks){background:var(--fd-soft,var(--pro-bg));color:var(--pro-ink);border-color:var(--pro-line)}
html[data-fd-appearance] #pro-studio .pro-hint{color:var(--fd-muted,#536158)}
html[data-fd-appearance] #pro-studio :is(.fd-image-browser,.fd-image-browser .fd-image-status){background:var(--pro-panel)!important;color:var(--pro-ink)!important}
html[data-fd-appearance] #pro-studio .pa-gallery img{background:#fff;border-radius:4px}
html[data-fd-mode=dark] #pro-studio .pro-footer .error,html[data-fd-mode=night] #pro-studio .pro-footer .error{color:#ffb4b4}
