/* PIXXKIT — app-specific bits on top of ../shared/pixx.css (champagne accent from [data-app=pixxkit]) */
.pxs-ws { --left-w: 300px; --right-w: 300px; }
.pxs-shell { grid-template-rows: 52px auto minmax(0, 1fr) auto; }
.hidden { display: none !important; }
.grow { flex: 1; }
.projname { background: transparent; border: 1px solid transparent; border-radius: 8px; color: #fff; font: 700 14px var(--font); padding: 5px 8px; min-width: 0; width: clamp(110px, 18vw, 240px); }
.projname:hover { border-color: var(--line2); } .projname:focus { outline: none; border-color: var(--acc); background: rgba(0,0,0,.25); }
.logo-sub { color: var(--muted); font-size: 11.5px; font-weight: 600; margin-left: 6px; }
.tb-sep { width: 1px; height: 22px; background: var(--line2); margin: 0 6px; }

/* stage */
#stage { position: relative; overflow: hidden; background: repeating-linear-gradient(45deg, rgba(255,255,255,.012) 0 12px, transparent 12px 24px); }
#view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: default; }
#htmlPrev { position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); border: 1px solid var(--line2); border-radius: 12px; background: #e9e6e1; }
.zoompill { left: 12px; bottom: 12px; }
.zoompill .zl { min-width: 54px; text-align: center; font: 600 12px var(--mono); }
.thumbpill { right: 12px; bottom: 12px; flex-direction: column; align-items: flex-start; gap: 4px; padding: 8px; }
.thumbpill canvas { display: block; border-radius: 4px; max-width: 240px; height: auto; box-shadow: 0 2px 10px rgba(0,0,0,.4); }
@container pxs-stage (max-width: 600px) { .pxs-app .thumbpill { top: 12px; bottom: auto; } .thumbpill canvas { max-width: 140px; } } /* clear of the zoom pill on a narrow stage */
.dragover::after { content: 'Drop art to add it to the brand'; 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; }

/* options bar */
.opt-title { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: #fff; white-space: nowrap; }
.opt-title .ico { color: var(--acc); }
.opt-badge { font: 700 11.5px var(--mono); color: var(--acc); background: rgba(var(--acc-rgb), .12); border: 1px solid rgba(var(--acc-rgb), .35); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.vsep { width: 1px; height: 20px; background: var(--line2); margin: 0 4px; }
.ibtn.on { color: var(--acc); background: rgba(var(--acc-rgb), .14); }
/* Pixxkit's footbar differs from the shared one (shared/pixx.css): body font, wraps, stays on phones */
.footbar { gap: 16px; padding: 5px 14px; min-height: 28px; font: inherit; font-size: 12px; white-space: normal; overflow: visible; flex-wrap: wrap; }
.footbar b { color: #e8e6ee; font-weight: bolder; }

/* left: templates */
.tabs.pad { padding: 10px 12px 4px; position: sticky; top: 0; z-index: 2; background: var(--panel, #15161f); }
.tplwrap { padding: 8px 12px 16px; }
.platchips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.tplgrid { display: grid; grid-template-columns: 1fr; gap: 6px; }
.tpl { display: grid; grid-template-columns: 86px 1fr; gap: 10px; align-items: center; text-align: left; padding: 6px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.025); min-height: 58px; }
.tpl:hover { border-color: rgba(var(--acc-rgb), .45); }
.tpl.on { border-color: var(--acc); background: rgba(var(--acc-rgb), .12); }
.tpl-th { width: 86px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: repeating-conic-gradient(#2a2b38 0 25%, #222330 0 50%) 0 0 / 8px 8px; overflow: hidden; }
.tpl-cv { max-width: 86px; max-height: 48px; image-rendering: pixelated; display: block; }
.tpl-meta { display: grid; grid-template-columns: 1fr auto; column-gap: 6px; min-width: 0; }
.tpl-meta b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #f2f0f6; }
.tpl-meta .muted { grid-column: 1; }
.tpl-meta .st { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.st { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font: normal 800 11px var(--font); flex: none; }
.st.ok { background: rgba(80,200,120,.18); color: #6fe39a; }
.st.warn { background: rgba(250,190,70,.18); color: #ffcf5c; }
.st.error { background: rgba(240,80,80,.2); color: #ff7a7a; }
.tplextra { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.emaillist { display: flex; flex-wrap: wrap; gap: 6px; }
.note { color: var(--muted); font-size: 12px; line-height: 1.45; margin: 6px 0; }
.note.warn { color: #ffcf5c; } .note.good { color: #6fe39a; }
.note a { color: var(--acc); }

/* left: brand */
.field.col { display: flex; flex-direction: column; align-items: stretch; gap: 4px; margin-bottom: 8px; }
.field.col > span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.field.col .text, .field.col textarea { width: 100%; }
.pxs-app textarea.text { resize: vertical; min-height: 60px; padding: 6px 8px; font: 13px/1.4 var(--font); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
.sel.full { width: 100%; }
.lbl { font-size: 11.5px; color: var(--muted); font-weight: 700; margin: 8px 0 4px; }
.palrow.edit { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.palrow.edit i { width: 30px; height: 30px; border-radius: 7px; border: 1px solid rgba(255,255,255,.18); position: relative; cursor: pointer; }
.palrow.edit i b { position: absolute; top: -6px; right: -6px; width: 16px; height: 16px; border-radius: 50%; background: #111; color: #fff; font: 700 10px/16px var(--font); text-align: center; display: none; }
.palrow.edit i:hover b { display: block; }
.palrow.edit i.add { display: flex; align-items: center; justify-content: center; color: var(--muted); border-style: dashed; font-weight: 700; }
.roles { display: flex; flex-direction: column; gap: 4px; }
.rolef { display: grid; grid-template-columns: 18px 1fr 110px; align-items: center; gap: 8px; font-size: 12.5px; }
.rolesw { width: 18px; height: 18px; border-radius: 5px; border: 1px solid rgba(255,255,255,.2); }
.logogrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.lgtile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px 6px; border-radius: 10px; border: 1px solid var(--line); background: #101119; min-height: 64px; }
.lgtile:hover { border-color: rgba(var(--acc-rgb), .45); }
.lgtile.on { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc) inset; }
.lgtile span { font-size: 11px; color: var(--muted); font-weight: 600; }
.lg-cv { max-width: 100%; max-height: 40px; image-rendering: pixelated; }
.asslot { margin-bottom: 6px; }
.asrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.aschip { position: relative; width: 56px; height: 44px; border-radius: 8px; border: 1px solid var(--line2); background: repeating-conic-gradient(#2a2b38 0 25%, #222330 0 50%) 0 0 / 8px 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.as-cv { max-width: 52px; max-height: 40px; image-rendering: pixelated; }
.as-x { position: absolute; top: 1px; right: 1px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.7); color: #fff; font-size: 11px; display: none; }
.aschip:hover .as-x { display: block; }
.as-add, .as-lib { width: 44px; height: 44px; border-radius: 8px; border: 1px dashed var(--line2); color: var(--muted); font-size: 18px; font-weight: 700; }
.as-add:hover, .as-lib:hover { border-color: var(--acc); color: var(--acc); }
.seg.wrap { flex-wrap: wrap; }

/* right */
.lays { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.lay { display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.025); cursor: pointer; user-select: none; min-height: 36px; }
.lay:hover { border-color: rgba(var(--acc-rgb), .4); }
.lay.on { border-color: var(--acc); background: rgba(var(--acc-rgb), .14); }
.lay.off .lay-name { opacity: .45; }
.lay-eye { width: 24px; height: 24px; border-radius: 6px; color: var(--acc); font-size: 12px; flex: none; }
.lay-eye:hover { background: rgba(255,255,255,.07); }
.lay-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; font-size: 13px; }
.issues { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.issues li { font-size: 12px; line-height: 1.4; padding: 6px 8px; border-radius: 8px; border-left: 3px solid; background: rgba(255,255,255,.03); }
.issues li.error { border-color: #ff6b6b; } .issues li.warn { border-color: #ffcf5c; } .issues li.ok { border-color: #6fe39a; }

/* dialogs */
.chkwrap { display: flex; flex-direction: column; gap: 6px; max-height: 66vh; overflow: auto; }
.chkpl { border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.chkpl summary { cursor: pointer; padding: 4px 0; font-size: 13.5px; }
.chklist { display: flex; flex-direction: column; gap: 3px; margin: 6px 0; }
.chkrow { display: grid; grid-template-columns: 22px minmax(120px, 1fr) 90px 2fr; gap: 8px; align-items: center; text-align: left; padding: 5px 6px; border-radius: 8px; font-size: 12.5px; min-height: 34px; }
.chkrow:hover { background: rgba(var(--acc-rgb), .1); }
.chkrow .iss { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.expwrap .tabs { flex-wrap: wrap; margin-bottom: 10px; }
.exp-pane { min-height: 160px; }
.exp-prev { display: block; max-width: 100%; image-rendering: pixelated; margin-bottom: 8px; background: repeating-conic-gradient(#2a2b38 0 25%, #222330 0 50%) 0 0 / 10px 10px; border-radius: 8px; }

/* narrow desktops */
@media (max-width: 1280px) { .pxs-ws { --left-w: 270px; --right-w: 270px; } }
@media (max-width: 1100px) { .thumbpill canvas { max-width: 170px; } .projname { width: 130px; } }
/* phones: side panels become bottom sheets (shared), top-bar actions fold into ⋯ */
@media (max-width: 760px) {
  .pxs-app .footbar { display: flex; }
  .pxs-app .tb-sep, .pxs-app .projname { display: none; }
  .pxs-app #thumbPrev { display: none; }
  .pxs-app .footbar span:nth-child(n+3) { display: none; }
  .optionsbar .vsep { display: none; }
  .tpl { grid-template-columns: 96px 1fr; }
  .rolef { grid-template-columns: 18px 1fr 130px; }
  .chkrow { grid-template-columns: 22px 1fr 80px; } .chkrow .iss { display: none; }
  #htmlPrev { inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); }
}
/* post & store copy: per-network limits */
.meters { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.meter { font: 600 10.5px var(--mono); padding: 2px 7px; border-radius: 999px; background: rgba(61,220,151,.12); color: #7fe8b8; white-space: nowrap; }
.meter.is-warn { background: rgba(245,185,69,.14); color: #f5c76a; }
.meter.is-over { background: rgba(255,107,129,.16); color: #ff9aa9; }
.copyrows { display: flex; flex-direction: column; gap: 8px; }
.copyrow { border: 1px solid var(--line2); border-radius: 10px; padding: 8px 10px; background: rgba(255,255,255,.02); }
.copyrow.is-over { border-color: rgba(255,107,129,.55); }
.copyrow.is-warn { border-color: rgba(245,185,69,.45); }
.cr-head { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.cr-count { font: 600 11.5px var(--mono); color: var(--muted); }
.copyrow.is-over .cr-count { color: #ff9aa9; }
.cr-bar { height: 4px; border-radius: 3px; background: rgba(255,255,255,.08); margin: 6px 0 4px; overflow: hidden; }
.cr-bar i { display: block; height: 100%; background: #3ddc97; }
.copyrow.is-warn .cr-bar i { background: #f5b945; }
.copyrow.is-over .cr-bar i { background: #ff6b81; }
.cr-msg { font-size: 11.5px; color: var(--muted); min-height: 2px; margin-bottom: 6px; }
.copyrow.is-over .cr-msg { color: #ff9aa9; }
.copyrow textarea { width: 100%; margin-bottom: 6px; }
/* Simplified workspace (PIXX.workspace, html.pxs-simple): the .adv bits hide; what stays is touch-sized */
html.pxs-simple .lay { min-height: 52px; padding: 3px 8px; }
html.pxs-simple .lay-eye { width: 44px; height: 44px; font-size: 14px; }
html.pxs-simple .palrow.edit i { width: 40px; height: 40px; }
html.pxs-simple .aschip { width: 60px; height: 44px; }
html.pxs-simple .chkrow { 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; }
html.pxs-simple #thumbPrev { display: none; } /* the list-size preview goes with its toggle */
