/* PIXXARA — app-specific bits on top of ../shared/pixx.css (orchid accent from [data-app=pixxara]) */
.pxs-ws { --left-w: 300px; --right-w: 340px; }
#view { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; touch-action: manipulation; cursor: pointer; image-rendering: pixelated; }
.pxs-stage { background: radial-gradient(700px 420px at 50% 45%, rgba(var(--acc-rgb), .06), transparent 70%); }
.hintpill { right: 12px; bottom: 12px; padding: 5px 10px; font-size: 11.5px; color: var(--muted); }
.infopill { left: 50%; top: 14px; transform: translateX(-50%); padding: 6px 12px; font-size: 12.5px; color: #fff; border-color: rgba(var(--acc-rgb), .55); }
.errpill { left: 50%; top: 14px; transform: translateX(-50%); padding: 6px 12px; font-size: 12.5px; color: #ffc2cb; border-color: rgba(255,93,115,.6); max-width: 80%; white-space: normal; }
.benchtext { width: 280px; }
.footbar { padding: 5px 14px; }
.pnl-head .pnl-tools { margin-left: auto; }

/* grids */
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 8px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 8px; }
.grid4 .field { justify-content: space-between; } .grid4 .num { width: 52px; }
.pnl-body input[type=color] { width: 44px; height: 30px; padding: 2px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel2); cursor: pointer; }
.pxs-app .btn.sm.danger { color: #ffb3bf; }

/* cast */
.castlist { display: flex; flex-direction: column; gap: 4px; }
.castrow { display: flex; align-items: center; gap: 10px; padding: 5px 8px 5px 5px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.025); text-align: left; min-height: 58px; }
.castrow:hover { border-color: rgba(var(--acc-rgb), .45); }
.castrow.on { border-color: var(--acc); background: rgba(var(--acc-rgb), .13); }
.castimg { width: 48px; height: 48px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 9px; overflow: hidden; background: repeating-conic-gradient(#221a28 0 25%, #2a2131 0 50%) 0 0 / 8px 8px; }
.castimg canvas { max-width: 48px; max-height: 48px; image-rendering: pixelated; }
.castname { display: flex; flex-direction: column; min-width: 0; }
.castname b { font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid var(--c, var(--acc)); padding-left: 6px; }
.castname small { color: var(--muted); font-size: 11px; padding-left: 9px; }
.swatches { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.swatch { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(0,0,0,.4); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.swatch.on { box-shadow: 0 0 0 2px var(--acc); }
.swatches.mini .swatch { width: 16px; height: 16px; border-radius: 4px; }

/* expressions */
.exprgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.exprcell { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px 3px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.02); font-size: 10.5px; color: var(--muted); min-width: 0; }
.exprcell canvas { width: 100%; max-width: 56px; height: auto; image-rendering: pixelated; border-radius: 6px; }
.exprcell span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exprcell:hover { border-color: rgba(var(--acc-rgb), .45); color: #fff; }
.exprcell.on { border-color: var(--acc); background: rgba(var(--acc-rgb), .14); color: #fff; }
.exedit { margin-top: 6px; padding: 8px 10px 4px; border-radius: 12px; background: rgba(255,255,255,.025); border: 1px solid var(--line); }
.exedit .lbl { margin-top: 2px; }
.rigrow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0; }
.rigrow b { width: 46px; font-size: 12px; text-transform: capitalize; }
.rigrow .num { width: 48px; }

/* painter */
.painterwrap { display: flex; justify-content: center; padding: 10px; margin: 4px 0 8px; border-radius: 12px; background: repeating-conic-gradient(#221a28 0 25%, #2a2131 0 50%) 0 0 / 12px 12px; border: 1px solid var(--line); }
.painter { image-rendering: pixelated; cursor: crosshair; touch-action: none; max-width: 100%; box-shadow: 0 0 0 1px rgba(255,255,255,.12); }

/* dialogue */
.nodelist { display: flex; flex-direction: column; gap: 3px; max-height: 300px; overflow-y: auto; scrollbar-width: thin; }
.noderow { display: grid; grid-template-columns: 52px 8px minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.02); text-align: left; font-size: 12px; min-height: 34px; }
.noderow:hover { border-color: rgba(var(--acc-rgb), .45); }
.noderow.on { border-color: var(--acc); background: rgba(var(--acc-rgb), .13); }
.noderow.bad { border-color: rgba(255,93,115,.7); } .noderow.warnrow .nid { color: #ffcf85; }
.nid { font: 600 11px var(--mono); color: var(--acc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ndot { width: 8px; height: 8px; border-radius: 50%; }
.ntext { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.ntext b { color: #fff; font-weight: 600; }
.nbadges { display: flex; gap: 4px; } .nbadges i { font-style: normal; font: 600 10.5px var(--mono); color: var(--acc2); background: rgba(var(--acc2-rgb), .12); border-radius: 6px; padding: 1px 5px; }
.tagbar { display: flex; flex-wrap: wrap; gap: 4px; margin: -4px 0 8px; }
.choices { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.choicerow { padding: 7px 8px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.02); display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.choicerow > .row:first-child { width: 100%; }
.cnum { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(var(--acc-rgb), .2); color: var(--acc); font: 700 11px var(--mono); flex: none; }
.choicerow .sel.sm, .pnl-body .row .sel.sm { max-width: 170px; }
.setrows { display: flex; flex-direction: column; gap: 4px; margin: 2px 0 4px; }
.loctable { display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow-y: auto; margin: 6px 0; }
.locrow .field.col { margin-bottom: 6px; } .locrow .field.col > span { font-weight: 500; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* text box styles */
.boxgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin-bottom: 10px; }
.boxcell { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 3px 4px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.02); font-size: 10.5px; color: var(--muted); }
.boxcell canvas { width: 100%; max-width: 64px; image-rendering: pixelated; }
.boxcell.on { border-color: var(--acc); background: rgba(var(--acc-rgb), .14); color: #fff; }

/* export */
.exportgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.exportgrid section { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.exportgrid section:last-child { grid-column: 1 / -1; border-color: rgba(var(--acc-rgb), .4); }
.exportgrid h4 { margin: 0 0 4px; font-size: 13px; color: #fff; }
.exportgrid .note { margin-top: 0; }
.exportgrid .row { display: flex; align-items: center; } .exportgrid .gap { gap: 8px; } .exportgrid .wrap { flex-wrap: wrap; }

@media (max-width: 1100px) { .pxs-ws { --left-w: 260px; --right-w: 300px; } .benchtext { width: 180px; } .exprgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .pxs-app .hintpill { display: none; }
  #exportBtn > span:not(.ico) { display: none; } #exportBtn { padding: 0 9px; }
  .projname { width: 110px; flex-basis: 110px; }
  .benchtext { width: 130px; }
  .exportgrid { grid-template-columns: 1fr; }
  .castrow, .noderow { min-height: 44px; }
  .exprgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .swatch { width: 28px; height: 28px; }
}
/* expression editor: label + select on one row, so the selects stay readable in a narrow panel */
.exedit .grid3 { grid-template-columns: 1fr; gap: 4px; margin-bottom: 6px; }
.exedit .grid3 .field.col { flex-direction: row; align-items: center; margin-bottom: 0; }
.exedit .grid3 .field.col > span { width: 54px; flex: none; }
/* cues (shake / music / sound effect when a line starts) */
.cues { display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; }
.cuerow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 4px 6px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255,255,255,.02); font-size: 12px; }
.cuetag { width: 22px; text-align: center; color: var(--acc); font-size: 13px; }
.cuerow .num { width: 56px; }
.badcue { color: #ffb3bf; font-weight: 800; }
/* Simplified workspace (PIXX.workspace, html.pxs-simple): touch-sized swatches, checkbox rows and pickers; Full is untouched */
html.pxs-simple .swatch, html.pxs-simple .swatches.mini .swatch { width: 40px; height: 40px; border-radius: 9px; }
html.pxs-simple .pnl-body label.field { min-height: var(--touch); }
html.pxs-simple .castrow, html.pxs-simple .noderow { min-height: var(--touch); }
html.pxs-simple .moretools { width: calc(100% - 24px); margin: 8px 12px 14px; }
