@font-face{font-family:StitchSans;src:url('fonts/stitch-sans.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:StitchSerif;src:url('fonts/stitch-serif.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:StitchItalic;src:url('fonts/stitch-italic.woff2') format('woff2');font-weight:700;font-style:italic;font-display:swap}
:root{--ink:#183858;--muted:#647a8a;--line:#18385835;--cloth:#eeeee9}*{box-sizing:border-box}body{margin:0;color:var(--ink);background-color:var(--cloth);font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif;font-size:16px}button,input,textarea,select{font:inherit;color:inherit}button{cursor:pointer;border:0;background:none;transition:opacity .18s,background .18s,transform .18s}button:hover{opacity:.72}button:active{transform:translateY(1px)}button:disabled{opacity:.4;cursor:wait}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,a:focus-visible{outline:2px solid #af5940;outline-offset:5px}svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}header{padding:25px 42px 13px;display:flex;align-items:center;gap:25px;justify-content:space-between;position:relative;z-index:1}.brand{text-decoration:none;color:var(--ink);display:flex;flex-direction:column;gap:5px;flex:none}.brand strong{font-family:StitchSerif,serif;font-size:25px;letter-spacing:3px;font-weight:700}.brand span{font-size:10px;letter-spacing:3px}.intro{font-size:13px;letter-spacing:1.5px;opacity:.7;margin:0}.header-actions{display:flex;gap:22px;align-items:center}.text-button{font-size:13px}.save-button{display:flex;gap:8px;align-items:center;border:1px solid var(--ink);border-radius:2px;font-size:14px;padding:10px 15px}.save-button svg{width:16px;height:16px}.theatre{max-width:1480px;margin:0 auto;position:relative}.stage-caption{position:absolute;top:15px;left:43px;right:43px;display:flex;justify-content:space-between;font-size:11px;letter-spacing:1.5px;z-index:1;opacity:.66;pointer-events:none}#artwrap{height:clamp(440px,calc(100vh - 290px),850px);max-width:1400px;margin:auto;position:relative;display:flex;justify-content:center;align-items:center;overflow:hidden}#art{display:block;width:auto;height:100%;max-width:100%;object-fit:contain;mix-blend-mode:multiply}#empty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px}#empty[hidden]{display:none}#empty strong{font-family:StitchSerif,serif;font-size:38px;letter-spacing:4px}#empty p{font-size:14px;opacity:.6}.playback{display:flex;align-items:center;gap:17px;padding:0 42px 14px;max-width:1250px;margin:auto}.play-actions{display:flex;align-items:center;gap:10px;flex:none}.play-actions button{padding:5px;display:flex;align-items:center;gap:7px;font-size:12px}.play-actions #play{border:1px solid var(--line);width:34px;height:34px;border-radius:50%;justify-content:center}.play-actions svg{width:16px;height:16px}#progress{accent-color:var(--ink);height:12px;flex:1;min-width:60px;cursor:pointer;opacity:.8}#progressLabel{font-size:11px;width:35px;text-align:center}#stitchMeta{font-size:11px;opacity:.65;min-width:95px;text-align:right}.edit-dock{max-width:1100px;margin:8px auto 0;padding:23px 28px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:44px;background:#f7f7f3d9;backdrop-filter:blur(8px);border:1px solid #18385831;border-radius:2px;box-shadow:0 8px 20px #24364208;position:relative}.edit-dock:before{content:'';position:absolute;inset:5px;border:1px dashed #18385815;pointer-events:none}.writing{min-width:0}.writing>label{font-size:13px;display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.writing>label span{font-size:11px;opacity:.48}.writing textarea{width:100%;resize:vertical;min-height:57px;max-height:150px;font-size:18px;line-height:1.25;padding:3px 0;border:0;border-bottom:1px solid #18385845;background:transparent;letter-spacing:1px}.writing p{font-size:11px;opacity:.58;margin:7px 0 0}.dock-tools{padding-top:1px;display:flex;flex-direction:column;justify-content:center}.palette{display:flex;gap:15px;margin:0 0 15px}.swatch{border-radius:50%;background:var(--swatch);width:24px;height:24px;border:1px solid #17314d22;position:relative}.swatch[aria-pressed=true]:after{content:'';position:absolute;inset:-4px;border:1px solid var(--ink);border-radius:50%}.quick-actions{display:grid;grid-template-columns:1fr 1.2fr;gap:12px}.outline-button,.stitch-button{font-size:14px;min-height:39px;padding:9px 14px;border:1px solid #18385866;border-radius:2px;display:flex;justify-content:space-between;align-items:center}.stitch-button{background:var(--ink);border-color:var(--ink);color:#f6f6ed;justify-content:center;letter-spacing:2px}.examples{display:flex;gap:13px;margin-top:12px;align-items:center;font-size:11px;flex-wrap:wrap}.examples>span{opacity:.5}.examples button{padding:0;border-bottom:1px solid #18385833;font-size:12px}.settings{max-width:1100px;margin:0 auto;padding:28px;background:#f7f7f3d9;border:1px solid #18385831;border-top:0}.settings[hidden]{display:none}.setting-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:23px}.setting-grid>div>label{display:block;font-size:14px;margin-bottom:9px}.setting-grid select{width:100%;font-size:14px;padding:9px;background:#ffffff40;border:1px solid var(--line);border-radius:2px;cursor:pointer}.color-field{display:flex;align-items:center;gap:9px;font-size:12px}.color-field input{border:none;padding:0;width:45px;height:35px;cursor:pointer;background:transparent}.checks{grid-column:span 2;display:flex;gap:20px;align-items:center;flex-wrap:wrap}.checks label{display:flex!important;align-items:center;gap:7px;margin:0!important}.checks input{accent-color:var(--ink);width:16px;height:16px}#exportNote{font-size:12px;opacity:.62;display:flex;align-items:center}.privacy{font-size:11px;text-align:center;opacity:.6;margin:19px 20px;line-height:1.8}footer{max-width:1400px;margin:auto;padding:18px 42px 23px;display:flex;justify-content:space-between;font-size:10px;letter-spacing:2px;opacity:.55}#toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,15px);background:#173858ee;color:#fff;padding:13px 20px;border-radius:3px;opacity:0;pointer-events:none;transition:.2s;font-size:14px;max-width:90vw;text-align:center;z-index:10}#toast.visible{opacity:1;transform:translate(-50%,0)}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
@media(min-width:1500px){#artwrap{height:calc(100vh - 290px);max-height:900px}.edit-dock{max-width:1200px}}@media(max-width:1150px){.edit-dock,.settings{margin-left:30px;margin-right:30px}header{padding-left:30px;padding-right:30px}.intro{font-size:12px}.stage-caption{left:32px;right:32px}}@media(max-width:760px){header{padding:22px 21px 13px;gap:12px}.brand strong{font-size:20px}.brand span{font-size:9px;letter-spacing:2px}.intro{display:none}.header-actions{gap:15px}.save-button{padding:9px 11px;font-size:13px}.stage-caption{top:12px;left:22px;right:22px;font-size:10px;letter-spacing:.8px}#threadHint{max-width:180px;text-align:right}#artwrap{height:clamp(330px,54vh,530px);min-height:330px;padding-top:10px}#art{width:100%;height:auto;max-height:100%}.playback{padding:0 21px 14px;gap:10px}.play-actions{gap:5px}.play-actions button{font-size:11px}.play-actions svg{width:15px;height:15px}#stitchMeta{display:none}.edit-dock{margin:4px 18px 0;padding:21px;grid-template-columns:1fr;gap:20px}.writing textarea{min-height:50px;font-size:19px}.writing p{font-size:11px}.palette{gap:18px;margin-bottom:17px}.swatch{width:26px;height:26px}.quick-actions{grid-template-columns:1fr 1.15fr}.examples{gap:15px;margin-top:14px}.examples button{font-size:12px}.settings{margin:0 18px;padding:22px}.setting-grid{grid-template-columns:1fr 1fr;gap:22px 14px}.checks{gap:15px;grid-column:1/-1}.setting-grid .checks label{font-size:13px}.privacy{font-size:10px;max-width:360px;margin:17px auto;padding:0 12px}footer{padding:12px 22px 23px;font-size:9px;letter-spacing:1px}#empty strong{font-size:29px}}@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
#threadOverlay{position:fixed;inset:0;width:100%;height:100%;z-index:4;pointer-events:none}
/* Keep the stitches, rather than a frame around the image, at the centre of the page. */
#art{transform:scale(1.25);transform-origin:center}
@media(max-width:760px){#art{transform:scale(1.1)}}
.video-button{background:#183858;color:#f4f4ee}.header-actions{gap:13px}dialog{border:1px solid #18385850;border-radius:4px;background:#f5f5ef;color:var(--ink);padding:28px;width:min(460px,calc(100vw - 32px));box-shadow:0 25px 90px #142a4240;max-height:calc(100vh - 36px);overflow:auto}dialog::backdrop{background:#112f4855;backdrop-filter:blur(3px)}.video-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:20px}.video-dialog-head h2{font-size:23px;letter-spacing:1px;margin:0;font-family:StitchSerif,serif}.video-dialog-head button{font-size:25px;padding:0 4px}.video-intro{font-size:14px;line-height:1.8;opacity:.76;margin:16px 0 22px}.video-settings{display:grid;grid-template-columns:1fr 1fr;gap:14px}.video-settings label{display:block;font-size:14px;margin-bottom:8px}.video-settings select{width:100%;padding:10px 7px;background:#fff9;border:1px solid var(--line);border-radius:2px;font-size:14px}.video-format{font-size:14px;margin:18px 0 9px}.video-detail,.video-keep{font-size:12px;line-height:1.8;opacity:.68}.video-keep{margin:18px 0}.video-dialog-actions{display:flex;gap:12px}.video-dialog-actions button{justify-content:center;flex:1}.video-dialog-actions button:last-child{flex:1.4}#videoProgress{width:100%;height:9px;accent-color:var(--ink)}#videoStatus{font-size:13px;margin:9px 0 0}.video-error{font-size:14px;line-height:1.6;color:#983a34;padding:10px;background:#a3413610}#videoResultNote{font-size:13px;line-height:1.7}#videoSaveAgain{text-decoration:none;display:inline-flex;padding:10px 18px;margin:4px 0}.video-dialog-head button:disabled{cursor:default}.video-button:disabled{cursor:default}@media(max-width:760px){header{gap:7px}.header-actions{gap:7px}.header-actions .text-button{display:none}.save-button{padding:8px;font-size:12px}.save-button svg{width:15px;height:15px}.brand strong{font-size:18px;letter-spacing:2px}.brand span{font-size:8px;letter-spacing:1.5px}dialog{padding:23px}.video-dialog-head h2{font-size:21px}}
@media(max-width:380px){.header-actions .save-button svg{display:none}.header-actions .save-button{padding:8px 7px}.brand span{font-size:8px}}
/* Language controls remain available in the export dialog, including while recording. */
.language-switch{display:inline-flex;align-items:center;flex:none;border:1px solid #18385855;border-radius:3px;overflow:hidden;min-width:78px}.language-switch button{font-size:12px;line-height:1.2;padding:7px 10px;min-width:38px;min-height:30px;text-align:center}.language-switch button[aria-pressed=true]{background:var(--ink);color:#f6f6f0}.video-dialog-tools{display:flex;align-items:center;gap:10px;flex:none}.video-dialog-head .language-switch button{font-size:12px;line-height:1.2;padding:7px 9px}.video-dialog-head h2{line-height:1.25;min-width:0}.video-intro,.video-detail{white-space:pre-line}.writing>label>span[data-i18n=textLabel]{font-size:13px;opacity:1}.stage-caption{gap:14px;line-height:1.5}.stage-caption>span{max-width:49%}.quick-actions .outline-button{gap:8px}.quick-actions .outline-button span:first-child{min-width:0;line-height:1.4}.setting-grid>div,.video-settings>div{min-width:0}.setting-grid select,.video-settings select{max-width:100%}footer{gap:12px;flex-wrap:wrap}html[lang=en] .brand strong{letter-spacing:.3px;font-size:24px}html[lang=en] .brand>span{font-size:9px;letter-spacing:1.5px}html[lang=en] .video-dialog-head h2{font-family:Georgia,serif;font-size:24px}
@media(max-width:1180px){header .intro{display:none}}
@media(max-width:760px){header{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px 12px;padding-bottom:9px}.header-actions{grid-column:1/-1;display:flex;gap:10px;justify-content:flex-end}.header-actions .save-button{flex:1;justify-content:center;font-size:14px;padding:9px 11px}.header-actions .save-button svg{display:block}.brand{min-width:0}html[lang=en] .brand strong{font-size:23px}.video-dialog-head{gap:12px;align-items:flex-start}.video-dialog-tools{gap:7px}.video-dialog-head .language-switch{min-width:68px}.video-dialog-head .language-switch button{min-width:32px;padding:6px 7px}.playback{gap:8px}#progress{min-width:48px}.examples{line-height:1.7}.video-intro,.video-detail,.video-keep,#videoResultNote{overflow-wrap:anywhere}}
@media(max-width:440px){html[lang=en] .setting-grid,html[lang=en] .video-settings{grid-template-columns:1fr}html[lang=en] .checks{grid-column:auto;display:flex;align-items:flex-start;flex-direction:column}html[lang=en] .video-dialog-head{flex-wrap:wrap}html[lang=en] .video-dialog-head h2{font-size:23px;flex:1 1 100%}html[lang=en] .video-dialog-tools{margin-left:auto}html[lang=en] #threadHint{max-width:48%}html[lang=en] .quick-actions{grid-template-columns:1fr 1fr}html[lang=en] .quick-actions button{font-size:13px;padding:9px 10px}footer{justify-content:center;text-align:center}}
