/* Home directory and single-task pages. Tokens come from styles.css (:root). */
.page{max-width:1160px;margin:0 auto;padding:0 28px 40px}
.page-header{display:flex;align-items:center;gap:14px;flex-wrap:wrap;max-width:1160px;margin:0 auto;padding:18px 28px}
.page-header .brand strong{font-size:22px}.page-header .header-end{margin-left:auto;display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.page-header .local-pill{white-space:nowrap;flex:none}.page-header .local-pill>span[data-ui]{width:auto;height:auto;background:none;border-radius:0}.page-header .language-control{flex:none}
.header-link{white-space:nowrap;font-size:13px;font-weight:750;color:#51647d}.header-link:hover{color:var(--blue)}
.page h1{font-size:clamp(25px,4vw,36px);letter-spacing:-1.5px;line-height:1.18;margin:14px 0 8px;font-weight:850;text-wrap:balance}
.page-lead{font-size:15px;color:#5d6c80;margin:0 0 22px;line-height:1.6;font-weight:500}
.crumb{font-size:13px;color:var(--muted);margin-top:4px}.crumb a{color:var(--blue);font-weight:750}
.primary.auto,.dropzone .primary,.side .primary{width:auto}
button.primary,a.primary{border-radius:12px;font-size:14px;font-weight:800;padding:13px 22px;margin:0}
.ghost{padding:12px 16px;border-radius:12px;font-size:13px;font-weight:700;color:#5a708b;background:#f0f4fa}.ghost:hover{background:#e8eef8}
.link{font-size:12.5px;color:var(--muted);font-weight:650;text-decoration:underline;text-underline-offset:3px}
.chip{font-size:13px;font-weight:750;padding:9px 13px;border-radius:10px;background:var(--blue-soft);color:var(--blue)}.chip:hover{background:#dbe9ff}.chip[aria-pressed="true"]{background:var(--blue);color:#fff}
.local-note{display:block;font-size:12px;color:var(--muted);font-weight:600}.local-note::before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;background:#36ba8e;margin-right:7px}
/* drop zones */
.dropzone{display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;background:#fff;border:2px dashed #b9d3fb;border-radius:24px;padding:46px 24px;cursor:pointer;transition:background .15s,border-color .15s}
.dropzone:hover,.dragging .dropzone{background:var(--blue-soft);border-color:var(--blue)}
.dropzone strong{font-size:20px;letter-spacing:-.7px}.dropzone>span{color:#6b7a90;font-size:13px;font-weight:500}
.dropzone-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin:8px 0 4px}
.dropzone-art{position:relative;width:74px;height:60px;margin-bottom:6px}.dropzone-art span{position:absolute;inset:6px 14px 0 0;border-radius:12px;background:#e3edff;transform:rotate(-9deg)}.dropzone-art span+span{inset:0 0 6px 14px;background:#fff;box-shadow:0 8px 24px #759cc333,0 0 0 1px #e6ecf5;transform:rotate(6deg)}
.dropzone-art b{position:absolute;right:-8px;bottom:-6px;width:30px;height:30px;border-radius:50%;background:var(--blue);color:#fff;font-size:22px;line-height:28px;font-weight:500;box-shadow:0 0 0 4px #fff}
.home-drop{flex-direction:row;text-align:left;padding:22px 26px;gap:18px;flex-wrap:wrap;margin-bottom:12px}.home-drop .drop-copy{flex:1;min-width:220px}.home-drop strong{display:block;font-size:18px}
.home-drop .drop-copy span{color:#6b7a90;font-size:13px;font-weight:500}
.suggest{display:flex;align-items:center;gap:12px;flex-wrap:wrap;background:#fff;border:1px solid #b9d3fb;border-radius:16px;padding:14px 18px;margin-bottom:12px;box-shadow:0 10px 40px #3182f614}.suggest-tools{display:flex;gap:8px;flex-wrap:wrap;flex:1}
.tool-query{width:100%;background:#fff;border:1px solid #e1e7ef;border-radius:13px;padding:13px 16px;font-size:14px;font-weight:550;margin-bottom:28px;color:var(--ink)}
/* directory */
.directory section{margin-bottom:28px}.directory h2{font-size:12.5px;letter-spacing:.08em;color:#7b889a;margin:0 0 10px;font-weight:800;text-transform:uppercase}
.tool-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(248px,1fr));gap:10px}
.tool-card{display:flex;gap:12px;align-items:center;background:#fff;border:1px solid #e6ebf2;border-radius:15px;padding:13px 14px;transition:border-color .15s,box-shadow .15s}
.tool-card:hover{border-color:var(--blue);box-shadow:0 10px 34px #1d396114}
.tool-badge{flex:none;width:44px;height:44px;border-radius:12px;display:grid;place-items:center;font-size:11.5px;font-weight:850;color:#fff;letter-spacing:.02em}
.tool-badge.image{background:#3182f6}.tool-badge.pdf{background:#e5484d}.tool-badge.video{background:#8250df}.tool-badge.game{background:#12925f}
.tool-card b{display:block;font-size:14.5px;letter-spacing:-.3px;font-weight:750}.tool-card small{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:#6b7a90;font-size:12px;line-height:1.45;font-weight:500}
.no-result{color:var(--muted);padding:12px 2px}
/* batch workspace */
.work{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(300px,1fr);gap:16px;align-items:start}
.viewer,.side{background:#fff;border:1px solid #e6ebf2;border-radius:22px}.viewer{padding:14px;position:sticky;top:12px}
.cmp{position:relative;border-radius:13px;overflow:hidden;aspect-ratio:3/2;max-height:68vh;margin:0 auto;user-select:none;background-color:#fff;background-image:linear-gradient(45deg,#edf0f4 25%,transparent 25%),linear-gradient(-45deg,#edf0f4 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#edf0f4 75%),linear-gradient(-45deg,transparent 75%,#edf0f4 75%);background-size:18px 18px;background-position:0 0,0 9px,9px -9px,-9px 0}
.cmp img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;display:block}.cmp-after{clip-path:inset(0 0 0 var(--cut,50%));background-color:#fff;background-image:linear-gradient(45deg,#edf0f4 25%,transparent 25%),linear-gradient(-45deg,#edf0f4 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#edf0f4 75%),linear-gradient(-45deg,transparent 75%,#edf0f4 75%);background-size:18px 18px;background-position:0 0,0 9px,9px -9px,-9px 0}
.cmp-bar{position:absolute;top:0;bottom:0;left:var(--cut,50%);width:2px;margin-left:-1px;background:#fff;box-shadow:0 0 0 1px #0003;pointer-events:none}
.cmp-bar::after{content:"◂ ▸";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background:#fff;color:#192638;font-size:11px;font-weight:800;border-radius:20px;padding:6px 9px;white-space:nowrap;box-shadow:0 2px 12px #0004}
.cmp input[type=range]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:ew-resize;margin:0}
.cmp-tag{position:absolute;top:10px;font-size:11px;font-weight:800;background:#000a;color:#fff;border-radius:7px;padding:3px 8px;pointer-events:none}.cmp-tag.l{left:10px}.cmp-tag.r{right:10px}
.cmp.no-compare .cmp-bar,.cmp.no-compare .cmp-tag,.cmp.no-compare input{display:none}.hint.warning{color:#a15c07;background:#fff6e5;padding:9px 11px;border-radius:10px}
.cmp.is-pending .cmp-bar,.cmp.is-pending .cmp-tag.r{display:none}.cmp.is-pending::after,.cmp.is-upgrading::after{content:"";position:absolute;right:12px;top:12px;width:18px;height:18px;border-radius:50%;border:2.5px solid #fff8;border-top-color:var(--blue);animation:spin 1s linear infinite}
.contents{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;max-height:64vh;overflow:auto;padding:2px}
.content{margin:0;display:grid;grid-template-columns:1fr auto;gap:6px 4px;align-items:center;border:1px solid #e6ebf2;border-radius:14px;padding:8px;background:#fbfcfe}
.content-thumb{grid-column:1/-1;height:120px;border-radius:10px;display:grid;place-items:center;overflow:hidden;background:#fff conic-gradient(#eef2f7 25%,#fff 0 50%,#eef2f7 0 75%,#fff 0) 0 0/16px 16px}
.content-thumb img{width:100%;height:100%;object-fit:scale-down}.content-thumb.is-file{background:#f4f7fb}.content-thumb.px img{image-rendering:pixelated}
.content-ext{font-size:12px;font-weight:800;letter-spacing:.06em;color:#51607a;background:#eef2f7;border-radius:8px;padding:6px 10px}
.content figcaption{min-width:0;display:grid;gap:1px}.content strong{font-size:12px;font-weight:700;color:#1b2536;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content strong small{font-weight:500;color:#6b7a90}
.content figcaption span{font-size:11px;color:#6b7a90;font-variant-numeric:tabular-nums}
.content .icon-btn{width:30px;height:30px;border-radius:9px;color:#51607a;font-size:16px;background:none;border:0;cursor:pointer}.content .icon-btn:hover{background:#eef2f7;color:var(--ink)}
.viewer-actions{display:flex;flex-wrap:wrap;gap:8px;margin:10px 2px 0}.viewer-actions:empty{display:none}
.brush-bar .segmented{display:inline-flex;gap:6px}.brush-bar .segmented button{padding:9px 14px}.brush-bar .primary,.brush-bar .ghost{width:auto;padding:10px 18px}
.brush-dialog{border:0;border-radius:20px;padding:14px;width:min(1100px,96vw);max-height:94vh;box-shadow:0 30px 90px #0b142540;display:flex;flex-direction:column;gap:10px}.brush-dialog:not([open]){display:none}.brush-dialog::backdrop{background:#0b1425b3}
.brush-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.brush-gap{flex:1}.brush-size{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:700;color:#51607a}.brush-size input{width:130px}
.brush-stage{position:relative;overflow:auto;border-radius:13px;min-height:200px;max-height:70vh;text-align:center;background-color:#fff;background-image:linear-gradient(45deg,#edf0f4 25%,transparent 25%),linear-gradient(-45deg,#edf0f4 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#edf0f4 75%),linear-gradient(-45deg,transparent 75%,#edf0f4 75%);background-size:18px 18px;background-position:0 0,0 9px,9px -9px,-9px 0}
.brush-stage canvas{display:block;margin:0 auto;max-width:100%;max-height:70vh;touch-action:none;cursor:none}
.brush-cursor{position:absolute;border-radius:50%;border:1.5px solid #fff;box-shadow:0 0 0 1.5px #0b1425cc;pointer-events:none}
.viewer-note{font-size:12px;color:#6b7a90;margin:10px 4px 2px;line-height:1.6;font-weight:500}
.side{padding:18px;display:flex;flex-direction:column;gap:14px}
.summary{background:#e3f6ee;border-radius:15px;padding:14px 16px}.summary-big{font-size:42px;font-weight:850;letter-spacing:-2px;line-height:1;color:#12925f;font-variant-numeric:tabular-nums}.summary-big.muted{color:#9fb5ab}
.summary-line{font-size:13px;color:#4e6a5d;margin-top:7px;font-variant-numeric:tabular-nums;font-weight:600}
.segmented{display:grid;grid-template-columns:repeat(auto-fit,minmax(64px,1fr));gap:6px}.segmented button{border:1px solid #e1e7ef;border-radius:12px;padding:10px 6px;font-size:13px;font-weight:750}
.segmented small{display:block;font-weight:500;color:#7b889a;font-size:11px;margin-top:2px}.segmented [aria-pressed="true"]{border-color:var(--blue);background:var(--blue-soft);color:var(--blue)}
.chips-row{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:10px}.field.compact{display:flex;align-items:center;gap:6px;margin:0 0 0 auto}.field.compact input{width:84px!important}.field.compact span{margin:0}.options-simple .field-row{margin-top:10px}.options-simple .field{margin:0}.summary-big{overflow-wrap:anywhere}
.options-advanced{border-top:1px solid var(--line);padding-top:12px}.options-advanced summary{cursor:pointer;font-size:13px;font-weight:750;color:#51647d}
.options-advanced[open] summary{margin-bottom:12px}.options-advanced .field{margin-bottom:12px}.options-advanced .field small{display:block;font-size:11px;color:#8b97a8;margin-top:5px;font-weight:500}
.field-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.field.inline{display:flex;align-items:center;gap:10px}.field.inline span{margin:0}.field.inline input{width:54px!important}
.check{display:flex;gap:8px;align-items:flex-start;font-size:12.5px;color:#51647d;margin-bottom:12px;font-weight:550}.check input{accent-color:var(--blue);margin-top:2px}
.file-list{display:flex;flex-direction:column;gap:6px;max-height:260px;overflow:auto}
.file{display:flex;align-items:center;gap:4px;border:1px solid #e6ebf2;border-radius:12px;padding:4px 6px 4px 4px}.file.is-current{border-color:var(--blue);background:#f7faff}
.file-main{display:flex;align-items:center;gap:10px;flex:1;min-width:0;text-align:left;padding:4px;font-weight:inherit}.file-main img{width:40px;height:40px;border-radius:8px;object-fit:cover;flex:none;background:#eef2f7}
.file-main span{flex:1;min-width:0}.file-main b{display:block;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:700}.file-main small{color:#7b889a;font-size:11.5px;font-variant-numeric:tabular-nums;font-weight:500}
.pill{flex:none;font-style:normal;font-size:11.5px;font-weight:800;color:#7b889a;background:#f0f4f9;border-radius:20px;padding:3px 9px;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-variant-numeric:tabular-nums}
.pill.good{color:#12925f;background:#e3f6ee}.pill.bad{color:#b3383f;background:#fdecee}
.file .icon{width:30px;height:30px;border-radius:9px;color:#7b889a;font-size:16px;flex:none}.file .icon:hover{background:#f0f4f9;color:var(--ink)}
.list-actions{display:flex;align-items:center;gap:12px}.dashed{flex:1;border:1.5px dashed #d5deea;border-radius:12px;padding:10px;color:#6b7a90;font-weight:700;font-size:13px}.dashed:hover{border-color:var(--blue);color:var(--blue)}
.primary.big{width:100%;padding:16px;font-size:15px}
.next{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px;color:#7b889a;font-weight:650}.next:empty{display:none}.next .chip{font-size:12px;padding:7px 11px}
.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:#253347;color:#fff;max-width:min(560px,calc(100vw - 28px));padding:13px 18px;border-radius:13px;font-size:13px;line-height:1.55;z-index:60;box-shadow:0 8px 35px #14294530}.toast.error{background:#a83e47}
.pdf-work{grid-template-columns:minmax(0,2.1fr) minmax(300px,1fr)}
.board{background:#fff;border:1px solid #e6ebf2;border-radius:22px;padding:14px;min-width:0}
.board-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:2px 2px 12px;border-bottom:1px solid var(--line);margin-bottom:14px}.board-count{font-size:12.5px;color:#6b7a90;font-weight:650;margin-right:auto}
.board-tools{display:flex;gap:4px;flex-wrap:wrap}.board-tools button{font-size:12.5px;font-weight:700;color:#51647d;padding:7px 10px;border-radius:9px;background:#f3f6fa}.board-tools button:hover:not(:disabled){background:#e6edf6;color:var(--ink)}.board-tools .danger:hover:not(:disabled){background:#fdecee;color:#b3383f}
.pages{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:14px 12px;max-height:70vh;overflow:auto;padding:4px}
.pg{position:relative;border:2px solid transparent;border-radius:14px;padding:8px 8px 26px;background:#f6f8fb;cursor:grab;user-select:none;transition:border-color .12s,background .12s}
.pg:hover{background:#eef3fa}.pg.is-selected{border-color:var(--blue);background:var(--blue-soft)}.pg.is-dragging{opacity:.35}
.pg.drop-before::before,.pg.drop-after::before{content:"";position:absolute;top:6px;bottom:6px;width:4px;border-radius:4px;background:var(--blue)}.pg.drop-before::before{left:-9px}.pg.drop-after::before{right:-9px}
.pg-frame{aspect-ratio:1;display:grid;place-items:center;overflow:hidden;border-radius:8px}.pg-frame img{max-width:100%;max-height:100%;background:#fff;box-shadow:0 2px 10px #1d396122;transition:transform .18s;min-width:40%;min-height:40%}
.pg-num{position:absolute;left:0;right:0;bottom:6px;text-align:center;font-size:11.5px;font-weight:750;color:#51647d;font-variant-numeric:tabular-nums}
.pg-src{position:absolute;left:8px;bottom:5px;font-size:10px;font-weight:850;color:#fff;border-radius:6px;padding:1px 6px;background:#3182f6}.pg-src.inline{position:static;flex:none;margin-left:6px}
.pg-src.s1{background:#e5484d}.pg-src.s2{background:#12925f}.pg-src.s3{background:#8250df}.pg-src.s4{background:#d97706}.pg-src.s5{background:#0e7490}
.pg-actions{position:absolute;top:6px;right:6px;display:flex;gap:3px;opacity:0;transition:opacity .12s}.pg:hover .pg-actions,.pg:focus-within .pg-actions,.pg.is-selected .pg-actions{opacity:1}
.pg-actions button{width:26px;height:26px;border-radius:8px;background:#fffE;color:#34465c;font-size:14px;box-shadow:0 1px 6px #0002}.pg-actions button:hover{background:#fff;color:var(--blue)}
.pg.starts-part{margin-left:10px}.pg[data-part]::after{content:attr(data-part);position:absolute;top:-9px;left:8px;font-size:10px;font-weight:800;color:#fff;background:#51647d;border-radius:6px;padding:1px 7px}
.split-modes{grid-template-columns:repeat(auto-fit,minmax(84px,1fr))}.split-modes button{font-size:12px;padding:9px 4px}#pdfModeFields{margin-top:12px}
.file-main.static{cursor:default}.result-box{display:flex;align-items:center;gap:10px;flex-wrap:wrap;background:#e3f6ee;border-radius:14px;padding:12px 14px;font-size:13px;color:#2f5c49}.result-box strong{color:#12925f}.result-box .ghost{margin-left:auto;padding:8px 12px;background:#fff}
.editor{background:#fff;border:1px solid #e6ebf2;border-radius:22px;overflow:hidden}
.ed-bar{display:flex;align-items:center;gap:4px;flex-wrap:wrap;padding:10px 12px;border-bottom:1px solid var(--line);background:#fbfcfe;position:sticky;top:0;z-index:5}
.ed-tool{display:flex;flex-direction:column;align-items:center;gap:1px;min-width:54px;padding:6px 8px;border-radius:10px;color:#44566d;font-weight:650}.ed-tool span{font-size:17px;line-height:20px}.ed-tool em{font-style:normal;font-size:10.5px}
.ed-tool:hover:not(:disabled){background:#eef3fa}.ed-tool[aria-pressed="true"]{background:var(--blue);color:#fff}.ed-tool.small{min-width:36px;font-size:16px;padding:8px}.ed-tool.danger:hover:not(:disabled){background:#fdecee;color:#b3383f}
.ed-sep{width:1px;height:28px;background:var(--line);margin:0 6px}.ed-prop{display:flex;align-items:center;gap:6px;font-size:11px;color:#6b7a90;font-weight:650}.ed-prop input[type=color]{width:32px;height:32px;border:1px solid #d8e0ea;border-radius:9px;padding:2px;background:#fff}.ed-prop input[type=number]{width:62px;border:1px solid #d8e0ea;border-radius:9px;padding:7px 8px;font-weight:650}
.ed-body{display:grid;grid-template-columns:112px minmax(0,1fr) 280px;min-height:520px}
.ed-rail{display:flex;flex-direction:column;gap:10px;padding:12px;overflow:auto;max-height:78vh;border-right:1px solid var(--line);background:#f8fafc}
.ed-thumb{position:relative;border:2px solid transparent;border-radius:9px;padding:4px 4px 18px;background:#fff}.ed-thumb.is-current{border-color:var(--blue)}.ed-thumb img{width:100%;display:block;min-height:60px;background:#f0f3f7}.ed-thumb span{position:absolute;left:0;right:0;bottom:2px;font-size:10.5px;font-weight:750;color:#6b7a90}.ed-thumb i{position:absolute;top:6px;right:6px;width:8px;height:8px;border-radius:50%;background:var(--blue)}
.ed-stage{overflow:auto;max-height:78vh;background:#e9edf3;padding:20px;display:block}
.ed-page{position:relative;margin:0 auto;background:#fff;box-shadow:0 6px 30px #1d396126;touch-action:none}.ed-page canvas{position:absolute;inset:0;width:100%;height:100%}
.ed-svg,.ed-layer,.ed-capture{position:absolute;inset:0;width:100%;height:100%}.ed-svg{overflow:visible}.ed-svg *{pointer-events:none}.ed-page[data-tool="select"] .ed-svg [data-index]{pointer-events:all;cursor:move}
.ed-svg .is-selected{filter:drop-shadow(0 0 2px #3182f6)}.ed-layer{pointer-events:none}.ed-layer>*{pointer-events:auto}.ed-capture{cursor:crosshair;z-index:3}.ed-page[data-tool="text"] .ed-layer{pointer-events:auto;cursor:text}
.ed-text{position:absolute;min-width:12px;white-space:pre;line-height:1.35;font-family:Helvetica,Arial,"Noto Sans KR",sans-serif;outline:1px dashed transparent;padding:0;cursor:move}.ed-text:hover,.ed-text.is-selected{outline-color:#3182f6}.ed-text:focus{outline:1.5px solid #3182f6;cursor:text;background:#3182f60d}
.ed-img{position:absolute;cursor:move}.ed-img img{width:100%;height:100%;display:block;pointer-events:none}.ed-img.is-selected{outline:1.5px solid #3182f6}
.ed-selection{position:absolute;outline:1.5px solid #3182f6;pointer-events:none!important}.ed-handle{position:absolute;right:-7px;bottom:-7px;width:14px;height:14px;border-radius:50%;background:#fff;border:2px solid #3182f6;pointer-events:auto;cursor:nwse-resize}
.doc-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.doc-actions .opt-label{width:100%;margin:0 0 2px}.sign-dialog .field{display:block;margin-top:12px}.sign-dialog .field>span{display:block;font-size:11.5px;font-weight:750;color:#6b7a90;margin-bottom:6px}.sign-dialog select,.sign-dialog input[type=number]{width:100%;border:1px solid #d8e0ea;border-radius:11px;padding:10px 12px;background:#fff}.sign-dialog input[type=range]{width:100%;accent-color:var(--blue)}.sign-dialog input[type=color]{width:100%;height:40px;border:1px solid #d8e0ea;border-radius:11px;padding:3px;background:#fff}
.ed-side{border:0;border-left:1px solid var(--line);border-radius:0}.ed-foot{display:flex;align-items:center;justify-content:center;gap:8px;padding:9px;border-top:1px solid var(--line);font-size:12.5px;font-weight:700;color:#51647d;font-variant-numeric:tabular-nums}
.ed-foot button{min-width:32px;height:32px;border-radius:9px;background:#f0f4f9;padding:0 10px;font-size:14px}.ed-foot button:hover{background:#e3eaf3}
.sign-dialog{width:min(640px,calc(100vw - 24px))}.sign-dialog h2{margin:0 0 14px;font-size:19px}.sign-dialog canvas{width:100%;border:1.5px dashed #c5d2e2;border-radius:14px;margin-top:14px;touch-action:none;background:#fff;cursor:crosshair}
.sign-dialog input[type=text]{width:100%;margin-top:14px;border:1px solid #d8e0ea;border-radius:11px;padding:12px}.sign-preview{min-height:110px;display:grid;place-items:center;font:italic 54px "Segoe Script","Brush Script MT","Apple Chancery",cursive;color:#14213d;overflow:hidden}
.sign-dialog [data-pane="upload"]{margin-top:16px;display:grid;gap:12px}.sign-actions{justify-content:flex-end}.sign-actions>*{flex:none}
@media(max-width:980px){.ed-body{grid-template-columns:minmax(0,1fr)}.ed-rail{flex-direction:row;max-height:none;border-right:0;border-bottom:1px solid var(--line)}.ed-thumb{flex:none;width:64px}.ed-side{border-left:0;border-top:1px solid var(--line)}.ed-tool em{display:none}.ed-tool{min-width:40px}.ed-stage{max-height:62vh;padding:10px}}
.atlas-work{grid-template-columns:minmax(0,2fr) minmax(300px,1fr)}.atlas-views{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(160px,1fr);gap:14px}
.view-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:12.5px;color:#6b7a90;margin-bottom:8px}.view-head strong{color:var(--ink);font-size:13px}.view-head .check.mini{margin:0 0 0 auto;font-size:11.5px}.frames-head{margin-top:16px}.frames-head .mini-button:first-of-type{margin-left:auto}
.mini-button{font-size:11.5px;font-weight:750;color:#51647d;background:#f0f4f9;border-radius:8px;padding:5px 9px}.mini-button:hover{background:#e3eaf3}.view-head .mini-button{margin-left:auto}
.atlas-canvas{position:relative;max-height:52vh;border-radius:12px;overflow:hidden;background-color:#fff;background-image:linear-gradient(45deg,#e7ebf1 25%,transparent 25%),linear-gradient(-45deg,#e7ebf1 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e7ebf1 75%),linear-gradient(-45deg,transparent 75%,#e7ebf1 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0;margin:0 auto}
.atlas-canvas canvas{display:block;width:100%;height:100%;object-fit:contain}.atlas-canvas svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.atlas-canvas svg rect{fill:none;stroke:#3182f6;stroke-width:1;vector-effect:non-scaling-stroke;opacity:.75}
.anim-canvas{aspect-ratio:1;display:grid;place-items:center}.anim-canvas canvas{width:70%;height:70%}.px{image-rendering:pixelated}.fps{margin-top:10px}.fps input{width:100%;accent-color:var(--blue)}
.frame-strip{display:flex;gap:8px;overflow-x:auto;padding:4px 2px 10px}.frame-chip{position:relative;flex:none;width:68px;height:78px;border-radius:11px;background:#f4f7fb;padding:6px 6px 18px;cursor:grab}.frame-chip img{width:100%;height:100%;object-fit:contain}
.frame-chip span{position:absolute;left:0;right:0;bottom:3px;text-align:center;font-size:10.5px;font-weight:750;color:#6b7a90}.frame-chip button{position:absolute;top:2px;right:2px;width:20px;height:20px;border-radius:7px;background:#fffd;color:#51647d;font-size:13px;opacity:0}.frame-chip:hover button,.frame-chip:focus-within button{opacity:1}
.options textarea{width:100%;border:1px solid #d8e0ea;border-radius:10px;padding:9px 11px;font:12px/1.5 ui-monospace,Consolas,monospace;resize:vertical}
.opt-label{display:block;font-size:11px;font-weight:750;color:#7b8798;margin:12px 0 6px}.opt-label:first-child{margin-top:0}.summary-line.bad{color:#b3383f}
/* Pixel Lab: stage bar, pixel viewer with a candidate overlay, palette swatches and reports. */
.plab-stages{display:flex;gap:4px;overflow-x:auto;padding:2px 2px 12px;border-bottom:1px solid var(--line);margin-bottom:12px;scrollbar-width:thin}
.plab-stages button{flex:none;font-size:12.5px;font-weight:750;color:#51647d;background:#f3f6fa;border-radius:9px;padding:7px 12px}
.plab-stages button:hover{background:#e6edf6;color:var(--ink)}.plab-stages button[aria-current=page]{background:var(--blue);color:#fff}
.plab-view{position:relative;max-height:52vh;border-radius:12px;overflow:hidden;background-color:#fff;background-image:linear-gradient(45deg,#e7ebf1 25%,transparent 25%),linear-gradient(-45deg,#e7ebf1 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e7ebf1 75%),linear-gradient(-45deg,transparent 75%,#e7ebf1 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0;margin:0 auto}
.plab-view canvas{display:block;width:100%;height:100%;object-fit:contain}.plab-layer{position:absolute;inset:0;pointer-events:none}
.plab-compare{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:8px;margin-top:12px}
.plab-compare figure{margin:0;background:#f4f7fb;border-radius:10px;padding:6px;text-align:center}
.plab-compare canvas{width:100%;height:auto;display:block;border-radius:6px;background:#fff}
.plab-compare figcaption{font-size:10.5px;font-weight:700;color:#6b7a90;margin-top:4px;overflow-wrap:anywhere}
.plab-swatches{display:grid;grid-template-columns:repeat(auto-fill,minmax(58px,1fr));gap:6px}
.plab-swatches.small{grid-template-columns:repeat(auto-fill,minmax(30px,1fr))}
.plab-swatch{position:relative;display:flex;flex-direction:column;align-items:center;gap:3px;padding:5px 3px;border-radius:9px;background:#f4f7fb;font-size:9.5px;font-weight:700;color:#6b7a90;line-height:1.2}
.plab-swatch:hover{background:#e6edf6}.plab-swatch[aria-pressed=true],.plab-swatch.is-on{background:var(--blue-soft);color:var(--blue);outline:2px solid var(--blue);outline-offset:-2px}
.plab-swatch.is-locked::after{content:'F512';position:absolute;top:1px;right:3px;font-size:9px}
.plab-swatch em{font-style:normal;font-size:9px;color:#8b98a9}.plab-swatch.is-static{cursor:default}.plab-swatch b{position:absolute;top:0;right:2px;font-size:10px;color:var(--blue)}
.plab-chip{display:block;width:100%;aspect-ratio:1;min-height:18px;border-radius:5px;background:var(--c,#fff);box-shadow:inset 0 0 0 1px #0002}
.plab-picked{display:flex;flex-direction:column;gap:6px;margin-top:10px}
.plab-row{display:flex;align-items:center;gap:6px;flex-wrap:wrap;background:#f7f9fc;border-radius:10px;padding:6px 8px}
.plab-row .plab-chip{width:20px;flex:none}.plab-row code{font-size:11.5px;font-weight:750;color:var(--ink)}.plab-row small{font-size:10.5px;color:#6b7a90}
.plab-row input[type=color]{width:30px;height:24px;padding:0;border:1px solid #d8e0ea;border-radius:6px;background:none;margin-left:auto}
.plab-list{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-direction:column;gap:5px;font-size:12px;color:#51647d}
.plab-list li{background:#f7f9fc;border-radius:8px;padding:6px 9px;overflow-wrap:anywhere}
.plab-offenders{margin:8px 0 0;padding:0 0 0 18px;font-size:11.5px;color:#51647d;display:flex;flex-direction:column;gap:4px}
.plab-offenders li{overflow-wrap:anywhere}.plab-offenders .plab-chip{display:inline-block;width:12px;height:12px;vertical-align:-2px;margin-right:4px}
.frame-chip.is-current{outline:2px solid var(--blue);outline-offset:-1px;background:var(--blue-soft)}
@media(max-width:600px){.plab-view{max-height:40vh}.plab-swatches{grid-template-columns:repeat(auto-fill,minmax(48px,1fr))}.plab-row input[type=color]{margin-left:0}}

@media(max-width:860px){.atlas-views{grid-template-columns:1fr}.anim-canvas{max-height:220px}}
.view-head .segmented{display:inline-flex;flex:none;margin-left:auto;gap:6px}.view-head .segmented button{padding:7px 10px;font-size:11.5px;font-weight:700}
/* sprite slicer: the sheet with the frame boxes drawn over it */
.slicer-work .atlas-views{align-items:start}
.slicer-stage{max-height:56vh;overflow:auto;border-radius:12px;background-color:#fff;background-image:linear-gradient(45deg,#e7ebf1 25%,transparent 25%),linear-gradient(-45deg,#e7ebf1 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e7ebf1 75%),linear-gradient(-45deg,transparent 75%,#e7ebf1 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0}
.slicer-sheet{position:relative;margin:0 auto;max-width:100%}.slicer-sheet canvas{display:block;width:100%;height:auto}
.slicer-sheet svg{position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:crosshair;outline:none}
.slicer-sheet svg:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.slicer-box rect{fill:#3182f60f;stroke:#3182f6;stroke-width:1;vector-effect:non-scaling-stroke}
.slicer-box text{fill:#fff;paint-order:stroke;stroke:#1b2536;stroke-width:3;font-weight:800;pointer-events:none}
.slicer-box.is-selected rect{fill:#ffb02e2e;stroke:#f97316;stroke-width:2}
.slicer-new{fill:#3182f626;stroke:#3182f6;stroke-dasharray:4 3;vector-effect:non-scaling-stroke}
.slicer-handle{fill:#fff;stroke:#f97316;stroke-width:1.5;vector-effect:non-scaling-stroke;cursor:nwse-resize}
.frame-chip.is-selected{outline:2px solid #f97316;background:#fff4e6}.frame-chip.is-more{display:grid;place-items:center;width:52px;font-size:12px;font-weight:750;color:#6b7a90}
.frame-chip canvas{width:100%;height:100%;object-fit:contain;image-rendering:pixelated}
.slicer-rect{margin:2px 2px 8px}.slicer-rect .field-row{grid-template-columns:repeat(4,1fr)}.slicer-rect .opt-label{margin-top:0}.slicer-rect .field.inline input{width:100%!important}
/* frame normaliser: every frame on the one canvas, plus the onion skin */
.norm-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:10px;max-height:52vh;overflow:auto;padding:2px}
.norm-cell{margin:0;display:grid;gap:4px}.norm-hold{border-radius:10px;overflow:hidden;background-color:#fff;background-image:linear-gradient(45deg,#e7ebf1 25%,transparent 25%),linear-gradient(-45deg,#e7ebf1 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e7ebf1 75%),linear-gradient(-45deg,transparent 75%,#e7ebf1 75%);background-size:12px 12px;background-position:0 0,0 6px,6px -6px,-6px 0;border:1px solid #e6ebf2}
.norm-hold canvas{display:block;width:100%;height:auto}
.norm-cell figcaption{font-size:10.5px;color:#6b7a90;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.norm-onion{max-height:52vh}.norm-onion canvas{display:block;width:100%;height:100%;object-fit:contain}
/* mask packer: the packed texture and one preview per channel */
.mask-main{max-height:min(40vh,340px);max-width:340px;margin:0 0 12px}.mask-main canvas{display:block;width:100%;height:100%;object-fit:contain}
.mask-channels{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:10px}
.mask-channel{margin:0;display:grid;gap:4px}.mask-channel canvas{display:block;width:100%;height:auto;border-radius:10px;border:1px solid #e6ebf2;background:#f6f8fb}
.mask-channel figcaption{font-size:11px;font-weight:700;color:#51647d}
.mask-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;margin-bottom:8px}.mask-row .field{margin:0}.mask-row .check{margin:0;font-size:11.5px}.mask-row .field small{font-weight:500;color:#8b97a8}
@media(max-width:860px){.plab{grid-template-columns:minmax(0,1fr)}.plab-view{max-height:44vh}}
@media(max-width:420px){.plab-stages button{padding:7px 9px;font-size:12px}.plab-compare{grid-template-columns:repeat(auto-fill,minmax(88px,1fr))}.plab-list li,.plab-row small{font-size:11px}}
@media(hover:none){.frame-chip button{opacity:1}.pg-actions{opacity:1}}
@media(max-width:860px){.pages{max-height:none;grid-template-columns:repeat(auto-fill,minmax(104px,1fr))}.work{grid-template-columns:minmax(0,1fr)}.viewer{position:static}.cmp{max-height:46vh}}
@media(max-width:600px){.page{padding:0 16px 32px}.page-header{padding:14px 16px}.page-header .local-pill{display:none}.dropzone{padding:34px 18px}.home-drop{flex-direction:column;align-items:stretch;text-align:center}.home-drop .primary{width:100%}.field-row{grid-template-columns:1fr}.tool-grid{grid-template-columns:1fr}}
.crop-work{grid-template-columns:minmax(0,1.75fr) minmax(300px,1fr)}
.crop-bar{display:flex;align-items:center;gap:4px;flex-wrap:wrap;padding:0 2px 12px;border-bottom:1px solid var(--line);margin-bottom:12px}
.crop-bar .crop-gap{flex:1}.crop-bar .mini-button{min-width:34px;height:32px;font-size:15px;line-height:1}.crop-bar .mini-button.wide{font-size:12px;padding:0 10px}
.crop-bar .mini-button:disabled{opacity:.4}
.crop-stage{display:grid;place-items:center;border-radius:14px;padding:10px;background-color:#eef1f6;background-image:linear-gradient(45deg,#e3e8ef 25%,transparent 25%),linear-gradient(-45deg,#e3e8ef 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e3e8ef 75%),linear-gradient(-45deg,transparent 75%,#e3e8ef 75%);background-size:18px 18px;background-position:0 0,0 9px,9px -9px,-9px 0}
.crop-frame{position:relative;width:100%;max-width:calc(var(--arn,1.5) * 62vh);aspect-ratio:var(--ar,3/2);margin:0 auto;overflow:hidden;border-radius:6px;touch-action:none;user-select:none;cursor:crosshair;box-shadow:0 4px 22px #1d396126}
.crop-frame canvas{display:block;width:100%;height:100%}
.crop-box{position:absolute;box-shadow:0 0 0 9999px #0b1425a6;outline:1.5px solid #fff;cursor:move}
.crop-box:focus-visible{outline:2px solid var(--blue);outline-offset:1px}
.crop-thirds{position:absolute;inset:0;border-radius:inherit;pointer-events:none;background-image:linear-gradient(to right,#0000 calc(33.333% - .5px),#ffffff59 calc(33.333% - .5px),#ffffff59 calc(33.333% + .5px),#0000 calc(33.333% + .5px),#0000 calc(66.666% - .5px),#ffffff59 calc(66.666% - .5px),#ffffff59 calc(66.666% + .5px),#0000 calc(66.666% + .5px)),linear-gradient(to bottom,#0000 calc(33.333% - .5px),#ffffff59 calc(33.333% - .5px),#ffffff59 calc(33.333% + .5px),#0000 calc(33.333% + .5px),#0000 calc(66.666% - .5px),#ffffff59 calc(66.666% - .5px),#ffffff59 calc(66.666% + .5px),#0000 calc(66.666% + .5px))}
.crop-handle{position:absolute;width:14px;height:14px;background:#fff;border-radius:3px;box-shadow:0 1px 4px #0b142566;touch-action:none}
.crop-handle.h-nw{left:-7px;top:-7px;cursor:nwse-resize}.crop-handle.h-ne{right:-7px;top:-7px;cursor:nesw-resize}
.crop-handle.h-se{right:-7px;bottom:-7px;cursor:nwse-resize}.crop-handle.h-sw{left:-7px;bottom:-7px;cursor:nesw-resize}
.crop-handle.h-n{left:50%;top:-7px;margin-left:-7px;cursor:ns-resize}.crop-handle.h-s{left:50%;bottom:-7px;margin-left:-7px;cursor:ns-resize}
.crop-handle.h-w{top:50%;left:-7px;margin-top:-7px;cursor:ew-resize}.crop-handle.h-e{top:50%;right:-7px;margin-top:-7px;cursor:ew-resize}
.options .field.spaced{margin-top:12px}.options .field.spaced>span{display:block;font-size:11.5px;font-weight:750;color:#6b7a90;margin-bottom:6px}
.options .field.spaced select{width:100%;border:1px solid #d8e0ea;border-radius:11px;padding:10px 12px;background:#fff}
#cropApplyAll{width:100%}
@media(max-width:860px){.crop-work{grid-template-columns:minmax(0,1fr)}.crop-frame{max-width:calc(var(--arn,1.5) * 48vh)}.crop-handle{width:20px;height:20px}
 .crop-handle.h-nw,.crop-handle.h-sw{left:-10px}.crop-handle.h-ne,.crop-handle.h-se{right:-10px}
 .crop-handle.h-nw,.crop-handle.h-ne{top:-10px}.crop-handle.h-se,.crop-handle.h-sw{bottom:-10px}
 .crop-handle.h-n{top:-10px;margin-left:-10px}.crop-handle.h-s{bottom:-10px;margin-left:-10px}
 .crop-handle.h-w{left:-10px;margin-top:-10px}.crop-handle.h-e{right:-10px;margin-top:-10px}}
.media-work{grid-template-columns:minmax(0,1.7fr) minmax(300px,1fr)}
.media-tabs{display:flex;gap:6px;margin-bottom:10px}.media-tabs .mini-button[aria-pressed="true"]{background:var(--blue);color:#fff}
.media-stage{position:relative;border-radius:14px;overflow:hidden;background:#11161d;aspect-ratio:16/9;max-height:56vh;display:grid;place-items:center}
.media-stage video,.media-out img,.media-out video{display:block;width:100%;height:100%;object-fit:contain;background:#11161d}
.media-out{position:absolute;inset:0;display:grid;place-items:center;background:#11161d}.media-out audio{width:min(92%,420px)}
.media-art{position:absolute;color:#c7d3e2;font-size:13px;font-weight:700;letter-spacing:.04em}
.transport{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:12px 0 8px}
.transport-time{font-variant-numeric:tabular-nums;font-size:13px;font-weight:750;color:var(--ink);margin-left:6px}.transport-end{font-size:12px;color:#8b97a8;font-variant-numeric:tabular-nums}
.transport-tools{display:flex;gap:6px;margin-left:auto;flex-wrap:wrap}
.tl{position:relative;height:56px;border-radius:12px;overflow:hidden;background:#eef2f7;touch-action:none;user-select:none}
.tl-strip{position:absolute;inset:0;display:flex}.tl-strip img{flex:1 1 0;min-width:0;height:100%;object-fit:cover;pointer-events:none}
.tl-dim{position:absolute;top:0;bottom:0;background:#0b111ab8;pointer-events:none}.tl-dim.l{left:0}.tl-dim.r{right:0}
.tl-head{position:absolute;top:0;bottom:0;width:2px;background:#fff;box-shadow:0 0 0 1px #0b111a66;pointer-events:none}
.tl-handle{position:absolute;top:0;bottom:0;width:16px;margin-left:-8px;background:var(--blue);border-radius:5px;cursor:ew-resize;box-shadow:0 0 0 1px #ffffffaa}
.tl-handle::after{content:"";position:absolute;left:50%;top:50%;width:2px;height:18px;margin:-9px 0 0 -1px;background:#fff;border-radius:2px}
.tl-handle:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
.time-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:10px}.time-row .field.inline input{width:84px!important}
.time-span{font-size:12.5px;font-weight:750;color:#51647d;font-variant-numeric:tabular-nums;margin-left:auto}
.progress{display:flex;flex-direction:column;gap:7px}.progress-bar{height:8px;border-radius:5px;background:#e6ebf2;overflow:hidden}
.progress-bar span{display:block;height:100%;width:0;background:var(--blue);border-radius:5px;transition:width .2s}
.progress-bar span.indeterminate{width:35%;animation:media-slide 1.1s ease-in-out infinite}
@keyframes media-slide{0%{margin-left:-35%}100%{margin-left:100%}}
.progress-row{display:flex;align-items:center;gap:10px;font-size:12px;color:#6b7a90}.progress-row .link{margin-left:auto}
.result-note{flex:1 0 100%;font-size:11.5px;color:#4a6b5c}
@media(max-width:860px){.media-work{grid-template-columns:minmax(0,1fr)}.media-stage{max-height:40vh}.transport-tools{margin-left:0}.time-span{margin-left:0}}
/* Texture Lab (src/task/texture-lab*.js): stage bar, channel grid, conventions, WebGL preview. */
.tex-stages{display:flex;gap:6px;overflow-x:auto;padding:0 0 12px;scrollbar-width:thin}
.tex-stages button{flex:none;font-size:13px;font-weight:750;padding:9px 14px;border-radius:11px;color:#51647d;background:#f0f4f9;white-space:nowrap}
.tex-stages button[aria-selected=true]{background:var(--blue);color:#fff}
.tex-stages button:hover:not([aria-selected=true]){background:#e3eaf3}
.tex-lab .side{padding:14px;position:sticky;top:12px}
.tex-files{margin-top:16px}.tex-files .file-list{max-height:min(46vh,420px)}
.tex-role select{border:1px solid #d8e0ea;border-radius:9px;padding:5px 6px;font-size:11.5px;background:#fff;max-width:118px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.tex-slots{list-style:none;margin:0 0 14px;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:8px}
.tex-slots li{border:1px solid #e6ebf2;border-left:3px solid #cbd5e2;border-radius:12px;padding:8px 10px;display:flex;flex-direction:column;gap:2px;min-width:0}
.tex-slots li b{font-size:12.5px}.tex-slots li span{font-size:11.5px;color:#6b7a90;overflow-wrap:anywhere}
.tex-slots li em{font-size:11px;color:#8a97a8;font-style:normal}
.tex-slots li.has{border-left-color:#12925f}.tex-slots li.missing{border-left-color:#c0392b}
.tex-issues{list-style:none;margin:0 0 14px;padding:0;display:flex;flex-direction:column;gap:6px}
.tex-issues li{display:flex;gap:8px;align-items:flex-start;font-size:12.5px;line-height:1.5;color:#41506a}
.tex-issues em{flex:none;font-style:normal;font-size:10.5px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;border-radius:20px;padding:3px 8px;background:#f0f4f9;color:#7b889a}
.tex-issues .lvl-error em{background:#fdecea;color:#c0392b}.tex-issues .lvl-warn em{background:#fff6e5;color:#a86400}
.tex-table{width:100%;border-collapse:collapse;font-size:12px;margin-top:4px}
.tex-table th,.tex-table td{text-align:left;padding:6px 8px;border-bottom:1px solid #eef2f7;overflow-wrap:anywhere}
.tex-table th{font-size:11px;color:#6b7a90;text-transform:uppercase;letter-spacing:.03em}
.tex-pair,.tex-seam{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));gap:12px}
.tex-pair figure,.tex-seam figure,.tex-channel,.tex-mips figure{margin:0;min-width:0}
.tex-pair figcaption,.tex-seam figcaption,.tex-mips figcaption{font-size:11.5px;color:#6b7a90;margin-bottom:5px}
.tex-pair canvas,.tex-seam canvas,.tex-channel canvas,.tex-mips canvas{width:100%;height:auto;display:block;border-radius:12px;background:
 repeating-conic-gradient(#eef2f7 0% 25%,#fff 0% 50%) 50%/16px 16px;border:1px solid #e6ebf2}
.tex-channels{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,118px),1fr));gap:12px;margin-bottom:6px}
.tex-channel figcaption{display:flex;gap:6px;align-items:baseline;font-size:11.5px;color:#6b7a90}
.tex-channel figcaption b{font-size:13px;color:var(--ink)}
.tex-channel-foot{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin-top:6px}
.tex-channel-foot small{font-size:10.5px;color:#7b889a;font-variant-numeric:tabular-nums;min-width:0;overflow-wrap:anywhere}
.tex-inout{display:flex;align-items:center;gap:6px;min-width:0}
.tex-inout>span{flex:1 1 0;min-width:0;display:block}
.tex-inout>span small{display:block;font-size:10px;color:#8a97a8;text-align:center;margin-top:2px}
.tex-inout>b{flex:none;color:#8a97a8;font-size:12px}
.tex-tooltip{font-size:11px;color:#7b889a;line-height:1.5;margin:6px 0 0}
.tex-conventions{list-style:none;margin:0 0 10px;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:10px}
.tex-conventions li{border:1px solid #e6ebf2;border-radius:14px;padding:10px 12px;display:flex;flex-direction:column;gap:3px;min-width:0}
.tex-conventions li.is-on{border-color:var(--blue);background:#f7faff}
.tex-conventions li b{font-size:13px}.tex-conventions li span{font-size:11.5px;color:#51647d}
.tex-conventions li em{font-size:11px;color:#8a97a8;font-style:normal}
.tex-doc{display:block;font-size:11px;color:var(--blue);font-weight:650;overflow-wrap:anywhere;margin-top:2px}
.tex-strips{display:flex;gap:8px;align-items:flex-start;min-width:0}
.tex-seam canvas.strip-v{width:auto;height:min(46vh,300px);image-rendering:pixelated}
.tex-seam canvas.strip-h{width:100%;height:auto;image-rendering:pixelated;flex:1 1 auto;min-width:0}
.tex-mips{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,110px),1fr));gap:10px;align-items:start}
.tex-plan{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap;font-size:15px;font-weight:800;color:var(--ink)}
.tex-plan em{font-size:11.5px;font-weight:600;color:#6b7a90;font-style:normal}
.tex-pipeline{list-style:none;margin:0 0 14px;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr));gap:10px}
.tex-pipeline li{display:flex;gap:8px;align-items:center;border:1px solid #e6ebf2;border-radius:12px;padding:8px 10px;min-width:0}
.tex-pipeline li b{flex:none;width:22px;height:22px;border-radius:50%;background:var(--blue-soft);color:var(--blue);font-size:11.5px;display:grid;place-items:center}
.tex-pipeline li span{font-size:12.5px;font-weight:700}.tex-pipeline li em{font-size:11px;color:#6b7a90;font-style:normal;margin-left:auto;overflow-wrap:anywhere}
.tex-gl{position:relative;border-radius:16px;overflow:hidden;background:#12161d;aspect-ratio:4 / 3}
.tex-gl canvas{width:100%;height:100%;display:block;cursor:grab;touch-action:none}
.tex-gl canvas:active{cursor:grabbing}
.tex-gl canvas:focus-visible{outline:3px solid var(--blue);outline-offset:-3px}
.tex-gl-fallback{position:absolute;inset:0;display:grid;place-items:center;text-align:center;padding:24px;color:#e6ebf2;font-size:13px;line-height:1.6;margin:0}
.tex-assign{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr));gap:10px;margin-top:12px}
.tex-assign .field{margin:0}
.tex-pack>div{display:block}.tex-pack .work{margin:0}
#maskPreset{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
#maskPreset .chip[aria-pressed=true]{background:var(--blue);color:#fff}
.tex-lab .chips-row{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
.tex-lab .chips-row .chip.is-on{background:var(--blue);color:#fff}
.tex-lab button.is-busy{opacity:.6}
.tex-lab .summary.bad{background:#fdecea}.tex-lab .summary.bad .summary-big{color:#c0392b}
@media(max-width:860px){.tex-lab .work{grid-template-columns:minmax(0,1fr)}.tex-lab .side{position:static}.tex-gl{aspect-ratio:1 / 1}}
@media(max-width:600px){.tex-slots,.tex-conventions,.tex-pipeline,.tex-assign{grid-template-columns:minmax(0,1fr)}
 .tex-channels{grid-template-columns:repeat(2,minmax(0,1fr))}
 .tex-strips{flex-direction:column}.tex-seam canvas.strip-v{height:min(30vh,220px)}
 .tex-role select{max-width:88px}.tex-table th:nth-child(4),.tex-table td:nth-child(4){display:none}}
.sec-viewer{display:flex;flex-direction:column;gap:14px;padding:22px}
.sec-hero{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:26px 16px 18px}
.sec-hero .sec-lock{font-size:40px;line-height:1}
.sec-hero strong{font-size:18px;font-weight:800;color:#172b4d}
.sec-hero p{margin:0;max-width:44ch;color:#61708a;font-size:13px;line-height:1.55}
.file-main span.sec-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:8px;background:#eef2f7;flex:none;font-size:17px}
.sec-viewer .file-list{flex:1;align-content:start}
.ed-rot{position:absolute;left:50%;top:50%;transform-origin:50% 50%}
.ed-crop{position:absolute;outline:1.5px dashed #3182f6;box-shadow:0 0 0 9999px #17274a4d;pointer-events:none}
.ed-crop em{position:absolute;left:0;top:-20px;background:#3182f6;color:#fff;font-size:10.5px;font-style:normal;font-weight:750;border-radius:6px;padding:2px 6px;white-space:nowrap}
.doc-actions .chip.danger{color:#b3383f;border-color:#f0cfd2}
.doc-actions .chip:disabled{opacity:.45;cursor:default}
.doc-actions .check{width:100%;margin-top:4px}
.doc-actions .hint{width:100%;margin:0 0 4px}
.ed-side .hint.warning{color:#8a5200;background:#fff6e6;border-radius:10px;padding:9px 11px}
.ed-group{display:flex;align-items:center;gap:4px}
/* Sprite Lab: the stage bar, the fitted frame stage, the jitter graph and the hitbox timeline */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.lab-stages{display:flex;gap:6px;overflow-x:auto;padding:0 2px 12px;margin-bottom:4px;scrollbar-width:thin}
.lab-stages button{flex:none;display:flex;align-items:center;gap:7px;height:38px;padding:0 14px;border-radius:11px;background:#f4f7fb;color:#51647d;font-size:13px;font-weight:750;white-space:nowrap}
.lab-stages button b{display:grid;place-items:center;width:19px;height:19px;border-radius:50%;background:#dde5ef;color:#51647d;font-size:11px}
.lab-stages button[aria-pressed="true"]{background:var(--blue);color:#fff}.lab-stages button[aria-pressed="true"] b{background:#ffffff33;color:#fff}
.lab-work{grid-template-columns:minmax(0,2fr) minmax(300px,1fr)}
.lab-stage-view{position:relative;display:grid;place-items:center;min-height:200px;max-height:46vh;border-radius:12px;overflow:auto;padding:10px}
.lab-stage-view canvas{display:block;image-rendering:pixelated}
.lab-stage-view svg{position:absolute;inset:0;width:100%;height:100%;touch-action:none;outline:none;pointer-events:none}
.bg-checker{background-color:#fff;background-image:linear-gradient(45deg,#e7ebf1 25%,transparent 25%),linear-gradient(-45deg,#e7ebf1 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e7ebf1 75%),linear-gradient(-45deg,transparent 75%,#e7ebf1 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0}
.bg-black{background:#101828}.bg-white{background:#fff;box-shadow:inset 0 0 0 1px var(--line)}.bg-magenta{background:#ff00ff}
#labTools .field.inline{gap:6px}#labTools .field.inline span{flex:1 1 auto;min-width:0}#labTools .field.inline input{flex:0 0 auto;width:78px!important;min-width:56px}#labTools .field.inline input[data-pivot]{width:88px!important}
#labTools .chip small{margin-left:5px;font-weight:500;opacity:.7}
#labAtlasStage{min-height:0}#labAtlasStage:not(.is-packed) .slicer-sheet{display:none}
.chips-row .segmented{display:inline-flex;flex:none;gap:6px}.chips-row .segmented button{padding:7px 10px;font-size:11.5px;font-weight:700}
.lab-graph{min-height:92px;border-radius:12px;background:#f8fafc;padding:8px}
.lab-graph svg{display:block;width:100%;height:76px}
.lab-axis{stroke:#cbd5e1;stroke-width:.4}
.lab-series-x{fill:none;stroke:#2563eb;stroke-width:.8;vector-effect:non-scaling-stroke}
.lab-series-y{fill:none;stroke:#f97316;stroke-width:.8;stroke-dasharray:3 2;vector-effect:non-scaling-stroke}
.lab-notes{display:grid;gap:4px;margin-top:8px}.lab-notes:empty{display:none}
.lab-note{display:flex;align-items:center;gap:7px;font-size:11.5px;font-weight:650;color:#51647d}
.lab-note .mini-button{margin-left:auto;min-width:26px;height:26px;line-height:1}
.lab-note[data-action]{cursor:pointer;border-radius:9px;padding:2px 4px}.lab-note.is-selected{background:#eef4ff;box-shadow:inset 0 0 0 1px var(--blue)}.lab-note[data-action]:focus-visible{outline:2px solid var(--blue);outline-offset:1px}
.lab-swatch{display:inline-block;width:11px;height:11px;border-radius:3px;border:1px solid #94a3b8;flex:none}
.lab-swatch.lab-box-hit{background:repeating-linear-gradient(45deg,#f97316 0 2px,#fff 2px 4px)}
.lab-swatch.lab-box-hurt{background:repeating-linear-gradient(0deg,#2563eb 0 1px,#fff 1px 3px),repeating-linear-gradient(90deg,#2563eb 0 1px,#fff0 1px 3px)}
.lab-swatch.lab-box-interact{background:radial-gradient(#16a34a 30%,#fff 32%);background-size:4px 4px}
.lab-swatch.lab-box-custom{background:repeating-linear-gradient(0deg,#7c3aed 0 1px,#fff 1px 3px)}
.lab-box{stroke-width:1;vector-effect:non-scaling-stroke}
.lab-box-hit{stroke:#f97316;fill:url(#labPatHit);fill-opacity:.55}
.lab-box-hurt{stroke:#2563eb;fill:url(#labPatHurt);fill-opacity:.55}
.lab-box-interact{stroke:#16a34a;fill:url(#labPatInteract);fill-opacity:.6}
.lab-box-custom{stroke:#7c3aed;fill:url(#labPatCustom);fill-opacity:.55}
.lab-box.is-selected{stroke-width:2}
.lab-collision{fill:#22d3ee26;stroke:#0891b2;stroke-width:1;stroke-dasharray:3 2;vector-effect:non-scaling-stroke}
.lab-pivot line{stroke:#dc2626;stroke-width:.6;vector-effect:non-scaling-stroke}.lab-pivot circle{fill:#dc2626}
.lab-timeline{overflow-x:auto;border-radius:12px;background:#f8fafc;padding:6px}
.lab-grid{border-collapse:collapse;font-size:10.5px;font-weight:700;color:#51647d}
.lab-grid th,.lab-grid td{border:1px solid #e2e8f0;min-width:20px;height:22px;text-align:center;padding:0 3px;white-space:nowrap}
.lab-grid th[scope="row"]{text-align:left;padding:0 6px;position:sticky;left:0;background:#f8fafc}
.lab-grid td.on{cursor:pointer}
.lab-fill-hit{background:repeating-linear-gradient(45deg,#f9731655 0 3px,#fff0 3px 6px)}
.lab-fill-hurt{background:repeating-linear-gradient(0deg,#2563eb55 0 2px,#fff0 2px 4px)}
.lab-fill-interact{background:radial-gradient(#16a34a99 32%,#fff0 34%);background-size:6px 6px}
.lab-fill-custom{background:repeating-linear-gradient(90deg,#7c3aed55 0 2px,#fff0 2px 4px)}
.lab-grid td:focus-visible{outline:2px solid var(--blue);outline-offset:-2px}
@media(max-width:860px){.lab-work{grid-template-columns:minmax(0,1fr)}.lab-stage-view{max-height:36vh}.lab-stages button{height:34px;padding:0 11px;font-size:12px}}
/* Tile Lab (src/task/tile-lab.js): stage bar + pixel boards that must never smooth a tile. */
.tl-work>.tl-stages{grid-column:1/-1}
.tl-stages{display:flex;gap:6px;overflow-x:auto;padding:2px;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
.tl-stages button{flex:none;border:1px solid #e1e7ef;border-radius:11px;padding:9px 13px;font-size:13px;font-weight:750;color:#51647d;background:#fff;white-space:nowrap}
.tl-stages button:hover{background:#f3f6fa}.tl-stages [aria-pressed="true"]{border-color:var(--blue);background:var(--blue-soft);color:var(--blue)}
.tl-stage{display:grid;place-items:center;overflow:auto;padding:10px;border-radius:14px;background-color:#fff;background-image:linear-gradient(45deg,#e7ebf1 25%,transparent 25%),linear-gradient(-45deg,#e7ebf1 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e7ebf1 75%),linear-gradient(-45deg,transparent 75%,#e7ebf1 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0;max-height:60vh}
.tl-stage.small{max-height:34vh}
.tl-sheet{position:relative;max-width:100%}.tl-sheet canvas{display:block;width:100%;height:auto}
.tl-sheet svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}
.tl-sheet svg rect{fill:none;stroke:#3182f6;stroke-width:1;vector-effect:non-scaling-stroke;opacity:.7}
.tl-sheet svg .tl-cell{stroke:#12925f;opacity:.85}.tl-sheet svg .tl-bit{fill:#0b1425cc;stroke:#eef6ef;stroke-width:.5;opacity:1}
.tl-sheet svg text{fill:#eef6ef;paint-order:stroke;stroke:#0b1425aa;stroke-width:2.2;font-weight:800;text-anchor:middle;dominant-baseline:central;font-family:ui-monospace,Consolas,monospace}
.tl-fit{max-width:100%;height:auto}
.tl-paint{touch-action:none;cursor:crosshair}.tl-paint:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.tl-cands{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:6px}
.tl-cand{display:block;text-align:left;border:1px solid #e1e7ef;border-radius:12px;padding:9px 10px;background:#fff}
.tl-cand:hover{background:#f6f9fd}.tl-cand[aria-pressed="true"]{border-color:var(--blue);background:var(--blue-soft)}
.tl-cand b{display:inline-block;font-size:14px;font-weight:850;letter-spacing:-.4px;font-variant-numeric:tabular-nums}
.tl-score{float:right;font-size:11.5px;font-weight:800;color:#12925f;font-variant-numeric:tabular-nums}
.tl-cand small{display:block;font-size:11px;color:#6b7a90;font-weight:600;margin-top:3px;line-height:1.45}
.tl-cand .tl-ev{display:flex;flex-wrap:wrap;gap:4px 8px}.tl-ev i{font-style:normal;font-size:10.5px;color:#7b8798;font-variant-numeric:tabular-nums}
.tl-ghosts{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px}
.tl-ghosts figure{margin:0;width:64px;text-align:center}.tl-ghosts canvas{width:48px;height:48px;border-radius:8px;background:#f4f7fb}
.tl-ghosts figcaption{font-size:10.5px;font-weight:700;color:#51647d;margin-top:3px;line-height:1.35;overflow-wrap:anywhere}
.tl-ghosts figcaption small{display:block;font-size:10px;font-weight:600;color:#8b97a8}
.tl-numbers{display:grid;grid-template-columns:auto 1fr;gap:5px 10px;margin:12px 0 0;font-size:12px}
.tl-numbers dt{color:#7b8798;font-weight:700}.tl-numbers dd{margin:0;color:var(--ink);font-weight:700;font-variant-numeric:tabular-nums}
.tl-heat{display:grid;gap:8px;margin-top:12px}.tl-heat>div{display:grid;grid-template-columns:120px 1fr auto;align-items:center;gap:8px}
.tl-heat em{font-style:normal;font-size:11px;font-weight:700;color:#51647d;font-variant-numeric:tabular-nums;white-space:nowrap}
.tl-heat span{font-size:11.5px;font-weight:700;color:#7b8798}.tl-heat canvas{width:100%;height:12px;border-radius:4px}
.tl-steps{margin:0 0 12px;padding-left:20px;font-size:12.5px;color:#51647d;font-weight:600;line-height:1.7}
.tl-code{max-height:220px;overflow:auto;background:#0b1425;color:#dbe6f5;border-radius:12px;padding:12px;font:11.5px/1.55 ui-monospace,Consolas,monospace;white-space:pre;margin:0 0 10px}
@media(max-width:600px){.tl-stage{max-height:44vh;padding:6px}.tl-cands{grid-template-columns:1fr 1fr}.tl-heat>div{grid-template-columns:1fr auto;gap:2px 8px}.tl-code{max-height:160px}}
/* UI Lab (src/task/ui-lab.js): stage bar, nine-slice editor, state grid, checks. */
.ui-stagebar{display:flex;gap:6px;overflow-x:auto;padding:2px 2px 12px;scrollbar-width:thin}
.ui-stagebar button{flex:none;font-size:13px;font-weight:750;color:#51647d;background:#f0f4f9;border-radius:11px;padding:9px 14px}
.ui-stagebar button:hover{background:#e3eaf3}.ui-stagebar button[aria-selected="true"]{background:var(--blue);color:#fff}
.ui-stagebar.sub{padding:0 0 12px}.ui-stagebar.sub button{font-size:12.5px;padding:7px 12px;border-radius:9px}
.ui-work{grid-template-columns:minmax(0,1.6fr) minmax(280px,1fr)}
.ui-need{display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center;padding:48px 16px;color:#6b7a90}
.ui-banner{display:flex;align-items:center;gap:10px;flex-wrap:wrap;background:var(--blue-soft);border-radius:12px;padding:9px 12px;margin-bottom:12px;font-size:12.5px;font-weight:650;color:#2c4a75}
.ui-banner .chip{margin-left:auto}
/* nine-slice editor: a pixelated canvas, four draggable guides and a hatched middle */
.ns-stage{display:grid;place-items:center;padding:18px 10px;border-radius:14px;background-color:#fff;background-image:linear-gradient(45deg,#e7ebf1 25%,transparent 25%),linear-gradient(-45deg,#e7ebf1 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e7ebf1 75%),linear-gradient(-45deg,transparent 75%,#e7ebf1 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0;overflow:auto;max-height:52vh}
.ns-art{position:relative;flex:none;touch-action:none}
.ns-art canvas{display:block;width:100%;height:100%}
.ns-center{position:absolute;background:repeating-linear-gradient(45deg,#3182f680 0 3px,#3182f626 3px 9px);outline:1px solid #3182f6;display:grid;place-items:center;pointer-events:none}
.ns-center span{font-size:10px;font-weight:800;letter-spacing:.02em;color:#1b4fc0;background:#ffffffd0;border-radius:6px;padding:1px 5px;white-space:nowrap;max-width:100%;overflow:hidden}
.ns-guide{position:absolute;padding:0;background:none;border-radius:0;touch-action:none}
.ns-guide i{position:absolute;display:block;background:#e5484d;border-radius:2px}
.ns-guide.left,.ns-guide.right{top:-14px;bottom:-14px;width:18px;margin-left:-9px;cursor:ew-resize}
.ns-guide.left i,.ns-guide.right i{top:0;bottom:0;left:8px;width:2px}
.ns-guide.top,.ns-guide.bottom{left:-14px;right:-14px;height:18px;margin-top:-9px;cursor:ns-resize}
.ns-guide.top i,.ns-guide.bottom i{left:0;right:0;top:8px;height:2px}
.ns-guide:hover i{background:#12925f}
.ns-guide b{position:absolute;width:9px;height:9px;border-radius:50%;background:#fff;border:2px solid #e5484d;box-shadow:0 1px 3px #0003}
.ns-guide.left b,.ns-guide.right b{left:2px;top:-6px}.ns-guide.top b,.ns-guide.bottom b{top:2px;left:-6px}
.ns-guide:hover b{border-color:#12925f}
.ns-guide:focus-visible{outline:2px solid var(--blue);outline-offset:1px}
.ns-fields{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.ns-fields .field>span{font-size:10.5px}
.ns-previews{display:grid;gap:12px;margin-top:4px}
.ns-preview{margin:0;min-width:0}.ns-preview figcaption{font-size:11.5px;font-weight:650;color:#6b7a90;margin-bottom:5px;font-variant-numeric:tabular-nums}
.ns-preview figcaption b{color:var(--ink);font-weight:800;margin-right:2px}
.ns-box{position:relative;border-radius:10px;overflow:hidden;background-color:#f7f9fc;background-image:linear-gradient(45deg,#e7ebf1 25%,transparent 25%),linear-gradient(-45deg,#e7ebf1 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e7ebf1 75%),linear-gradient(-45deg,transparent 75%,#e7ebf1 75%);background-size:12px 12px;background-position:0 0,0 6px,6px -6px,-6px 0}
.ns-box canvas{display:block;width:100%;height:100%;object-fit:contain}
.ns-resize{position:absolute;right:0;bottom:0;width:18px;height:18px;cursor:nwse-resize;background:linear-gradient(135deg,transparent 45%,var(--blue) 45%);touch-action:none}
.summary.warn{background:#fff7e6}.summary.warn .summary-line{color:#6b5a2c;font-weight:650}
.ui-suggest{background:#fff7e6;border-radius:12px;padding:11px 13px;display:flex;flex-direction:column;gap:4px;font-size:12.5px;color:#6b5a2c}
.ui-suggest strong{font-size:12px;letter-spacing:.01em;text-transform:uppercase}
.ui-suggest.weak{background:#fdecee;color:#8a4045}
.ui-suggest .dropzone-actions{margin:6px 0 0;justify-content:flex-start;align-items:center}
/* button states */
.ui-states{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px}
.ui-state{margin:0}.ui-state-pick{display:block;width:100%;padding:8px;border-radius:14px;background:#f7f9fc;border:2px solid transparent}
.ui-state.is-current .ui-state-pick{border-color:var(--blue);background:var(--blue-soft)}
.ui-state-art{display:grid;place-items:center;min-height:64px;border-radius:10px;background-color:#fff;background-image:linear-gradient(45deg,#eef1f5 25%,transparent 25%),linear-gradient(-45deg,#eef1f5 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#eef1f5 75%),linear-gradient(-45deg,transparent 75%,#eef1f5 75%);background-size:10px 10px;background-position:0 0,0 5px,5px -5px,-5px 0;overflow:hidden}
.ui-state-art canvas{max-width:100%;height:auto}
.ui-state figcaption{font-size:12px;font-weight:750;color:#51647d;margin-top:6px;text-align:center}
.ui-state figcaption small{display:block;font-size:10.5px;font-weight:650;color:#8b98a9;font-variant-numeric:tabular-nums}
.ui-statepick{margin-bottom:2px}
/* detected UI elements */
.ui-elements{display:grid;gap:6px;max-height:34vh;overflow:auto}
.ui-element{display:flex;align-items:center;gap:8px;background:#f7f9fc;border-radius:11px;padding:6px 8px;border:2px solid transparent}
.ui-element .field{display:flex;flex-direction:column;gap:2px;margin:0}
.ui-element.is-current{border-color:var(--blue)}
.ui-element .field{flex:1;min-width:0}.ui-element .field>span{font-size:10.5px;font-variant-numeric:tabular-nums}
.ui-element input{width:100%;border:1px solid #d8e0ea;border-radius:9px;padding:7px 9px;font-size:12.5px;background:#fff}
/* font stage */
.ui-fontsample{border-radius:10px;padding:10px;background:#101726;overflow:auto}
.ui-fontsample canvas{display:block;image-rendering:pixelated;transform-origin:left top}
/* Glyphs are white on transparent; a checkerboard would hide them, so this host is dark. */
#fontHost{background-color:#101726;background-image:none}
/* checks */
.ui-report{max-height:56vh;overflow:auto}
.ui-table{width:100%;border-collapse:collapse;font-size:12.5px}
.ui-table caption{text-align:left;font-weight:750;color:#51647d;padding:0 0 8px}
.ui-table th{text-align:left;font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:#8b98a9;padding:4px 6px;border-bottom:1px solid var(--line)}
.ui-table td{padding:5px 6px;border-bottom:1px solid #f0f3f7;font-variant-numeric:tabular-nums}
.ui-table .ui-char{font-size:17px;font-weight:700;color:var(--ink)}
.ui-good{color:#12925f;font-weight:750}
.ui-screenfig{margin:0}.ui-screenfig figcaption{font-size:11.5px;font-weight:700;color:#6b7a90;margin-bottom:6px;font-variant-numeric:tabular-nums}
.ui-screen{border-radius:12px;overflow:hidden;background:#101726}
.ui-screen-canvas{display:block;width:100%;height:100%;object-fit:contain}
.ui-scalegrid{margin-top:16px}
.ui-scales{display:flex;gap:10px;overflow-x:auto;padding:2px 2px 8px}
.ui-scale{flex:none;margin:0;max-width:220px}
.ui-scale-art{border-radius:8px;overflow:hidden;background:#f7f9fc;padding:4px}
.ui-scale-canvas{display:block;max-width:200px;height:auto}
.ui-scale figcaption{font-size:11px;font-weight:750;color:#8b98a9;margin-top:4px}
.ui-scale.crisp figcaption{color:#12925f}
.ui-overflow{display:grid;gap:14px}
.ui-overflow-row{margin:0}
.ui-overflow-row figcaption{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px;color:#6b7a90;margin-bottom:6px}
.ui-textbox{border:1.5px dashed #b9c6d8;border-radius:10px;background:#fff;overflow:hidden;display:flex;align-items:center;padding:0 8px;max-width:100%}
.ui-textbox span{line-height:1.3;color:var(--ink)}
.ui-textbox .nowrap{white-space:nowrap}
.ui-textbox .truncate{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ui-contrast{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}
.ui-swatch{display:grid;place-items:center;min-height:120px;border-radius:14px;padding:18px;text-align:center}
.ui-contrast-figures strong{display:block;font-size:34px;font-weight:850;letter-spacing:-1.5px;font-variant-numeric:tabular-nums}
.ui-contrast-figures .chips-row{margin:8px 0}
@media(max-width:860px){.ui-work{grid-template-columns:minmax(0,1fr)}.ns-stage{max-height:40vh}.ns-previews{grid-template-columns:repeat(auto-fit,minmax(130px,1fr))}}
@media(max-width:600px){.ns-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.ui-states{grid-template-columns:repeat(auto-fit,minmax(104px,1fr))}.ui-element{flex-wrap:wrap}.ui-table{font-size:12px}}
/* ---- trust fixes: errors, automatic guesses with confidence, left-over islands ---- */
.summary.is-error{background:#fdecea}.summary.is-error .summary-big{color:#c0392b}.summary.is-error .summary-line{color:#7f2a22}
.lab-assist{display:grid;gap:6px;margin:10px 0 2px}.lab-assist[hidden]{display:none}
.lab-assist-line{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:12.5px;line-height:1.4;color:#334155;background:#f1f5f9;border-radius:10px;padding:7px 9px}
.lab-assist-line.bad{background:#fff4e5;color:#7a4b00}.lab-assist-line>span{flex:1 1 180px;min-width:0}
.lab-assist-line>span.lab-key-swatch{flex:0 0 14px;width:14px;height:14px;border-radius:4px;border:1px solid #0f172a55}
.lab-why{flex-basis:100%;font-size:12px;color:#475569}.lab-why summary{cursor:pointer;font-weight:650}.lab-why ul{margin:4px 0 0 16px;padding:0}
.lab-island{fill:none;stroke:#f97316;stroke-width:1.5;stroke-dasharray:3 2;vector-effect:non-scaling-stroke}
.tl-banner{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:12.5px;line-height:1.4;border-radius:10px;padding:8px 10px;margin:8px 0;background:#fff4e5;color:#6b4a00}
.tl-banner.low{background:#fdecea;color:#7f2a22}.tl-banner>span{flex:1 1 200px}
.tl-mismatch{fill:none;stroke:#c0392b;stroke-width:2;stroke-dasharray:4 2;vector-effect:non-scaling-stroke}
.pswap-work .pswap-palette{display:flex;flex-wrap:wrap;gap:4px;margin:6px 0}
.pswap-swatch{width:26px;height:26px;border-radius:6px;border:1px solid #0f172a33;cursor:pointer;padding:0}
.pswap-swatch[aria-pressed="true"]{outline:3px solid #3182f6;outline-offset:1px}
.pswap-rule{display:grid;grid-template-columns:auto auto 1fr auto;align-items:center;gap:8px;margin:6px 0}
.pswap-rule input[type=color]{width:38px;height:30px;padding:0;border:1px solid #cbd5e1;border-radius:6px}
.pswap-views{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.pswap-views canvas{image-rendering:pixelated;max-width:100%;cursor:crosshair;background:repeating-conic-gradient(#e2e8f0 0 25%,#fff 0 50%) 0 0/16px 16px}
@media(max-width:600px){.pswap-views{grid-template-columns:minmax(0,1fr)}}
/* ---- Game-first home (dark, studio palette). Scoped: file-tool pages keep their light look. ---- */
body.game-home{--gh-bg:#131518;--gh-1:#1b1d21;--gh-2:#23262b;--gh-3:#2c3036;--gh-line:#2c3036;--gh-text:#d9dce1;--gh-2t:#9ea5af;--gh-3t:#6f7680;--gh-accent:#4cc2ff;--gh-ok:#7bd88f;
 background:var(--gh-bg);color:var(--gh-text);color-scheme:dark}
.game-home .page-header .brand strong,.game-home h1,.game-home h2{color:#eef0f3}
.game-home .page-header .local-pill,.game-home .header-link{color:var(--gh-2t)}.game-home .header-link:hover{color:var(--gh-accent)}
.game-home .language-control select{background:var(--gh-1);color:var(--gh-text);border-color:var(--gh-line)}
.header-studio{white-space:nowrap;font-size:13px;font-weight:800;padding:8px 14px;border-radius:10px;background:var(--blue);color:#fff}.header-studio:hover{filter:brightness(1.08)}
.game-home .header-studio{background:var(--gh-accent);color:#06121a}
.gh-hero{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:40px;align-items:center;padding:26px 0 30px}
.gh-kicker{margin:0 0 12px;font-size:12px;font-weight:750;letter-spacing:.06em;color:var(--gh-ok);text-transform:uppercase}
.game-home h1#taskTitle{font-size:clamp(30px,4.2vw,48px);line-height:1.08;letter-spacing:-1.6px;font-weight:850;margin:0 0 16px}
.game-home .page-lead{color:var(--gh-2t);font-size:16px;margin:0 0 24px}
.gh-cta{display:flex;gap:10px;flex-wrap:wrap}
.gh-open{width:auto!important;padding:14px 22px!important;font-size:15px!important;border-radius:12px!important;background:var(--gh-accent)!important;color:#06121a!important;font-weight:850}
.gh-pick{padding:14px 20px;border-radius:12px;background:var(--gh-2);color:var(--gh-text);font-size:14px;border:1px solid var(--gh-line)}.gh-pick:hover{background:var(--gh-3)}
.gh-shot{margin:0;border-radius:14px;overflow:hidden;border:1px solid var(--gh-line);box-shadow:0 24px 70px rgba(0,0,0,.55),0 0 0 1px rgba(0,0,0,.4);background:#101215;aspect-ratio:1200/750}
.gh-shot img{display:block;width:100%;height:100%;object-fit:cover;object-position:left top}
.game-home .gh-drop{background:var(--gh-1);border:1.5px dashed #3a3f47;color:var(--gh-text);margin:0 0 34px}
.game-home .gh-drop:hover,.game-home.dragging .gh-drop{border-color:var(--gh-accent);background:#172430}
.game-home .gh-drop .drop-copy span{color:var(--gh-2t)}
.game-home .gh-drop .primary{background:var(--gh-2);color:var(--gh-text);width:auto;padding:12px 18px;border:1px solid var(--gh-line)}
.gh-section{margin:0 0 34px}.game-home .gh-section h2,.game-home .directory h2{font-size:12.5px;letter-spacing:.08em;color:var(--gh-3t);margin:0 0 12px;font-weight:800;text-transform:uppercase}
.ws-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.ws-card{display:flex;gap:12px;align-items:flex-start;background:var(--gh-1);border:1px solid var(--gh-line);border-radius:12px;padding:14px;position:relative;transition:border-color .15s,background .15s}
.ws-card:hover{border-color:var(--gh-accent);background:#1d2127}
.ws-card img{flex:none;border-radius:9px;background:var(--gh-2)}
.ws-card b{display:block;font-size:15px;color:#eef0f3;margin-bottom:3px}.ws-card small{display:block;color:var(--gh-2t);font-size:12.5px;line-height:1.45}
.ws-card em{position:absolute;top:12px;right:12px;font-style:normal;font-size:10.5px;font-weight:800;letter-spacing:.04em;padding:2px 7px;border-radius:999px;background:var(--gh-2);color:var(--gh-2t)}
.ws-card.is-ready em{background:#16301f;color:var(--gh-ok)}
.ws-card span{padding-right:58px}
.engine-list{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.engine-list li{font-size:13px;font-weight:750;padding:7px 12px;border-radius:9px;background:var(--gh-1);border:1px solid var(--gh-line);color:var(--gh-text)}
.engine-list li.is-verified::before{content:"✓ ";color:var(--gh-ok)}.engine-list li.is-format{color:var(--gh-2t)}
.gh-note{color:var(--gh-3t);font-size:12.5px;margin:10px 0 0;line-height:1.55}
.game-home .tool-query{background:var(--gh-1);border-color:var(--gh-line);color:var(--gh-text)}.game-home .tool-query::placeholder{color:var(--gh-3t)}
.game-home .tool-card{background:var(--gh-1);border-color:var(--gh-line)}.game-home .tool-card:hover{border-color:var(--gh-accent);box-shadow:none;background:#1d2127}
.game-home .tool-card b{color:#eef0f3}.game-home .tool-card small{color:var(--gh-2t)}
.game-home .tool-badge.game{background:#1f6f4c}
.file-tools{margin:8px 0 0;border:1px solid var(--gh-line);border-radius:12px;background:#16181c;padding:0 16px}
.file-tools>summary{cursor:pointer;list-style:none;padding:16px 0;display:flex;gap:12px;align-items:baseline;flex-wrap:wrap}.file-tools>summary::-webkit-details-marker{display:none}
.file-tools>summary::before{content:"▸";color:var(--gh-3t);transition:transform .15s}.file-tools[open]>summary::before{transform:rotate(90deg)}
.file-tools>summary b{color:var(--gh-text);font-size:14px}.file-tools>summary small{color:var(--gh-3t);font-size:12.5px}
.file-tools section{margin-bottom:22px}
.game-home .tool-badge.image,.game-home .tool-badge.pdf,.game-home .tool-badge.video{filter:saturate(.55) brightness(.85)}
.game-home .no-result{color:var(--gh-2t)}
.game-home .suggest{background:var(--gh-1);border-color:var(--gh-line);color:var(--gh-text)}
.game-home #siteContent{color:var(--gh-2t)}
.game-home .reading-content,.game-home .site-footer{color:var(--gh-2t)}
.game-home .reading-content h2,.game-home .reading-content h3,.game-home .faq summary,.game-home .related-tools h2{color:#e6e9ee}
.game-home .reading-content a,.game-home .site-footer a,.game-home .related-tools a{color:var(--gh-accent)}
.game-home .faq details,.game-home .related-tools a,.game-home .reading-content article>section{background:var(--gh-1);border-color:var(--gh-line)}
.game-home .toast{background:#23262b;color:#eef0f3}
@media(max-width:900px){.gh-hero{grid-template-columns:1fr;gap:22px;padding-top:10px}.ws-grid{grid-template-columns:1fr 1fr}}
@media(max-width:600px){.ws-grid{grid-template-columns:1fr}.game-home h1#taskTitle{font-size:30px}.gh-cta>*{flex:1}.header-studio{padding:7px 11px}.game-home .page-header .header-link{display:none}}
html:has(body.game-home){background:#131518}
.more-tools{margin-top:10px}.more-tools>summary{cursor:pointer;color:var(--gh-accent,#3182f6);font-weight:750;font-size:13px;padding:8px 0;list-style:none}.more-tools>summary::-webkit-details-marker{display:none}.more-tools[open]>summary{margin-bottom:10px}
.game-home h1,.game-home .page-lead,.game-home .ws-card,.game-home .gh-note{word-break:keep-all;overflow-wrap:anywhere}
.game-home .language-control{background:var(--gh-1);border-color:var(--gh-line);color:var(--gh-text)}.game-home .language-control select{background:transparent;color:var(--gh-text)}.game-home .language-control select option{background:#1b1d21;color:#d9dce1}
