/* PIXXYPO — app-specific bits on top of ../shared/pixx.css (gold accent from [data-app=pixxypo]) */
.pxs-ws { --left-w: 290px; --right-w: 320px; }
#editor { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.zoompill { left: 12px; bottom: 12px; }
.zoompill .zl { min-width: 46px; text-align: center; font: 600 12px var(--mono); }
.glyphpill { right: 12px; top: 12px; padding: 6px 12px; gap: 10px; font: 500 11.5px var(--mono); color: var(--muted); pointer-events: none; }
.glyphpill b { color: var(--text); font: 700 18px var(--font); }
.legend { left: 12px; top: 12px; padding: 6px 10px; gap: 10px; font-size: 11px; color: var(--muted); pointer-events: none; }
.legend i { display: inline-block; width: 14px; height: 2px; vertical-align: middle; margin-right: 4px; }
@container pxs-stage (max-width: 600px) { .pxs-app .legend { display: none; } } /* the glyph pill needs the top edge on a narrow stage */
.dragover::after { content: 'Drop a font (.json, .fnt + .png) or a glyph sheet'; position: absolute; inset: 10px; display: flex; align-items: center; justify-content: center; border: 2px dashed var(--acc); border-radius: 18px; background: rgba(var(--acc-rgb), .08); font-size: 16px; font-weight: 700; z-index: 5; }
/* glyph grid */
.setchips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.gsearch { margin: 4px 0 8px; }
.ggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 4px; }
.gtile { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 2px 2px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255,255,255,.025); cursor: pointer; min-width: 0; }
.gtile:hover { border-color: rgba(var(--acc-rgb), .55); }
.gtile.on { border-color: var(--acc); background: rgba(var(--acc-rgb), .14); box-shadow: inset 0 0 0 1px rgba(var(--acc-rgb), .35); }
.gtile.missing { opacity: .4; border-style: dashed; }
.gtile canvas { width: 28px; height: 28px; image-rendering: pixelated; }
.gtile span { font: 600 10px var(--mono); color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gtile.lig span { color: var(--acc); }
/* right panel lists */
#right .tabs { flex-wrap: wrap; gap: 3px; } #right .tabs .tab { padding: 6px 9px; font-size: 12.5px; }
.krow { display: grid; grid-template-columns: minmax(0, 1fr) 60px 24px; align-items: center; gap: 6px; margin: 3px 0; }
.krow canvas { image-rendering: pixelated; max-width: 100%; height: 24px; justify-self: start; background: rgba(0,0,0,.2); border-radius: 5px; padding: 2px; }
.krow .num { width: 60px; }
.krow .x, .lrow2 .x { color: var(--dim); text-align: center; border-radius: 6px; } .krow .x:hover, .lrow2 .x:hover { color: #fff; background: rgba(255,93,115,.5); }
.lrow2 { display: grid; grid-template-columns: minmax(0, 1fr) auto 24px; align-items: center; gap: 6px; margin: 3px 0; }
.lrow2 b { font: 600 12px var(--mono); }
.addrow { display: flex; gap: 6px; align-items: center; margin: 8px 0; }
.addrow .text.sm { width: 60px; }
.mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.mgrid .field.col { margin: 0; }
.mgrid .num { width: 100%; }
.setlist { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
.setlist label { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.setlist label small { color: var(--muted); margin-left: auto; font-family: var(--mono); }
/* preview footer */
.preview { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 8px 14px 10px; }
.preview .pv-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; grid-column: 1 / -1; }
.preview .pv-bar .text { flex: 1 1 260px; min-width: 120px; height: 34px; min-height: 0; resize: vertical; font: 13px/1.4 var(--font); padding: 7px 10px; }
.pv-stage { grid-column: 1 / -1; height: 128px; overflow: auto; border-radius: 12px; border: 1px solid var(--line); background: repeating-conic-gradient(#1d1e2b 0 25%, #242536 0 50%) 0 0 / 12px 12px; display: flex; align-items: flex-start; justify-content: flex-start; padding: 10px; }
.pv-stage.dark { background: #0b0c12; } .pv-stage.light { background: #f4f1e3; }
.pv-stage.c { justify-content: center; } .pv-stage.r { justify-content: flex-end; }
.pv-stage canvas { image-rendering: pixelated; flex: none; }
.pv-miss { font-size: 11px; color: var(--warn); }
.export-prev { display: flex; align-items: center; justify-content: center; min-height: 160px; max-height: 44vh; overflow: auto; border-radius: 14px; background: repeating-conic-gradient(#1d1e2b 0 25%, #242536 0 50%) 0 0 / 16px 16px; border: 1px solid var(--line); padding: 10px; }
.export-prev canvas { image-rendering: pixelated; max-width: 100%; }
.export-prev pre { margin: 0; max-height: 40vh; overflow: auto; font: 11px/1.4 var(--mono); color: var(--muted); white-space: pre; width: 100%; align-self: stretch; }
.export-prev .ttfprev { font-size: 32px; line-height: 1.3; color: var(--text); padding: 10px; word-break: break-word; }
.grid-prev { max-height: 46vh; overflow: auto; border-radius: 12px; border: 1px solid var(--line); background: #11121a; display: flex; justify-content: center; padding: 8px; }
.grid-prev canvas { image-rendering: pixelated; }
@media (max-width: 1100px) { .pxs-ws { --left-w: 240px; --right-w: 280px; } }
@media (max-width: 760px) {
  #exportBtn > span:not(.ico) { display: none; } #exportBtn { padding: 0 9px; }
  .pxs-app .floatpill.legend, .glyphpill .meta { display: none; }
  .pv-stage { height: 84px; }
  .preview { padding: 6px 10px 8px; }
  .preview .pv-bar .opt { display: none; }
}
/* Simplified workspace (PIXX.workspace, <html>.pxs-simple): touch-sized glyph tiles, tabs and checkbox rows */
html.pxs-simple .ggrid { grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 5px; }
html.pxs-simple .gtile { min-height: var(--touch); justify-content: center; }
html.pxs-simple #right .tabs .tab { padding: 0 12px; }
html.pxs-simple .preview .pv-bar .text { height: var(--touch); font-size: 16px; }
html.pxs-simple .setlist label, html.pxs-simple .pxs-app label.field:has(> input[type=checkbox]) { min-height: var(--touch); }
/* auto-spacing dialog */
.aspreview { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; max-height: 300px; overflow: auto; padding: 10px; border-radius: 10px; background: rgba(0,0,0,.25); }
.aspreview .lbl { margin: 4px 0 0; }
.aspv { image-rendering: pixelated; max-width: 100%; height: auto; }
