/* PIXXEXA — app-specific bits on top of ../shared/pixx.css (mint accent from [data-app=pixxexa]) */
.pxs-ws { --left-w: 270px; --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; }
.pxs-stage.dragover::after { content: 'Drop an image to make it tile'; 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; }
.playpill { left: 50%; transform: translateX(-50%); bottom: 12px; }
.playpill .fl { min-width: 64px; text-align: center; font: 600 12px var(--mono); }
.zoompill { left: 12px; bottom: 12px; }
.zoompill .zl { min-width: 48px; text-align: center; font: 600 12px var(--mono); }
.seampill { right: 12px; top: 12px; padding: 4px 10px; font: 600 11px var(--mono); color: var(--acc); border-color: rgba(var(--acc-rgb), .45); }
.seampill.bad { color: #ff9aa9; border-color: rgba(255,93,115,.6); }
.presetgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.presetgrid button { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 5px; border-radius: 11px; border: 1px solid var(--line); background: rgba(255,255,255,.025); text-align: left; font-size: 11.5px; font-weight: 600; min-width: 0; }
.presetgrid button:hover { border-color: rgba(var(--acc-rgb), .6); }
.presetgrid canvas { width: 100%; aspect-ratio: 1; border-radius: 7px; image-rendering: pixelated; display: block; }
.presetgrid span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
.layerlist { display: flex; flex-direction: column; gap: 4px; }
.lrow { display: flex; align-items: center; gap: 4px; padding: 4px 5px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.025); cursor: pointer; min-width: 0; }
.lrow:hover { background: rgba(255,255,255,.045); }
.lrow.on { border-color: rgba(var(--acc-rgb), .7); background: linear-gradient(90deg, rgba(var(--acc-rgb), .2), rgba(var(--acc-rgb), .05)); }
.lrow.off .lname { opacity: .45; text-decoration: line-through; }
.lrow .lname { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.lrow .dep { font: 700 9.5px var(--mono); text-transform: uppercase; padding: 1px 6px; border-radius: 6px; background: rgba(var(--acc-rgb), .12); color: var(--acc); flex: none; }
.lrow .dep.op { background: rgba(var(--acc2-rgb), .14); color: var(--acc2); }
.lrow .ibtn { width: 24px; height: 24px; border-radius: 7px; }
.colorrow { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 6px 0; }
.colorrow label { position: relative; width: 28px; height: 28px; border-radius: 8px; border: 1px solid rgba(0,0,0,.4); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); cursor: pointer; overflow: visible; }
.colorrow label input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.colorrow label b { position: absolute; right: -5px; top: -5px; width: 14px; height: 14px; border-radius: 50%; background: var(--bad); color: #fff; font: 700 9px/14px var(--font); text-align: center; display: none; z-index: 1; }
.colorrow label:hover b { display: block; }
.colorrow .add { width: 28px; height: 28px; border-radius: 8px; border: 1px dashed var(--line2); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.vargrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; max-height: 62vh; overflow-y: auto; padding: 2px; }
.varcard { display: flex; flex-direction: column; gap: 4px; padding: 6px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.025); font: 600 11px var(--mono); color: var(--muted); }
.varcard:hover { border-color: rgba(var(--acc-rgb), .6); color: var(--text); }
.varcard canvas { width: 100%; aspect-ratio: 1; image-rendering: pixelated; border-radius: 8px; display: block; }
.export-prev { display: flex; align-items: center; justify-content: center; min-height: 180px; max-height: 46vh; 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; margin: 10px 0; }
.export-prev canvas, .export-prev img { image-rendering: pixelated; max-width: 100%; }
.footbar b.good { color: var(--good); } .footbar b.bad { color: var(--warn); }
/* ---------- material browser (v1.2) ---------- */
.matgrid { max-height: none; }
.matbtn { position: relative; }
.matbtn.on { border-color: var(--acc) !important; box-shadow: inset 0 0 0 1px rgba(var(--acc-rgb), .45); }
.matbtn .fav { position: absolute; top: 7px; right: 7px; width: 20px; height: 20px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: rgba(255,255,255,.55); background: rgba(10,11,18,.6); opacity: 0; transition: opacity .12s; }
.matbtn:hover .fav, .matbtn .fav.on { opacity: 1; }
.matbtn .fav.on { color: #ffd166; }
.matbtn .animdot { position: absolute; top: 9px; left: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 6px var(--acc); }
#matSearch { flex: 1; min-width: 0; }
#matCat { margin-bottom: 8px; }
.ovknobs { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; background: rgba(255,255,255,.02); }
.ovknobs summary { cursor: pointer; font-weight: 600; color: #c9cadb; padding: 2px 0; }
.ovrow { border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; margin: 6px 0; background: rgba(255,255,255,.02); }
.colorrow.sm label { width: 20px; height: 20px; border-radius: 6px; }
/* ---------- biome packs ---------- */
.biomedlg .pxs-modal-body { overflow: hidden; }
.biomewrap { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 14px; height: min(68vh, 680px); }
.biomeleft { display: flex; flex-direction: column; min-height: 0; }
.biomeleft input { flex: 1; min-width: 0; }
.biomelist { overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding-right: 4px; min-height: 0; }
.biomerow { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.02); text-align: left; min-width: 0; }
.biomerow:hover { border-color: rgba(var(--acc-rgb), .5); }
.biomerow.on { border-color: var(--acc); background: linear-gradient(90deg, rgba(var(--acc-rgb), .18), rgba(var(--acc-rgb), .04)); }
.biomerow .bsw { display: grid; grid-template-columns: repeat(4, 8px); grid-auto-rows: 8px; flex: none; border-radius: 4px; overflow: hidden; }
.biomerow .bsw i { display: block; }
.biomerow .bn { display: flex; flex-direction: column; min-width: 0; }
.biomerow .bn b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.biomerow .bn small { color: var(--muted); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.biomepack { overflow-y: auto; min-height: 0; padding-right: 4px; }
.packhead { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.packhead h3 { margin: 0; font-size: 17px; }
.packhead p { margin: 2px 0 0; }
.packramps { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 4px 0 10px; }
.packramps .pr { display: inline-flex; align-items: center; gap: 6px; }
.packramps .pr small { color: var(--muted); font: 600 10px var(--mono); text-transform: uppercase; }
.packramps .pr span { display: inline-flex; border-radius: 4px; overflow: hidden; }
.packramps .pr i { width: 12px; height: 14px; display: block; }
.packgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.packcard { display: flex; flex-direction: column; gap: 5px; padding: 6px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.025); font-size: 11.5px; font-weight: 600; color: #cfd0e0; text-align: left; min-width: 0; }
button.packcard:hover { border-color: rgba(var(--acc-rgb), .7); color: #fff; }
.packcard canvas { width: 100%; height: auto; aspect-ratio: auto; image-rendering: pixelated; border-radius: 8px; display: block; background: repeating-conic-gradient(#1d1e2b 0 25%, #242536 0 50%) 0 0 / 12px 12px; }
.packcard span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) {
  .biomewrap { grid-template-columns: 1fr; grid-template-rows: 200px minmax(0, 1fr); height: 72vh; }
  .packgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* seven top-bar tools (incl. Library + Send to) don't fit with labels below ~1400px: icon-only, titles stay as tooltips */
@media (max-width: 1500px) { .topbar .tb-wide .only-wide { display: none !important; } }
@media (max-width: 760px) {
  #exportBtn > span:not(.ico) { display: none; }
  .pxs-app .zoompill { display: none; }
  .pxs-app .seampill { top: 8px; right: 8px; }
  .pxs-app .playpill { bottom: 10px; }
}
/* ---------- Simplified workspace (html.pxs-simple, PIXX.workspace): finger-sized swatches + favourites; JS marks the advanced bits .adv ---------- */
html.pxs-simple .colorrow label, html.pxs-simple .colorrow .add { width: 44px; height: 44px; border-radius: 10px; }
html.pxs-simple .matbtn .fav { width: 30px; height: 30px; font-size: 16px; opacity: 1; }
.wsmore { margin: 4px 14px 14px; }
