:root{font-family:Inter,'Segoe UI','Malgun Gothic',sans-serif;color:var(--theme-text,#172b4d);background:var(--theme-bg,#f6f8fb)}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0}
button,select,input,textarea{font:inherit}
button{cursor:pointer;border:1px solid var(--theme-border,#cbd5e1);background:var(--theme-surface,#fff);color:var(--theme-text,#172b4d);border-radius:10px;padding:10px 13px}
button:hover{background:var(--theme-surface-alt,#eef3f9)}
button:disabled{opacity:1;cursor:not-allowed;background:var(--theme-surface-alt,#eef3f9);color:var(--theme-muted,#52637a);border-color:var(--theme-border,#cbd5e1)}
button.active,.primary{background:var(--theme-primary,#2563eb);color:var(--theme-on-primary,#fff);border-color:var(--theme-primary,#2563eb)}
button.active:hover,.primary:hover{background:var(--theme-primary,#2563eb)}
a{color:var(--theme-accent,#2563eb);text-decoration:none}
a:hover{text-decoration:underline}
input,select,textarea{border:1px solid var(--theme-border,#cbd5e1);border-radius:9px;background:var(--theme-surface,#fff);padding:10px;color:var(--theme-text,#172b4d)}
input:focus,select:focus,textarea:focus,button:focus-visible,a:focus-visible{outline:2px solid var(--theme-focus,#2563eb);outline-offset:2px}
header{max-width:1190px;margin:auto;min-height:80px;padding:18px 28px;display:flex;align-items:center;gap:30px}
.brand{display:flex;flex-direction:column;font-size:21px;font-weight:800;letter-spacing:1.5px;line-height:1.2;color:var(--theme-text,#172b4d)}
.brand span{font-size:10px;letter-spacing:2px;color:var(--theme-muted,#52637a)}
nav{display:flex;align-items:center;gap:22px;flex:1}
nav a{font-size:13px;color:var(--theme-muted,#52637a)}
nav a[aria-current]{color:var(--theme-accent,#2563eb);font-weight:700}
#accountButton{font-size:12px;max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
main{max-width:1190px;margin:auto;padding:16px 28px 36px;display:grid;grid-template-columns:1fr 1fr;gap:20px}
.workspace-head{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px 0}
.eyebrow{font-size:10px;letter-spacing:2px;color:var(--theme-accent,#2563eb)}
.workspace-head h1{font-size:30px;margin:10px 0;letter-spacing:-.7px}
.workspace-head p:not(.eyebrow){font-size:13px;color:var(--theme-muted,#52637a);margin:10px 0}
.panel{background:var(--theme-surface,#fff);border:1px solid var(--theme-border,#cbd5e1);border-radius:14px;padding:22px;min-width:0}
.document-bar{grid-column:1/-1;display:flex;align-items:flex-end;gap:16px;flex-wrap:wrap;padding:18px 22px}
.document-bar label{display:grid;gap:7px;font-size:11px;color:var(--theme-muted,#52637a)}
.document-name{flex:1;min-width:170px}
.document-bar select{min-width:160px}
.document-tools{display:flex;gap:8px}
.import-help{flex-basis:100%;font-size:11px;color:var(--theme-muted,#52637a);margin:0;line-height:1.6}
.panel-title{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:17px}
.panel-title h2{font-size:16px;margin:0}
.panel-title span,.panel-title label,.panel p{font-size:11px;color:var(--theme-muted,#52637a)}
.preview-panel{display:flex;flex-direction:column}
.preview-panel #preview{width:100%;height:520px;background:var(--theme-surface-alt,#eef3f9);border-radius:14px;touch-action:none}
.angles{display:flex;justify-content:center;gap:5px;margin-top:14px}
.angles button{font-size:11px;padding:8px 12px}
.preview-panel p{text-align:center}
.selectors{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.selectors label{font-size:11px;color:var(--theme-muted,#52637a)}
.selectors select{display:block;width:100%;margin-top:6px}
.paint-wrap{height:350px;margin:18px 0;display:flex;align-items:center;justify-content:center;background:var(--theme-surface-alt,#eef3f9);border-radius:14px;padding:12px;overflow:hidden}
#paint{image-rendering:pixelated;max-width:100%;max-height:100%;touch-action:none;cursor:crosshair;border:1px solid var(--theme-border,#cbd5e1);box-shadow:none}
.toolbar,.history,.actions{display:flex;flex-wrap:wrap;gap:7px;align-items:center}
.toolbar button,.history button{font-size:11px;padding:9px 11px}
.color-label{margin-left:auto;display:flex;align-items:center;gap:7px;font-size:11px}
#color{width:38px;height:31px;border:0;background:none;padding:0;cursor:pointer}
.history{margin-top:11px}
#status{min-height:34px;margin:17px 0 8px!important;color:var(--theme-muted,#52637a)!important;line-height:1.6}
.actions button{flex:1;white-space:nowrap}
.footnote{line-height:1.6;margin-bottom:0}
.publish-action{border-top:1px solid var(--theme-border,#cbd5e1);margin-top:18px;padding-top:15px;display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.publish-action button,.publish-action a{font-size:12px}
dialog{width:min(490px,calc(100vw - 32px));max-width:600px;max-height:90vh;overflow:auto;border:1px solid var(--theme-border,#cbd5e1);border-radius:12px;padding:26px;box-shadow:var(--theme-shadow,0 8px 24px #172b4d14)}
dialog::backdrop{background:var(--theme-backdrop)}
.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.dialog-head h2{font-size:19px;margin:0}
.dialog-head button{padding:7px 11px}
dialog p{font-size:12px;line-height:1.6;color:var(--theme-muted,#52637a)}
dialog form>label{display:block;font-size:12px;font-weight:600;margin:18px 0 7px}
dialog form>label input:not([type=checkbox]),dialog textarea{display:block;width:100%;margin-top:8px}
#googleButton{min-height:44px}
#mySkinsDialog{width:min(580px,calc(100vw - 32px))}
.saved-list{display:grid;gap:9px}
.saved-item{display:flex;width:100%;align-items:center;justify-content:space-between;gap:14px;text-align:left;padding:15px}
.saved-item strong{display:block;font-size:13px;overflow-wrap:anywhere}
.saved-item span{font-size:10px;color:var(--theme-muted,#52637a);display:block;margin-top:5px}
.saved-item b{font-size:11px;white-space:nowrap;color:var(--theme-primary,#2563eb)}
body.busy #paint{cursor:wait;opacity:.7}
@media(max-width:800px){header{padding:16px;gap:16px;flex-wrap:wrap}
header nav{gap:14px;order:3;width:100%;flex-basis:100%;overflow:auto}
#accountButton{margin-left:auto}
main{grid-template-columns:1fr;padding:10px 15px}
.panel{padding:16px}
.preview-panel #preview{height:390px}
.paint-wrap{height:340px}
.selectors{gap:5px}
.workspace-head h1{font-size:24px}
.document-bar{gap:12px}
.document-tools{width:100%}
.document-tools button{flex:1}
.document-name{min-width:145px}
.document-bar select{min-width:145px}
}
@media(max-width:420px){.workspace-head{align-items:flex-start}
.workspace-head h1{font-size:21px}
.workspace-head>button{font-size:11px;padding:10px;white-space:nowrap}
.document-bar label{flex:1}
.toolbar{gap:5px}
.toolbar button{padding:8px}
.actions button{font-size:12px;padding:10px}
.color-label{margin-left:0}
}



/* Neutral editing surfaces keep attention on the actual skin colors. */
input,select,textarea{background:var(--theme-input,#fff)}

.panel{box-shadow:none}

.preview-panel #preview,.paint-wrap{border:1px solid var(--theme-border,#cbd5e1)}

#paint{background:transparent}

.panel-title label{display:flex;align-items:center;gap:6px}

#status{font-size:12px}

button.active:not(:disabled),.primary:not(:disabled){background:var(--theme-primary,#2563eb);color:var(--theme-on-primary,#fff);border-color:var(--theme-primary,#2563eb)}

button.active:hover:not(:disabled),.primary:hover:not(:disabled){filter:brightness(.95)}

button:disabled,button.primary:disabled,button.active:disabled{background:var(--theme-surface-alt,#eef3f9);color:var(--theme-muted,#52637a);border-color:var(--theme-border,#cbd5e1);filter:none;opacity:1;cursor:not-allowed;box-shadow:none}

dialog{background:var(--theme-surface,#fff);color:var(--theme-text,#172b4d)}

.saved-item:hover:not(:disabled){border-color:var(--theme-accent,#2563eb)}

@media(max-width:420px){.selectors{grid-template-columns:1fr}
.selectors label{display:flex;align-items:center;gap:10px}
.selectors select{flex:1;min-width:0;margin-top:0}
.paint-wrap{height:300px}
}
