:root{font-family:Inter,'Segoe UI','Malgun Gothic',sans-serif;color:var(--theme-text,#172b4d);background:var(--theme-bg,#f6f8fb);font-synthesis:none}
*{box-sizing:border-box}body{margin:0}.symbols{position:absolute;width:0;height:0}
svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
button,input,textarea,select{font:inherit}button,a,label.import,.upload-label,summary{cursor:pointer}
button{border:1px solid transparent;border-radius:8px;background:var(--theme-surface-alt);color:var(--theme-text);padding:11px 16px;display:inline-flex;gap:8px;align-items:center;justify-content:center;line-height:1.4;font-size:13px;font-weight:600}
button:hover:not(:disabled){filter:brightness(.96)}button:disabled{opacity:.65;cursor:not-allowed;box-shadow:none}
button:focus-visible,a:focus-visible,summary:focus-visible,label:focus-visible{outline:3px solid var(--theme-focus);outline-offset:3px}
a{color:var(--theme-accent)}.quiet{background:transparent;font-size:12px}.text-button{background:transparent;border:0;color:var(--theme-accent);padding:0;font-size:12px}
.dot{width:6px;height:6px;border-radius:50%;background:var(--theme-muted)}.dot.on{background:var(--theme-success)}
main{max-width:1232px;padding:32px 24px 28px;margin:auto}
.intro{padding:4px 0 28px;margin:0 0 28px;border-bottom:1px solid var(--theme-border)}
.eyebrow{font-size:11px;color:var(--theme-accent);letter-spacing:1.7px;font-weight:750}
h1{font-size:clamp(30px,3.6vw,44px);line-height:1.2;letter-spacing:-1.4px;margin:12px 0;font-weight:750;color:var(--theme-text)}
h2{font-size:15px;margin:0;font-weight:700;color:var(--theme-text)}
p{color:var(--theme-muted);font-size:13px;line-height:1.65}.intro p{font-size:15px;margin-bottom:0}
.workspace{display:grid;grid-template-columns:minmax(320px,.85fr) minmax(0,1.25fr);gap:24px;align-items:start}
.inputs{display:flex;flex-direction:column;gap:16px;min-width:0}
.card{background:var(--theme-surface);border:1px solid var(--theme-border);border-radius:12px;padding:22px;box-shadow:none;min-width:0}
.card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}
h2>span{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:6px;background:var(--theme-highlight);font-size:11px;color:var(--theme-accent);margin-right:9px}
.small{font-size:12px;color:var(--theme-muted)}
.import{min-height:216px;display:flex;align-items:center;justify-content:center;flex-direction:column;position:relative;border-radius:8px;background:var(--theme-bg);border:1px dashed var(--theme-border);transition:background .15s,border-color .15s;padding:18px}
.import:hover,.import.drag{background:var(--theme-highlight);border-color:var(--theme-accent)}
#importArt{display:flex;align-items:center;flex-direction:column;color:var(--theme-accent)}
.large-icon{width:54px;height:54px;stroke-width:1.5;margin-bottom:12px}
#importArt strong{letter-spacing:2px;font-size:12px}#importArt span{font-size:12px;margin-top:7px;color:var(--theme-muted)}
.import-hint{font-size:12px;color:var(--theme-muted);position:absolute;bottom:14px}
.reference-bottom{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:12px;font-size:11px;color:var(--theme-muted);min-height:20px}
.identity{display:flex;gap:16px;align-items:center;padding:16px 20px}.identity p{font-size:12px;margin:8px 0}
.identity-picture{height:82px;width:74px;flex-shrink:0;border-radius:8px;background:var(--theme-surface-alt);display:flex;align-items:center;justify-content:center}
#avatar{width:48px;height:79px;image-rendering:pixelated}.upload-label{display:inline-block}
.identity select{border:1px solid var(--theme-border);background:var(--theme-input);border-radius:6px;padding:5px;font-size:11px;margin-left:8px;color:var(--theme-text)}
.identity.new-character{padding:18px 20px}.identity.new-character>div:last-child{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%}.identity.new-character select{margin:0;min-width:100px;padding:9px 12px;font-size:12px}
.request{padding:14px 16px;border:1px solid var(--theme-border);border-radius:10px;background:var(--theme-surface)}
.request summary{font-size:13px;color:var(--theme-text);list-style:none}.request summary span{color:var(--theme-muted);font-size:11px;margin-left:6px}
textarea{margin-top:12px;resize:vertical;width:100%;min-height:88px;padding:12px;border:1px solid var(--theme-border);border-radius:8px;background:var(--theme-input);color:var(--theme-text);font-size:13px}
.primary{background:var(--theme-primary);color:var(--theme-on-primary);border-color:var(--theme-primary);width:100%;padding:15px 18px;font-weight:700;box-shadow:none}
.primary:hover:not(:disabled){background:var(--theme-primary-hover);filter:none}.primary .arrow{margin-left:auto}.primary svg{margin-right:auto}
.primary:disabled{background:var(--theme-surface-alt);color:var(--theme-muted);border-color:var(--theme-border);opacity:1}
.cost{font-size:11px;text-align:left;margin:0;color:var(--theme-muted)}
.result{display:flex;flex-direction:column;padding:22px;align-self:start;position:sticky;top:24px}
.pill{font-size:11px;font-weight:600;color:var(--theme-accent);background:var(--theme-highlight);padding:6px 10px;border-radius:6px}
.stage{position:relative;background:var(--theme-stage);border:1px solid var(--theme-border);border-radius:8px;overflow:hidden;height:400px;flex:none;min-height:325px}
.stage-grid{position:absolute;inset:0;background-image:radial-gradient(var(--theme-grid) 1px,transparent 1px);background-size:20px 20px;pointer-events:none}
#view{position:absolute;inset:0;width:100%;height:100%;min-height:0;touch-action:none}
.stage-caption{position:absolute;bottom:16px;text-align:center;width:100%;padding:0 16px;color:var(--theme-muted);font-size:12px;pointer-events:none}
.view-controls{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:16px 0 10px}
.angles{display:flex;gap:3px;background:var(--theme-surface-alt);border:1px solid var(--theme-border);border-radius:8px;padding:3px}
.angles button{padding:7px 11px;border-radius:5px;background:transparent;font-size:11px;color:var(--theme-muted)}
.angles button.active{background:var(--theme-surface);color:var(--theme-accent);box-shadow:none}
.view-controls label{font-size:12px;color:var(--theme-muted);display:flex;align-items:center;gap:5px}
input[type=checkbox]{accent-color:var(--theme-primary)}
#status{font-size:12px;color:var(--theme-muted);line-height:1.6;min-height:35px;padding:5px 0}#status.error{color:var(--theme-error)}
.downloads{display:flex;gap:10px;flex-wrap:wrap;margin-top:8px}.downloads button:first-child{flex:1;background:var(--theme-primary);color:var(--theme-on-primary)}
.downloads button:disabled{background:var(--theme-surface-alt);color:var(--theme-muted);border:1px solid var(--theme-border);opacity:1}.downloads button{font-size:12px}.downloads svg{width:17px;height:17px}
footer{display:flex;justify-content:space-between;font-size:11px;color:var(--theme-muted);border-top:1px solid var(--theme-border);padding-top:20px;margin-top:32px;gap:12px;flex-wrap:wrap}
#thumbnails{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;width:100%;padding-bottom:18px}#thumbnails img{width:100%;height:130px;object-fit:contain;background:var(--theme-surface);border-radius:6px}#thumbnails img:only-child{grid-column:1/-1;height:190px}
#details{font-size:12px;color:var(--theme-muted);margin-top:16px}#details img{width:100%;image-rendering:pixelated}#details p{font-size:12px}
dialog{width:min(420px,calc(100vw - 32px));border:1px solid var(--theme-border);border-radius:14px;padding:26px;box-shadow:var(--theme-shadow);background:var(--theme-surface);color:var(--theme-text)}
dialog::backdrop{background:var(--theme-backdrop);backdrop-filter:blur(3px)}dialog label{display:block;font-size:13px;margin:18px 0}
dialog input{display:block;width:100%;margin-top:8px;padding:12px;border-radius:8px;border:1px solid var(--theme-border);background:var(--theme-input);color:var(--theme-text)}dialog a{font-size:12px}dialog .primary{margin-top:22px}
.progress{position:absolute;inset:0;background:var(--theme-stage);opacity:.96;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:20px;padding:20px}
.spinner{width:30px;height:30px;border:2px solid var(--theme-border);border-top-color:var(--theme-accent);border-radius:50%;animation:spin 1s linear infinite}
.progress strong{font-size:15px;color:var(--theme-accent)}.steps{display:flex;justify-content:center;flex-wrap:wrap;gap:10px;font-size:11px;color:var(--theme-muted)}.steps i{font-style:normal}.steps .active{color:var(--theme-accent);font-weight:700}
[hidden]{display:none!important}@keyframes spin{to{transform:rotate(360deg)}}
.skin-option{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px;font-size:12px;color:var(--theme-muted)}.skin-option label{display:flex;align-items:center;gap:4px}.skin-option input[type=color]{width:32px;height:24px;border:0;background:none;padding:0}.skin-option>span{flex-basis:100%}
.notes-count{text-align:right;font-size:12px;color:var(--theme-muted);margin:5px 0 14px}
#skinPalette{display:block;width:min(100%,384px);height:auto;image-rendering:pixelated;cursor:crosshair;background:repeating-conic-gradient(#ddd 0% 25%,#fff 0% 50%) 0/24px 24px;margin:auto}#skinPicker{max-width:460px}
.gallery-offer{background:var(--theme-surface);border:1px solid var(--theme-border);border-radius:10px;padding:16px}.gallery-offer label{display:flex;gap:10px;align-items:flex-start;cursor:pointer;font-size:13px;font-weight:600}.gallery-offer input{accent-color:var(--theme-primary);margin-top:3px}.gallery-offer b{display:inline-block;font-size:11px;padding:3px 7px;border-radius:5px;background:var(--theme-highlight);color:var(--theme-accent);margin-left:4px}.gallery-offer p{font-size:12px;margin:10px 0}.gallery-offer small{display:block;font-size:11px;color:var(--theme-muted);margin-top:9px;line-height:1.6}.gallery-offer summary{font-weight:600}.gallery-offer>label{margin-top:12px}
.offer-price{display:flex;justify-content:space-between;border-top:1px solid var(--theme-border);padding-top:12px;font-size:12px}.offer-price strong{color:var(--theme-accent)}.reference-consent{margin:12px 0 16px}.reference-consent small{margin:2px 0 0;font-weight:400}
.creation-mode{padding:20px;margin:0}.creation-mode label{display:block;font-size:13px;font-weight:700;margin-bottom:12px}.creation-mode select{width:100%;padding:11px 12px;border:1px solid var(--theme-border);border-radius:8px;background:var(--theme-input);color:var(--theme-text);font-size:13px}.creation-mode p{font-size:12px;color:var(--theme-muted);line-height:1.6;margin:10px 0 0}
#craftReview{border:1px solid var(--theme-border);border-radius:10px;margin-top:18px;padding:16px}#craftReview select{margin:8px;padding:8px;max-width:100%;background:var(--theme-input);color:var(--theme-text)}#craftReview button{margin:8px 8px 0 0;padding:9px 14px;border:1px solid var(--theme-border);border-radius:8px;background:var(--theme-surface-alt);color:var(--theme-accent)}
#lockedPreview{display:block;width:100%;height:100%;max-height:520px;object-fit:contain}#lockedPreview[hidden]{display:none}.result-advanced{margin-top:16px}.result-advanced summary{cursor:pointer;color:var(--theme-muted);font-size:12px}.result-advanced button{margin-top:10px}
#accountDialog{width:min(380px,calc(100vw - 32px));padding:28px;border-radius:14px;border:1px solid var(--theme-border);box-shadow:var(--theme-shadow)}#accountDialog .card-head{margin:0 0 8px;min-height:28px}#accountDialog h2{font-size:21px;letter-spacing:-.6px;font-weight:650}#closeAccount{width:28px;height:28px;padding:0;border-radius:6px;color:var(--theme-muted);font-size:16px}#closeAccount:hover{background:var(--theme-surface-alt)}#accountMessage{margin:0 0 24px;font-size:12px;line-height:1.6;color:var(--theme-muted)}
@media(max-width:860px){.workspace{grid-template-columns:1fr}.result{position:static}.intro{padding-bottom:24px;margin-bottom:24px}main{padding:26px 20px}.stage{height:360px}}
@media(max-width:540px){main{padding:24px 16px}.card{padding:18px}.intro p{font-size:13px}.intro h1{font-size:30px;letter-spacing:-1px}.stage{min-height:300px;height:330px}.angles button{padding:7px 9px}.reference-bottom{font-size:11px}.identity.new-character>div:last-child{gap:10px}.identity.new-character h2{font-size:13px}.steps{gap:6px}}
@media(prefers-reduced-motion:reduce){.spinner{animation:none}.import{transition:none}}
