/* PIXXIFO — app-specific bits on top of ../shared/pixx.css (emerald accent from [data-app=pixxifo]) */
.pxs-ws { --right-w: 320px; }
#view { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#view.panning { cursor: grabbing; }
.stage-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; }
.stage-empty .dropzone .row { justify-content: center; }
.zoompill { left: 12px; bottom: 12px; }
.zoompill .zl { min-width: 54px; text-align: center; font: 600 12px var(--mono); }
.playpill { left: 50%; transform: translateX(-50%); bottom: 12px; }
.playpill .fl { min-width: 70px; text-align: center; font: 600 12px var(--mono); color: var(--muted); }
.infopill { right: 12px; bottom: 12px; padding: 6px 12px; gap: 12px; font: 500 11.5px var(--mono); color: var(--muted); pointer-events: none; }
.infopill b { color: var(--text); font-weight: 600; }
.gifbadge { position: absolute; top: 12px; right: 12px; padding: 3px 9px; border-radius: 999px; background: rgba(var(--acc-rgb), .16); border: 1px solid rgba(var(--acc-rgb), .5); font-size: 11px; font-weight: 700; color: var(--acc); pointer-events: none; }
.dragover::after { content: 'Drop GIFs, APNGs, images or a sprite 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; }
/* filmstrip (the timeline) */
.pxs-foot { display: flex; flex-direction: column; }
.stripbar { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.stripbar::-webkit-scrollbar { display: none; }
.stripbar .count { font: 600 11.5px var(--mono); color: var(--muted); }
.strip { display: flex; gap: 6px; padding: 8px 10px 10px; overflow-x: auto; min-height: 128px; align-items: flex-start; scrollbar-width: thin; scrollbar-color: #33344a transparent; }
.fcard { flex: none; width: 92px; display: flex; flex-direction: column; gap: 4px; padding: 4px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.025); cursor: pointer; position: relative; touch-action: pan-x; user-select: none; }
.fcard:hover { border-color: rgba(var(--acc-rgb), .45); }
.fcard.sel { border-color: rgba(var(--acc-rgb), .7); background: rgba(var(--acc-rgb), .1); }
.fcard.cur { box-shadow: 0 0 0 2px var(--acc); }
.fcard.dragging { opacity: .4; }
.fcard.drop-before::before, .fcard.drop-after::after { content: ''; position: absolute; top: 4px; bottom: 4px; width: 3px; border-radius: 3px; background: var(--acc); }
.fcard.drop-before::before { left: -5px; } .fcard.drop-after::after { right: -5px; }
.fcard canvas { width: 82px; height: 62px; object-fit: contain; image-rendering: pixelated; border-radius: 7px; background: repeating-conic-gradient(#1d1e2b 0 25%, #242536 0 50%) 0 0 / 8px 8px; }
.fcard .fmeta { display: flex; align-items: center; gap: 4px; font: 600 10.5px var(--mono); color: var(--muted); }
.fcard .fmeta .num { width: 52px; height: 22px; font-size: 10.5px; padding: 0 4px; }
.strip .addcard { flex: none; width: 92px; height: 100px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 12px; border: 1px dashed var(--line2); color: var(--muted); font-size: 11px; }
.strip .addcard:hover { border-color: var(--acc); color: #fff; }
/* panels */
.estimates { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; align-items: center; font-size: 12px; margin: 6px 0; }
.estimates b { font: 600 12px var(--mono); text-align: right; }
.estimates .bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.07); overflow: hidden; }
.estimates .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--acc), var(--acc2)); }
.seam { display: flex; align-items: center; gap: 8px; font-size: 12px; margin: 6px 0; }
.seam .bar { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.07); overflow: hidden; }
.seam .bar i { display: block; height: 100%; background: var(--warn); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.anchor { display: grid; grid-template-columns: repeat(3, 22px); gap: 3px; }
.anchor button { width: 22px; height: 22px; border-radius: 5px; background: rgba(255,255,255,.06) !important; border: 1px solid var(--line2) !important; }
.anchor button.on { background: var(--acc) !important; border-color: var(--acc) !important; }
.export-prev { display: flex; align-items: center; justify-content: center; min-height: 160px; max-height: 40vh; 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 img, .export-prev canvas { image-rendering: pixelated; max-width: 100%; }
.slice-prev { display: flex; justify-content: center; max-height: 46vh; overflow: auto; border-radius: 12px; background: repeating-conic-gradient(#1d1e2b 0 25%, #242536 0 50%) 0 0 / 14px 14px; border: 1px solid var(--line); padding: 6px; }
.slice-prev canvas { image-rendering: pixelated; max-width: 100%; }
@media (max-width: 760px) {
  .pxs-app .infopill, .pxs-app .gifbadge, .pxs-app .zoompill { display: none; }
  #exportBtn > span:not(.ico) { display: none; } #exportBtn { padding: 0 9px; }
  .strip { min-height: 104px; } .fcard { width: 76px; } .fcard canvas { width: 66px; height: 50px; } .fcard .fmeta .num { width: 42px; }
  .pxs-app .playpill { bottom: 8px; }
}

/* ============================================================
   v1.1 — Sprite sheet → GIF in four steps (#quick, body.quickmode)
   ============================================================ */
.quick { display: none; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #33344a transparent; }
body.quickmode .quick { display: block; }
body.quickmode .pxs-shell { grid-template-rows: auto minmax(0, 1fr); }
body.quickmode .pxs-app .optionsbar, body.quickmode .optionsbar, body.quickmode .pxs-ws, body.quickmode .pxs-foot, body.quickmode .pxs-mobilebar { display: none !important; }
.quick.dragover { outline: 2px dashed var(--acc); outline-offset: -10px; }
.qwrap { max-width: 1440px; margin: 0 auto; padding: 18px 20px 40px; }
.qhead { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.qhead h1 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.02em; background: linear-gradient(90deg, #fff, var(--acc) 75%, var(--acc2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.qhead p { margin: 0; }
.qprivacy { color: var(--acc); font-weight: 600; }
.qgrid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.qcol { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.qcard { background: linear-gradient(180deg, rgba(28,29,44,.85), rgba(20,21,32,.85)); border: 1px solid var(--line2); border-radius: 18px; padding: 14px 16px 16px; min-width: 0; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.qcard-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.qcard-head h2 { margin: 0; font-size: 15px; letter-spacing: -.01em; }
.qcard-head p { margin: 1px 0 0; }
.qnum { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; font: 800 13px var(--font); color: var(--on-acc); background: linear-gradient(135deg, var(--acc), var(--acc2)); flex: none; box-shadow: 0 4px 14px rgba(var(--acc-rgb), .35); }
.qok { color: var(--acc); font-weight: 800; }
.qempty { margin: 6px 0 2px; }
.qdrop { cursor: pointer; padding: 26px 18px; margin: 0; max-width: none; }
.qdrop h3 { margin: 0; color: var(--text); font-size: 16px; }
.qnote { margin: 10px 0 0; }
.qsheetrow { display: flex; gap: 14px; align-items: center; }
.qsheetthumb { max-width: 160px; max-height: 96px; image-rendering: pixelated; border-radius: 8px; border: 1px solid var(--line2); background: repeating-conic-gradient(#1d1e2b 0 25%, #242536 0 50%) 0 0 / 10px 10px; flex: none; }
.qchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--acc); background: rgba(var(--acc-rgb), .12); border: 1px solid rgba(var(--acc-rgb), .45); }
.qchip.unsure { color: var(--warn); background: rgba(255,181,71,.1); border-color: rgba(255,181,71,.4); }
.qsheetwrap { display: flex; justify-content: center; align-items: center; padding: 8px; border-radius: 12px; border: 1px solid var(--line); overflow: auto; max-height: 470px; }
.qsheet { display: block; image-rendering: pixelated; touch-action: none; cursor: grab; }
.qhint { margin: 8px 0 10px; }
.qnums { margin-top: 8px; }
.qnums .num { width: 62px; }
.qinfo { margin: 8px 0 0; }
.qpick { margin-bottom: 8px; }
.qpick .vsep { height: 18px; align-self: center; }
.qcells { display: flex; flex-wrap: wrap; gap: 6px; max-height: 236px; overflow-y: auto; padding: 2px; }
.qcell { position: relative; width: 66px; padding: 4px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.03); display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; user-select: none; touch-action: none; }
.qcell:hover { border-color: rgba(var(--acc-rgb), .5); }
.qcell canvas { width: 56px; height: 56px; object-fit: contain; image-rendering: pixelated; border-radius: 6px; background: repeating-conic-gradient(#1d1e2b 0 25%, #242536 0 50%) 0 0 / 8px 8px; }
.qcell .qbadge { position: absolute; top: 2px; left: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; font: 700 10.5px var(--mono); line-height: 18px; text-align: center; color: var(--on-acc); background: var(--acc); }
.qcell.off { opacity: .4; }
.qcell.off .qbadge { background: #3a3b52; color: #fff; }
.qcell.dragging { opacity: .35; }
.qcell.drop-before { box-shadow: -4px 0 0 var(--acc); } .qcell.drop-after { box-shadow: 4px 0 0 var(--acc); }
.qcell .qdelay { width: 56px; height: 22px; font-size: 10.5px; padding: 0 4px; }
.qsplit { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 14px; align-items: start; margin-top: 4px; }
.qprevbox { display: flex; flex-direction: column; align-items: center; }
.qprevstage { width: 240px; height: 200px; display: flex; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--line); }
.qprev { image-rendering: pixelated; max-width: 220px; max-height: 180px; }
.sizectl .lbl:first-child { margin-top: 10px; }
.hexin { width: 90px !important; font-family: var(--mono); }
.qsummary { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 14px 0 10px; padding: 9px 12px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.qsummary b { color: var(--text); }
.qcreate { width: 100%; height: 46px !important; font-size: 15px !important; border-radius: 12px !important; gap: 10px; }
.qcreate kbd { background: rgba(0,0,0,.18); border-color: rgba(0,0,0,.2); color: inherit; opacity: .8; }
.qprog { margin-top: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(255,255,255,.025); }
.qprog.err { border-color: rgba(255,93,115,.5); }
.qprogtop { display: flex; gap: 10px; align-items: baseline; font-size: 12.5px; }
.qprogtop b { font: 700 14px var(--mono); color: var(--acc); }
.qbar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.07); overflow: hidden; margin: 8px 0; }
.qbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--acc), var(--acc2)); transition: width .15s; }
.qstages { display: flex; gap: 6px; flex-wrap: wrap; }
.qstage { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; color: var(--muted); border: 1px solid var(--line2); }
.qstage.on { color: #fff; border-color: var(--acc); background: rgba(var(--acc-rgb), .15); }
.qstage.ok { color: var(--acc); border-color: rgba(var(--acc-rgb), .5); }
.qresult { margin-top: 14px; padding: 14px; border-radius: 14px; border: 1px solid rgba(var(--acc-rgb), .5); background: rgba(var(--acc-rgb), .06); }
.qresult h3 { margin: 0 0 10px; font-size: 16px; }
.qresimg { display: flex; justify-content: center; align-items: center; min-height: 120px; max-height: 340px; overflow: auto; border-radius: 10px; padding: 10px; border: 1px solid var(--line); }
.qresimg img { image-rendering: pixelated; max-width: 100%; }
.qstats { display: flex; gap: 16px; flex-wrap: wrap; margin: 10px 0; font-size: 12.5px; color: var(--muted); }
.qstats b { color: var(--text); font-family: var(--mono); }
.qrecent { margin-top: 14px; }
.qrecents { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.qrec { display: flex; gap: 10px; align-items: center; padding: 6px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.025); min-width: 0; }
.qrecimg { width: 48px; height: 48px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex: none; overflow: hidden; }
.qrecimg img { max-width: 44px; max-height: 44px; image-rendering: pixelated; }
.qrecmeta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.qrecmeta b, .qrecmeta span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewseg { margin-left: 4px; }
.viewseg button .ico { margin-right: 2px; }
@media (max-width: 1100px) { .qgrid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .qwrap { padding: 12px 12px 30px; }
  .qhead h1 { font-size: 19px; }
  .qsplit { grid-template-columns: minmax(0, 1fr); }
  .qprevbox { order: -1; }
  .qcard { padding: 12px; border-radius: 16px; }
  .viewseg button span:not(.ico) { display: none; }
  .qsheetrow { flex-direction: column; align-items: flex-start; }
}
