.fex-root{--fx-ink:#29352e;--fx-muted:#777e74;--fx-line:var(--line,#ECE9E1);--fx-accent:#365844;--fx-serif:"Noto Serif SC","Songti SC","SimSun",serif;--fx-sans:"Microsoft YaHei","PingFang SC",sans-serif;font:14px/1.6 var(--fx-sans);color:var(--fx-ink)}
.fex-root *{box-sizing:border-box}.fex-root button,.fex-root input,.fex-root textarea{font:inherit}.fex-root button{cursor:pointer;-webkit-tap-highlight-color:transparent}.fex-root button:disabled{opacity:.55;cursor:default}.fex-root button:focus-visible,.fex-root summary:focus-visible{outline:2px solid var(--fx-accent);outline-offset:3px}
.fex-root .workbench{display:grid;grid-template-columns:minmax(0,1.85fr) minmax(300px,1fr);gap:28px;align-items:stretch}.fex-root .preview-wrap{min-width:0}.fex-root .stage{position:relative;overflow:hidden;border-radius:12px;aspect-ratio:4/3;background:#191627}.fex-root .stage.square{aspect-ratio:1;max-height:680px}.fex-root #artwork{width:100%;height:100%;position:relative}.fex-root #artwork svg{display:block;width:100%;height:100%}.fex-root .preview-caption{font-size:11px;color:var(--fx-muted);margin-top:12px}.fex-root .inspector{min-width:0;padding:8px 0 0 28px;border-left:1px solid var(--fx-line);display:flex;flex-direction:column}.fex-root .tool-heading{font:700 24px/1.5 var(--fx-serif);letter-spacing:-.015em;margin:0 0 24px}.fex-root .field{display:block;margin:0 0 18px}.fex-root .field-name{font-size:13px;color:var(--fx-muted);display:flex;justify-content:space-between;gap:8px;margin-bottom:8px}.fex-root .field-name small{font:10px Consolas,monospace;color:#949a90;align-self:center}
.fex-root input,.fex-root textarea{width:100%;box-sizing:border-box;border-radius:10px;border:1px solid var(--line,#ECE9E1);background:var(--surface,#fff);color:var(--ink,#1A1D23);font-size:13px;padding:8px 12px;line-height:1.6;outline:none;transition:border-color 140ms ease}.fex-root input{height:44px}.fex-root textarea{padding:10px 12px;min-height:96px;max-height:300px;resize:none;font-size:12.5px;font-family:ui-monospace,Consolas,monospace}.fex-root input:focus,.fex-root textarea:focus{border-color:var(--accent,#0E6B57);box-shadow:none}.fex-root .choices{display:flex;gap:8px;margin-bottom:21px}.fex-root .choices button{display:flex;align-items:center;justify-content:center;gap:7px;flex:1;min-width:0;min-height:44px;border:1px solid var(--fx-line);border-radius:7px;background:var(--surface,#fff);color:var(--fx-muted);padding:7px 8px;font-size:12px;transition:border-color .15s,background .15s}.fex-root .choices button[aria-pressed=true]{border-color:var(--fx-accent);color:var(--fx-accent);background:color-mix(in srgb,var(--fx-accent) 7%,var(--surface,#fff));font-weight:600}.fex-root .choices svg{width:25px;height:25px;flex:none}.fex-root .choices[data-group=avatar] button{flex-direction:column;min-height:80px;gap:4px}.fex-root .choices[data-group=avatar] svg{width:33px;height:40px;image-rendering:pixelated}.fex-root .choices[data-group=rating] button{flex-direction:column;font-size:11px;min-height:82px;gap:0}.fex-root .rating-letter{font:700 31px Georgia,serif;color:var(--fx-ink)}.fex-root .palette-dot{width:19px;height:19px;border-radius:50%;border:1px solid #0001;flex:none}
.fex-root details{border-top:1px solid var(--fx-line);margin:3px 0 18px}.fex-root summary{list-style:none;display:flex;align-items:center;justify-content:space-between;min-height:44px;font-size:13px;color:var(--fx-muted);cursor:pointer}.fex-root summary::-webkit-details-marker{display:none}.fex-root summary::after{content:"+";font:20px Consolas,monospace}.fex-root details[open] summary::after{content:"−"}.fex-root details[open] summary{margin-bottom:8px}.fex-root .reset-link{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--fx-line);border-radius:6px;background:transparent;min-height:40px;padding:8px 11px;color:var(--fx-muted);font-size:12px;margin:0 6px 8px 0}.fex-root .reset-link:hover{color:var(--fx-accent);border-color:var(--fx-accent)}.fex-root .reset-link svg,.fex-root .actions svg,.fex-root .upload svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex:none}.fex-root .actions{display:grid;grid-template-columns:1fr 1.13fr;gap:10px;margin-top:auto;padding-top:9px}.fex-root .actions button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:10px 10px;border:1px solid var(--fx-line);border-radius:7px;font-size:14px;font-weight:600}.fex-root .random{background:color-mix(in srgb,var(--fx-accent) 6%,var(--surface,#fff));color:var(--fx-accent)}.fex-root .export{background:var(--fx-accent);color:#fff;border-color:var(--fx-accent)!important}.fex-root .export:hover{filter:brightness(.92)}.fex-root .status{font-size:12px;color:var(--fx-muted);line-height:1.5;margin:10px 0 0}.fex-root .status:empty{display:none}.fex-root .status.invalid{color:#b45136}
.fex-root .upload{position:relative;display:flex;align-items:center;gap:14px;border:1px solid var(--fx-line);border-radius:10px;min-height:64px;padding:9px 12px;background:var(--surface,#fff);margin-bottom:21px;cursor:pointer;color:var(--fx-muted);font-size:13px;overflow:hidden}.fex-root .upload img{width:42px;height:42px;object-fit:cover;border-radius:4px}.fex-root .upload span{display:flex;gap:8px;align-items:center}.fex-root .upload input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.fex-root .upload:focus-within{outline:2px solid var(--fx-accent);outline-offset:2px}.fex-root .check{display:flex;align-items:center;gap:8px;margin:0 0 16px;font-size:12px;color:var(--fx-muted)}.fex-root .check input{width:15px;height:15px;accent-color:var(--fx-accent)}.fex-root .stage.is-over{outline:3px dashed var(--fx-accent);outline-offset:4px}
#tool-game-dialogue{--fx-accent:#64547a}#tool-film-warning{--fx-accent:#343731}#tool-film-warning .stage{background:#151615}#tool-album-cover{--fx-accent:#355e76}#tool-album-cover .stage{background:#d5dfe1}#tool-comic-sticker{--fx-accent:#bd4e3d}#tool-comic-sticker .stage{background-color:#f5f3eb;background-image:linear-gradient(45deg,#deddd5 25%,transparent 25%),linear-gradient(-45deg,#deddd5 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#deddd5 75%),linear-gradient(-45deg,transparent 75%,#deddd5 75%);background-size:24px 24px;background-position:0 0,0 12px,12px -12px,-12px 0}#tool-game-dialogue [data-replay]{cursor:pointer}
html[data-theme=dark] .fex-root{--fx-ink:#e9eee2;--fx-muted:#a9b3a6}html[data-theme=dark] #tool-game-dialogue{--fx-accent:#bcb0cf}html[data-theme=dark] #tool-film-warning{--fx-accent:#c7cdbf}html[data-theme=dark] #tool-album-cover{--fx-accent:#a5c3d2}html[data-theme=dark] #tool-comic-sticker{--fx-accent:#eaa69a}html[data-theme=dark] .fex-root .export{color:#17201b}html[data-theme=dark] #tool-comic-sticker .stage{background-color:#28312d;background-image:linear-gradient(45deg,#39443d 25%,transparent 25%),linear-gradient(-45deg,#39443d 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#39443d 75%),linear-gradient(-45deg,transparent 75%,#39443d 75%)}
@media(max-width:1000px){.fex-root .workbench{grid-template-columns:minmax(0,1.6fr) minmax(285px,1fr);gap:20px}.fex-root .inspector{padding-left:20px}.fex-root .tool-heading{font-size:22px}}
@media(max-width:900px){.fex-root .workbench{grid-template-columns:1fr;gap:25px}.fex-root .inspector{border:0;padding:0}.fex-root .stage.square{max-height:none}.fex-root input,.fex-root textarea{font-size:16px}}
@media(max-width:720px){body.fun-demo-page{padding-bottom:82px}.fex-root .workbench{gap:22px}.fex-root .workbench>.tool-heading{margin:0 0 -7px;font-size:22px}.fex-root .preview-caption{font-size:10px;margin-top:10px}.fex-root .actions{position:fixed;left:0;right:0;bottom:0;z-index:20;margin:0;padding:12px 20px calc(12px + env(safe-area-inset-bottom));background:var(--surface,#f7f5ef);border-top:1px solid var(--fx-line);box-shadow:0 -4px 18px #182a1508}.fex-root .actions button{min-height:46px;font-size:14px}.fex-root .reset-link{min-height:44px}.fex-root .field{margin-bottom:16px}}
@media(prefers-reduced-motion:reduce){.fex-root *{transition:none!important}}

.fex-root .editor-footer{position:relative;border-top:1px solid var(--line,#ECE9E1);margin-top:3px}
.fex-root .editor-footer details{border:0;margin:0}
.fex-root .editor-footer summary{justify-content:flex-start;gap:8px;padding-right:145px}
.fex-root .editor-footer .reset-link{border:0;background:transparent;padding:0 3px;margin:0;min-height:44px;height:44px;font-size:11px;gap:5px;white-space:nowrap}
.fex-root .editor-footer>.reset-link,.fex-root .reset-actions{position:absolute;top:0;right:0;display:flex;align-items:center;gap:14px}
.fex-root .editor-footer .reset-link svg{width:14px;height:14px}
@media(min-width:721px){.fex-root .preview-wrap .actions{position:static;display:flex;justify-content:flex-end;gap:10px;margin:14px 0 0;padding:0;box-shadow:none}.fex-root .actions button{min-width:140px}}
.fex-root .editor-footer summary{padding-right:175px}
.fex-root .reset-actions{gap:10px}

@media(min-width:721px){
.fex-root .preview-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:14px}
.fex-root .preview-footer .preview-caption{display:block;margin:0;font-size:12px;line-height:1.5}
.fex-root .preview-footer .actions{margin:0;padding:0;flex:none;gap:8px}
.fex-root .preview-footer .actions button{min-width:124px;height:40px;min-height:40px;padding:8px 13px;gap:7px;font-size:13px;border-radius:8px}
.fex-root .preview-footer .actions svg{width:16px;height:16px}
}

@media(min-width:721px){.fex-root .preview-footer{margin-top:10px}}
@media(min-width:721px) and (max-width:900px){.fex-root .workbench{row-gap:16px}.fex-root .inspector{padding-top:0}.fex-root .inspector h3{margin-bottom:18px}}

@media(min-width:721px) and (max-width:900px){
.fex-root .preview-footer{display:grid;grid-template-columns:auto auto minmax(0,1fr);gap:14px;align-items:center}
.fex-root .preview-footer>.tool-heading{margin:0;font:700 clamp(18px,2.2vw,20px)/1.35 var(--fx-serif);white-space:nowrap}
.fex-root .preview-footer .preview-caption{font-size:11px;text-align:left;white-space:nowrap;transform:translateY(.5px)}
.fex-root .preview-footer .actions button{min-width:108px;font-size:12px;padding:8px 10px;gap:6px}
}

@media(min-width:721px) and (max-width:900px){.fex-root .preview-footer .actions{justify-self:end}}

#tool-game-dialogue .editor-footer summary{padding-right:105px}

.fex-root .reset-control{display:flex;flex-direction:column;align-items:flex-end}
.fex-root .editor-footer>.reset-control{position:absolute;top:0;right:0}
.fex-root .editor-footer .reset-actions{align-items:flex-start}
.fex-root .reset-feedback{display:block;white-space:nowrap;font-size:11px;line-height:18px;color:var(--fx-muted);margin-top:2px}
.fex-root .reset-feedback:empty{display:none;margin:0}
.fex-root .editor-footer:has(.reset-feedback:not(:empty)) summary{margin-bottom:24px}

@media(max-width:720px){
 body.fun-demo-page{padding-bottom:18px}
 .fex-root .preview-footer .actions{position:static;inset:auto;z-index:auto;margin:12px 0 0;padding:0;background:transparent;border:0;box-shadow:none}
}
