/* PIXXOVO — app-specific bits on top of ../shared/pixx.css (rose accent from [data-app=pixxovo]) */
.pxs-ws { --left-w: 290px; --right-w: 320px; }
#view { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
#view.orbiting { cursor: grabbing; }
.pxs-stage { background: radial-gradient(800px 500px at 50% 45%, rgba(var(--acc-rgb), .06), transparent 70%); }
.pxs-stage.dragover::after { content: 'Drop a .vox or Pixxovo project'; 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; }
.viewpill { left: 12px; top: 12px; }
.zoompill { left: 12px; bottom: 12px; }
.zoompill .zl { min-width: 48px; text-align: center; font: 600 12px var(--mono); }
.pxs-stage .hint { position: absolute; right: 12px; bottom: 12px; color: var(--dim); font-size: 11px; pointer-events: none; }
.colorswatch { width: 30px; height: 26px; border-radius: 8px !important; border: 2px solid #fff !important; box-shadow: 0 0 0 1px rgba(0,0,0,.5), 0 2px 8px rgba(0,0,0,.4); flex: none; }
.vpal { display: grid; grid-template-columns: repeat(15, 1fr); gap: 2px; }
.vpal i { aspect-ratio: 1; border-radius: 3px; cursor: pointer; position: relative; box-shadow: inset 0 0 0 1px rgba(0,0,0,.35); }
.vpal i.used::after { content: ''; position: absolute; left: 50%; bottom: 1px; width: 3px; height: 3px; margin-left: -1.5px; border-radius: 50%; background: rgba(255,255,255,.8); box-shadow: 0 0 0 1px rgba(0,0,0,.5); }
.vpal i.on { box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--acc); z-index: 1; }
.vpal i:hover { transform: scale(1.25); z-index: 2; }
.vpal i b { position: absolute; left: 1px; top: 0; font: 700 7px/1 var(--mono); color: #fff; text-shadow: 0 0 2px #000; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.grid3 .num { width: 100%; }
.pv { display: flex; align-items: center; justify-content: center; min-height: 160px; border-radius: 12px; background: repeating-conic-gradient(#1d1e2b 0 25%, #242536 0 50%) 0 0 / 14px 14px; border: 1px solid var(--line); padding: 8px; }
.pv canvas { image-rendering: pixelated; max-width: 100%; }
.export-prev { display: flex; align-items: center; justify-content: center; min-height: 180px; 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; margin: 10px 0 4px; }
.export-prev img { image-rendering: pixelated; max-width: 100%; }
.export-prev .muted { white-space: pre-wrap; font: 11px/1.5 var(--mono); }
@media (max-width: 760px) {
  .pxs-stage .hint { display: none; }
  #exportBtn > span:not(.ico) { display: none; } #exportBtn { padding: 0 9px; }
  .viewpill { left: 8px; top: 8px; right: 8px; overflow-x: auto; }
  .zoompill { left: 8px; bottom: 8px; }
}
/* ---------- layers ---------- */
.layers { display: flex; flex-direction: column; gap: 3px; }
.layer { display: flex; align-items: center; gap: 6px; padding: 3px 8px 3px 3px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255,255,255,.02); cursor: pointer; }
.layer:hover { border-color: rgba(var(--acc-rgb), .4); }
.layer.on { border-color: var(--acc); background: rgba(var(--acc-rgb), .14); }
.layer.off .lname { opacity: .45; }
.layer .lname { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.layer .eye { color: var(--muted); }
/* ---------- model + biome browsers ---------- */
.pxo-models .mb-grid, .pxo-models .mb-detail, .pxo-biomes .bb-grid, .pxo-biomes .mb-detail { max-height: calc(100dvh - 300px); }
.mb { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.mb-top { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.mb-top .text { flex: 1 1 220px; width: auto; }
.mb-chips { margin-bottom: 10px; }
.mb-split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; min-height: 0; flex: 1; }
.mb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; align-content: start; overflow-y: auto; min-height: 0; max-height: 62vh; padding: 2px; }
.mb-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px 6px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.025); cursor: pointer; min-width: 0; }
.mb-card:hover { border-color: rgba(var(--acc-rgb), .5); }
.mb-card.on { border-color: var(--acc); box-shadow: inset 0 0 0 1px rgba(var(--acc-rgb), .4); background: rgba(var(--acc-rgb), .1); }
.mb-th { width: 100%; height: 84px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: repeating-conic-gradient(#1d1e2b 0 25%, #242536 0 50%) 0 0 / 12px 12px; overflow: hidden; }
.mb-th img { max-width: 100%; max-height: 100%; image-rendering: pixelated; opacity: 0; transition: opacity .15s; }
.mb-th img.in { opacity: 1; }
.mb-name { font-size: 11.5px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mb-star { position: absolute; right: 4px; top: 3px; color: var(--dim) !important; font-size: 15px !important; line-height: 1; padding: 2px 4px !important; }
.mb-star.on { color: #ffd34a !important; }
.mb-detail { overflow-y: auto; min-height: 0; max-height: 62vh; padding-right: 4px; }
.mb-detail h3 { margin: 0 0 2px; font-size: 15px; }
.mb-prev { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 170px; margin: 10px 0 4px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: repeating-conic-gradient(#1d1e2b 0 25%, #242536 0 50%) 0 0 / 14px 14px; }
.mb-prev canvas { image-rendering: pixelated; max-width: 100%; max-height: 260px; object-fit: contain; }
.mb-actions { margin-top: 10px; }
.bb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; align-content: start; overflow-y: auto; min-height: 0; max-height: 62vh; padding: 2px; }
.bb-card { display: flex; flex-direction: column; gap: 3px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.025); cursor: pointer; min-width: 0; }
.bb-card:hover { border-color: rgba(var(--acc-rgb), .5); }
.bb-card.on { border-color: var(--acc); background: rgba(var(--acc-rgb), .1); }
.bb-card b { font-size: 12.5px; } .bb-card .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bb-strip { display: flex; height: 12px; border-radius: 4px; overflow: hidden; margin-bottom: 3px; }
.bb-strip i { flex: 1; }
.bb-strip.big { height: 18px; margin: 8px 0 0; }
.bb-prev canvas { max-height: 300px; }
@media (max-width: 760px) {
  .mb-split { grid-template-columns: 1fr; }
  .mb-grid, .bb-grid { max-height: 34vh; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
  .bb-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .mb-detail { max-height: none; }
  .mb-th { height: 64px; }
}
/* ---------- materials (2026-10-22): each a rendered voxel swatch ---------- */
.matgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 4px; }
.matgrid .mat { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 2px 3px; min-height: 44px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255,255,255,.02); color: var(--muted); font-size: 10px; line-height: 1.1; cursor: pointer; }
.matgrid .mat img { width: 28px; height: 28px; object-fit: contain; image-rendering: pixelated; }
.matgrid .mat span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.matgrid .mat:hover { border-color: rgba(var(--acc-rgb), .5); color: var(--text); }
.matgrid .mat.on { border-color: var(--acc); background: rgba(var(--acc-rgb), .14); color: var(--text); }
/* ---------- objects, parts + timeline ---------- */
.objrow { display: grid; grid-template-columns: auto repeat(3, 1fr); gap: 4px; align-items: center; margin-top: 8px; }
.objrow .num { width: 100%; }
.parts { display: flex; flex-direction: column; gap: 3px; }
.timeline { display: flex; gap: 2px; margin: 6px 0; overflow-x: auto; padding-bottom: 2px; }
.timeline button { flex: 1 0 22px; height: 26px; min-width: 22px; border-radius: 6px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--muted); font: 600 10px var(--mono); cursor: pointer; padding: 0; }
.timeline button.key { color: var(--acc); }
.timeline button.on { border-color: var(--acc); background: rgba(var(--acc-rgb), .2); color: var(--text); }
.chan { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.chan label { display: flex; flex-direction: column; gap: 2px; font-size: 10.5px; color: var(--muted); }
.chan .num { width: 100%; }
/* the dope sheet (js/rig.js): parts × frames; ◆ = a key, its colour = its ease */
.dope { display: flex; flex-direction: column; gap: 2px; overflow-x: auto; margin: 6px 0; padding-bottom: 2px; }
.dope-row { display: flex; gap: 2px; align-items: center; }
.dope-name { flex: 0 0 76px; position: sticky; left: 0; z-index: 1; background: var(--panel, #1C2940); font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dope-row.on .dope-name { color: var(--text); }
.dope-f { flex: 0 0 18px; text-align: center; font: 600 9px var(--mono); color: var(--muted); }
.dope-f.on { color: var(--acc); }
.dope-c { flex: 0 0 18px; height: 20px; border-radius: 4px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--acc); font: 600 10px var(--mono); padding: 0; cursor: pointer; touch-action: none; }
.dope-c:last-child { opacity: .6; }
.dope-c.on { border-color: var(--acc); background: rgba(var(--acc-rgb), .2); }
.dope-c.e-in, .dope-c.e-out, .dope-c.e-inOut { color: var(--acc2); }
.dope-c.e-hold { color: var(--muted); }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.part-extras label { display: flex; flex-direction: column; gap: 2px; }
.part-extras select { width: 100%; }
.glchip.on { color: var(--acc); }
.refimg { max-width: 100%; max-height: 120px; image-rendering: pixelated; border-radius: 8px; background: repeating-conic-gradient(#1d1e2b 0 25%, #242536 0 50%) 0 0 / 12px 12px; }
.pic-prev { display: flex; align-items: center; justify-content: center; min-height: 180px; border-radius: 12px; border: 1px solid var(--line); background: repeating-conic-gradient(#1d1e2b 0 25%, #242536 0 50%) 0 0 / 14px 14px; padding: 8px; margin: 8px 0; }
.pic-prev canvas { image-rendering: pixelated; max-width: 100%; max-height: 300px; }
/* Simplified workspace (PIXX.workspace, html.pxs-simple): the .adv bits hide; what stays is touch-sized.
   The 255-colour palette is a dense grid: 36 px cells in a scrolling box, not 44 (that would be a 1,400 px column). */
html.pxs-simple .colorswatch { width: 44px; height: 44px; }
html.pxs-simple .vpal { grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); gap: 3px; max-height: 240px; overflow-y: auto; padding: 3px; }
html.pxs-simple .vpal i:hover { transform: none; }
html.pxs-simple .pxs-stage .hint { display: none; }
html.pxs-simple .pxs-side label.field { min-height: 44px; }
/* the shared Simplified rule makes a range 44 px tall and its gradient track would fill all of it: keep the track a thin line */
html.pxs-simple .pxs-app input[type=range] { background: linear-gradient(90deg, var(--acc), var(--acc2)) center / 100% 6px no-repeat; }
/* 2026-10-22 (IO): layer tags, preset cards, iso-tile swatches, the orbit joystick (js/touch.js) */
.layer .ltag { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.mb-preset .mb-del { right: auto; left: 4px; }
.isoSw .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -2px; border: 1px solid var(--line2); }
.joy { display: none; position: absolute; right: 12px; bottom: 12px; width: 96px; height: 96px; border-radius: 50%; z-index: 2; touch-action: none;
  background: radial-gradient(circle, rgba(var(--acc-rgb), .10), rgba(20,21,31,.72) 70%); border: 1px solid var(--line2); box-shadow: var(--shadow); }
.joy::before { content: ''; position: absolute; inset: 30px; border-radius: 50%; border: 1px dashed rgba(var(--acc-rgb), .35); }
.joy-knob { position: absolute; left: 26px; top: 26px; width: 44px; height: 44px; border-radius: 50%; background: rgba(var(--acc-rgb), .85); box-shadow: 0 2px 8px rgba(0,0,0,.45); pointer-events: none; }
.joy:not(.on) .joy-knob { transition: transform .15s ease-out; }
html.pxs-simple .joy { display: block; }
@media (pointer: coarse) { .joy { display: block; } .pxs-stage .hint { display: none; } }
