#pixel-editor { --px-border:#c6c9cf; }
.px-layout { display:grid; grid-template-columns:230px minmax(0,1fr); gap:20px; align-items:start; }
.px-library { display:grid; gap:10px; position:sticky; top:10px; }
.px-library select[size] { width:100%; min-height:370px; font:13px/1.7 system-ui,sans-serif; }
.px-library option { padding:7px 4px; }
.px-library input,.px-library select { min-width:0; max-width:100%; }
.px-work { min-width:0; }
.px-work h3 { margin:0 0 6px; }.px-work h4 { margin:20px 0 8px; }
.px-options,.px-tools,.px-save,.px-palette { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:10px 0; }
.px-check { display:inline-flex; align-items:center; gap:5px; white-space:nowrap; }
.px-options input[type=range] { width:100px; }.px-options input[type=number] { width:90px; }
.px-stage { display:grid; grid-template-columns:minmax(0,1fr) 170px; gap:14px; padding:12px; background:#eef0f3; border:1px solid var(--px-border); border-radius:6px; }
.px-canvas-wrap { overflow:auto; max-height:680px; min-height:300px; display:grid; justify-items:start; align-items:start; }
.px-canvas-wrap canvas { touch-action:none; cursor:crosshair; max-width:none; outline-offset:3px; }
.px-stage canvas,.px-timeline canvas,.px-swatch { background-image:conic-gradient(#e2e4e7 25%,#fff 0 50%,#e2e4e7 0 75%,#fff 0); background-size:12px 12px; image-rendering:pixelated; }
.px-preview { display:flex; flex-direction:column; align-items:center; gap:8px; }
.px-preview canvas { width:104px; height:auto; }.px-preview strong { font-size:13px; }
.px-tools [aria-pressed=true],.px-palette [aria-pressed=true],.px-timeline [aria-pressed=true] { outline:3px solid #3e63dd; outline-offset:1px; }
.px-palette .px-swatch { width:30px; height:30px; min-height:30px; padding:0; border:1px solid #8b8d96; border-radius:3px; background-image:none; }
.px-palette .px-swatch:first-child { background-image:conic-gradient(#ddd 25%,#fff 0 50%,#ddd 0 75%,#fff 0); }
.px-timeline { display:flex; gap:9px; overflow-x:auto; padding:6px 5px 12px; }
.px-timeline button { display:flex; flex-direction:column; align-items:center; gap:5px; flex-shrink:0; padding:8px; font-size:11px; }
.px-timeline canvas { width:52px; height:70px; object-fit:contain; }
.px-save { border-top:1px solid var(--px-border); padding-top:16px; margin-top:18px; }.px-save input { flex:1 1 100%; min-width:0; }
.px-history > div { margin:8px 0; font-size:13px; overflow-wrap:anywhere; }
.px-status { padding:9px 12px; background:#f0f4ff; min-height:38px; border-radius:4px; }.px-status.bad { background:#fff0f0; }
.px-work details { margin-top:14px; }.px-work summary { cursor:pointer; }
@media(max-width:900px) { .px-layout { grid-template-columns:180px minmax(0,1fr); gap:12px; }.px-stage { grid-template-columns:minmax(0,1fr); }.px-preview { flex-direction:row; flex-wrap:wrap; justify-content:center; }.px-preview canvas { width:78px; } }
@media(max-width:640px) { .px-layout { grid-template-columns:minmax(0,1fr); }.px-library { position:static; grid-template-columns:1fr 1fr; }.px-library select[size] { grid-column:1/-1; min-height:120px; height:140px; }.px-library .small { grid-column:1/-1; margin:0; }.px-canvas-wrap { max-height:500px; }.px-stage { padding:8px; }.px-options .btn,.px-save .btn,.px-tools .btn { font-size:13px; padding:8px; min-height:38px; } }
