:root{--ink:#1d1d1f;--muted:#65656b;--blue:#0071e3;--surface:#f5f5f7;--line:#dedee3;color-scheme:light}*{box-sizing:border-box}body{margin:0;background:#fff;color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Microsoft YaHei',sans-serif;font-size:16px;line-height:1.6;-webkit-font-smoothing:antialiased}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer;border:0}button:disabled{opacity:.5;cursor:wait}a{color:var(--blue);text-decoration:none}a:hover{text-decoration:underline}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,.dropzone:focus-within{outline:3px solid var(--blue);outline-offset:3px}[hidden]{display:none!important}h1,h2,p{margin:0}.wrap{width:min(1360px,calc(100% - 80px));margin-inline:auto}.site-header{background:rgba(255,255,255,.94);border-bottom:1px solid #0000000b;backdrop-filter:blur(18px)}.nav{height:70px;display:flex;align-items:center;gap:30px}.brand img{width:175px;height:50px;object-fit:contain;display:block}.nav-links{display:flex;gap:28px;margin-left:auto}.nav-links a{font-size:12px;color:var(--ink)}.back-link{font-size:13px;margin-left:24px}.studio-header{display:flex;align-items:center;justify-content:space-between;padding:42px 0 38px;gap:24px}.kicker{font-size:12px;color:var(--muted);letter-spacing:.08em;margin-bottom:12px}h1{font-size:clamp(28px,3vw,42px);line-height:1.16;letter-spacing:-.035em;font-weight:600}.lead{font-size:16px;color:var(--muted);margin-top:16px}.button{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:44px;background:var(--blue);color:#fff;border-radius:28px;padding:11px 24px;font-size:15px;font-weight:500;white-space:nowrap}.button:hover{background:#0065cb}.button:active{transform:scale(.98)}.studio{display:grid;grid-template-columns:minmax(0,1fr) 352px;gap:50px;align-items:start}.preview-column{position:sticky;top:24px;min-width:0}.preview-toolbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;gap:12px;font-size:14px;font-weight:500}.view-switch,.segmented{display:flex;background:var(--surface);border-radius:12px;padding:4px;gap:3px}.view-switch button,.segmented button{background:transparent;color:var(--muted);font-size:14px;padding:7px 15px;border-radius:9px;flex:1}.view-switch button[aria-pressed=true],.segmented button[aria-pressed=true]{background:white;color:var(--ink);box-shadow:0 1px 5px #00000012}.stage{position:relative;background:var(--surface);border-radius:20px;overflow:hidden;min-height:320px;display:grid;place-items:center}.stage canvas{width:100%;height:auto;display:block}.stage #diagram{background:var(--surface)}#loading{position:absolute;background:#ffffffed;padding:14px 22px;border-radius:10px;max-width:90%;text-align:center;font-size:14px;box-shadow:0 5px 20px #0001}.preview-caption{display:flex;justify-content:space-between;gap:12px;margin-top:14px;font-size:12px;color:var(--muted);align-items:center}.check{display:flex;align-items:center;gap:8px;font-size:13px;cursor:pointer}.check input{width:16px;height:16px;accent-color:var(--blue);margin:0}.angles{display:flex;gap:12px;margin-top:24px;overflow-x:auto;padding-bottom:6px}.angle{width:calc((100% - 48px)/5);min-width:90px;max-width:150px;background:white;color:var(--muted);padding:4px;border-radius:12px;border:1px solid transparent;flex-shrink:0}.angle img{display:block;width:100%;height:72px;object-fit:cover;border-radius:8px;background:var(--surface)}.angle span{display:block;font-size:12px;padding:7px 0 3px}.angle[aria-pressed=true]{border-color:var(--blue);color:var(--blue)}.view-message{font-size:13px;color:var(--muted);margin-top:18px;min-height:22px}.preview-foot{border-top:1px solid var(--line);display:flex;justify-content:space-between;margin-top:24px;padding-top:18px;gap:14px;color:var(--muted);font-size:12px}.controls{min-width:0}.control-section{padding:24px 0;border-top:1px solid var(--line)}.control-section.first{padding-top:0;border-top:0}.heading{display:flex;justify-content:space-between;gap:14px;align-items:center;margin-bottom:18px}h2{font-size:17px;line-height:1.3;font-weight:600;letter-spacing:-.02em}.model-switch{display:grid;grid-template-columns:1fr 1fr;gap:12px}.model-switch button{border:1px solid var(--line);border-radius:14px;padding:18px 12px;background:white;text-align:left;color:var(--ink)}.model-switch button[aria-pressed=true]{border:2px solid var(--blue);padding:17px 11px}.model-switch strong{font-size:16px;font-weight:600;display:block}.model-switch small{font-size:12px;color:var(--muted)}.secondary{margin-top:14px}.presets{display:flex;gap:10px;justify-content:space-between;margin:18px 0 8px}.presets button{font-size:12px;background:none;color:var(--blue);padding:4px 0}.panel-select{display:grid;grid-template-columns:150px 1fr;align-items:center;gap:18px}#panelMap{width:150px;height:150px}#panelMap path{stroke:white;stroke-width:3;cursor:pointer}#panelMap text{pointer-events:none;font:600 16px Arial}#panelMap path:focus-visible{outline:none;stroke:#ff9f0a;stroke-width:6}.field-label{font-size:13px;margin-bottom:5px}.hint{font-size:12px;color:var(--muted);line-height:1.6;margin-top:12px}.accessory-toggle{margin-top:18px;font-size:14px}.text-button{background:transparent;color:var(--blue);font-size:13px;padding:3px 0}.dropzone{border:1px dashed #bbbfc5;border-radius:14px;background:var(--surface);padding:20px 12px;position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center;cursor:pointer}.dropzone.dragging{background:#e5f1ff;border-color:var(--blue)}.dropzone input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.upload-symbol{font-size:25px;color:var(--blue)}.dropzone strong{font-size:15px;font-weight:500}.dropzone span:not(.upload-symbol){font-size:13px;color:var(--muted)}.dropzone small{font-size:12px;color:var(--muted)}.file-row{display:flex;align-items:center;gap:12px;margin-top:14px;min-width:0}.file-row img{width:44px;height:44px;border-radius:8px;object-fit:contain;background:repeating-conic-gradient(#a9afb5 0% 25%,#dfe2e5 0% 50%) 0 0/12px 12px}.file-row div{min-width:0}.file-row strong{font-size:13px;font-weight:500;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:280px}.file-row small{font-size:12px;color:var(--muted);display:block}#reuseLogo{margin-top:12px}.control{display:grid;grid-template-columns:1fr auto;gap:8px;margin-bottom:18px}.control label{font-size:14px}.control output{font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}.control input{grid-column:1/-1;width:100%;accent-color:var(--blue);margin:0;cursor:pointer}.color-row{display:flex;align-items:center;justify-content:space-between;margin-top:24px;font-size:14px}.color-row>div{display:flex;align-items:center;gap:10px}.color-row input{width:32px;height:32px;padding:1px;border:1px solid var(--line);background:white;border-radius:6px;cursor:pointer}.color-row span{font-size:12px;color:var(--muted)}select{width:100%;border:1px solid #c9c9ce;border-radius:10px;background:#fff;color:var(--ink);font-size:14px;padding:11px 12px}.full{width:100%;margin-top:12px}.format{font-size:12px;color:var(--muted)}.footer{border-top:1px solid var(--line);padding:28px 0 42px;display:flex;justify-content:space-between;gap:20px;margin-top:40px;font-size:12px;color:var(--muted)}#status{position:fixed;z-index:200;bottom:24px;left:50%;transform:translateX(-50%);background:#1d1d1f;color:#fff;border-radius:12px;padding:13px 22px;font-size:14px;opacity:0;pointer-events:none;max-width:90vw}#status.show{opacity:1}@media(min-width:1550px){.stage{min-height:540px}}@media(max-width:1100px){.wrap{width:calc(100% - 48px)}.studio{gap:28px;grid-template-columns:minmax(0,1fr) 320px}.nav-links{gap:16px}.angle{min-width:85px}.angle img{height:58px}.stage{min-height:250px}.preview-foot{display:block}.preview-foot span{display:block}}@media(max-width:760px){.wrap{width:calc(100% - 36px)}.nav{height:64px}.brand img{width:140px;height:40px}.nav-links{display:none}.back-link{margin-left:auto}.studio-header{padding:30px 0 26px;align-items:flex-start}.studio-header .button{font-size:13px;padding:9px 14px;min-height:38px}.studio-header .lead{font-size:14px;max-width:250px}h1{font-size:27px}.kicker{font-size:10px;max-width:220px}.studio{display:flex;flex-direction:column;gap:30px}.preview-column{position:static;width:100%}.preview-toolbar{font-size:13px}.view-switch button{font-size:12px;padding:7px 10px}.stage{min-height:0;border-radius:16px}.preview-caption{font-size:11px}.check{font-size:12px}.angles{gap:7px;margin-top:16px}.angle{width:calc((100% - 21px)/4);min-width:75px}.angle span{font-size:11px}.preview-foot{display:none}.view-message{font-size:12px;margin-top:10px}.controls{width:100%}.panel-select{grid-template-columns:150px 1fr}.hint{font-size:13px}.footer{flex-direction:column;gap:4px}.file-row strong{max-width:75vw}}@media(prefers-reduced-motion:reduce){*{transition:none!important}.button:active{transform:none}}
.view-switch{flex-shrink:0;flex-wrap:wrap}.view-switch button{white-space:nowrap;flex:0 0 auto}.preview-column{top:18px}.stage canvas{max-height:calc(100vh - 290px);object-fit:contain}.stage{min-height:0}#patternTools{margin-top:16px}#tilePreview{display:block;width:100%;height:auto;border-radius:10px;margin-top:12px}#modes{align-items:stretch}#modes button{min-width:0;font-size:13px}@media(max-width:760px){.stage canvas{max-height:none}.studio-header .button{white-space:nowrap}.studio-header{gap:12px}.studio-header h1{max-width:240px}.lead{line-height:1.7}}

.language-picker{display:flex;align-items:center;gap:8px;margin-inline-start:auto;white-space:nowrap;font-size:13px}.language-picker select{width:155px;max-width:40vw;font-size:13px;padding:8px}.nav-links{margin-inline-start:auto;margin-left:0;gap:18px}.back-link{margin-left:0}.studio-header .button{white-space:normal;text-align:center;flex-shrink:0;max-width:235px}.preview-toolbar{flex-wrap:wrap}.stage,.panel-select svg{direction:ltr}.control input[type=range]{direction:ltr}.model-switch button{overflow-wrap:anywhere}.segmented button{padding-inline:9px;overflow-wrap:anywhere}.presets{flex-wrap:wrap;gap:8px}.presets button{max-width:48%;text-align:start}.heading{gap:12px}.heading h2{min-width:0}.angle span{overflow-wrap:anywhere}.view-switch button{white-space:normal}.color-row{gap:12px}.color-row>div{direction:ltr}.preview-caption{flex-wrap:wrap}.button.full{white-space:normal}.language-picker>span{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}.nav{gap:18px}@media(max-width:1100px){.nav-links{display:none}}@media(max-width:760px){.nav{height:auto;min-height:64px;flex-wrap:wrap;padding-block:10px;gap:10px}.brand img{width:125px}.language-picker select{width:135px}.back-link{margin-inline-start:auto;font-size:12px}.studio-header{flex-direction:column}.studio-header .lead{max-width:none}.studio-header h1{max-width:none}.studio-header .button{max-width:none}.preview-toolbar{gap:10px}.view-switch{margin-inline-start:auto}.panel-select{grid-template-columns:140px minmax(0,1fr)}#panelMap{width:140px}.heading{flex-wrap:wrap}.footer{margin-top:20px}}

.vector-dialog{width:min(900px,94vw);max-height:94vh;overflow:auto;border:0;border-radius:18px;padding:24px;color:var(--ink);box-shadow:0 20px 90px #0004}.vector-dialog::backdrop{background:#17233499}.vector-heading,.vector-footer{display:flex;align-items:center;justify-content:space-between;gap:16px}.vector-heading h2{font-size:21px}.vector-heading button{background:var(--surface);border-radius:9px;padding:8px 14px}.vector-tools{display:flex;align-items:center;gap:20px;flex-wrap:wrap;margin:16px 0}.vector-tools label{display:flex;align-items:center;gap:8px;font-size:14px}.vector-tools select{width:90px}.vector-stage{display:flex;justify-content:center;background:#eceef1;border-radius:10px;padding:8px;direction:ltr}.vector-stage canvas{display:block;max-width:100%;max-height:54vh;width:auto;height:auto;touch-action:none;cursor:crosshair}.vector-footer{margin-top:18px}.vector-footer span{font-size:13px;color:var(--muted)}#vectorStatus{font-size:14px;margin-top:12px}.vector-footer .button{white-space:normal}.vector-dialog:focus{outline:none}@media(max-width:760px){.vector-dialog{padding:16px}.vector-heading h2{font-size:18px}.vector-tools{gap:12px}.vector-stage canvas{max-height:47vh}.vector-footer .button{font-size:14px}}

.handle-materials{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.handle-materials button{padding:10px 6px;border:1px solid var(--line);border-radius:12px;background:white;color:var(--ink);font-size:14px;overflow-wrap:anywhere}.handle-materials button[aria-pressed=true]{color:var(--blue);border-color:var(--blue);background:#f0f7ff;box-shadow:inset 0 0 0 1px var(--blue)}.handle-detail{margin-top:16px;border-radius:12px;overflow:hidden;background:var(--surface)}.handle-detail canvas{display:block;width:100%;height:auto}.handle-detail span{display:block;text-align:center;font-size:12px;color:var(--muted);padding:6px}.handle-section>.hint{margin-top:12px}.handle-section .color-row{margin-top:16px}.handle-section input:disabled{cursor:default}.handle-section .color-row span{direction:ltr;display:inline-block}

.texture-previews{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px}.texture-previews figure{margin:0;min-width:0}.texture-previews canvas{display:block;width:100%;height:auto;border-radius:10px}.texture-previews #tilePreview{margin-top:0}.texture-previews figcaption{margin:8px 0 0;line-height:1.5}
