/* /negative-to-positive/ page styles. Built from /assets/polyatic.css tokens only (no new colours or fonts). */
.nojs{margin:1.25rem 0 0;padding:0.875rem 1rem;border:1px solid var(--line);border-left:0.25rem solid var(--accent);border-radius:0.625rem;background:var(--surface);color:var(--ink);font-size:0.9375rem;line-height:1.6}

@media(min-width:920px){.np-duo{grid-template-columns:minmax(0,1.6fr) minmax(19rem,.85fr)}}
.np-side{display:grid;gap:1rem;align-content:start}

/* open buttons: the file inputs sit inside their labels, hidden but still focusable */
.np-file{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden;clip-path:inset(50%);pointer-events:none}
.np-open{display:grid;grid-template-columns:1fr 1fr;gap:0.5rem}
.np-openbtn{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:0.5rem;width:100%;height:3.25rem;font-size:1rem;white-space:nowrap;padding:0 0.75rem}
.np-openbtn:focus-within{outline:2px solid var(--accent);outline-offset:2px}
.np-cam{width:1.25rem;height:0.9375rem;border:2px solid currentColor;border-radius:0.25rem;position:relative;flex:none}
.np-cam::after{content:"";position:absolute;left:50%;top:50%;width:0.4375rem;height:0.4375rem;margin:-0.21875rem 0 0 -0.21875rem;border:2px solid currentColor;border-radius:50%;box-sizing:border-box}
.has-image .np-openbtn{height:2.5rem;font-size:0.9375rem}
#pane.drag{outline:2px dashed var(--accent);outline-offset:-0.5rem}

.hint{font-size:0.8125rem;color:var(--muted);margin:0.75rem 0.125rem 0;min-height:1.125rem}
.hint.bad{color:var(--bad);font-weight:600}

.np-work[hidden]{display:none}
.np-viewmodes{margin:0.75rem 0}
.np-stage{display:flex;align-items:center;justify-content:center;min-height:10rem;padding:0.75rem;border:1px solid var(--line);border-radius:0.5rem;background:var(--surface-2)}
.np-stage canvas{display:block;max-width:100%;max-height:min(62vh,40rem);width:auto;height:auto;box-shadow:var(--shadow);touch-action:pan-y}
.np-stage.crop canvas{touch-action:none;cursor:crosshair}
.np-stage.tapping canvas{cursor:crosshair}
.np-ba{margin-top:0.75rem}
.np-tapnote{margin:0.5rem 0.125rem 0;font-size:0.875rem;font-weight:600;color:var(--accent)}
.np-frames{list-style:none;margin:0.75rem 0 0;padding:0;display:flex;flex-wrap:wrap;gap:0.375rem}
.np-frames[hidden]{display:none}
.np-frames button{display:flex;flex-direction:column;align-items:center;gap:0.25rem;padding:0.3125rem;border:1px solid var(--line);border-radius:0.5rem;background:var(--surface);color:var(--ink-2);font:inherit;font-size:0.75rem;cursor:pointer}
.np-frames button[aria-pressed="true"]{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}
.np-frames canvas{display:block;max-width:4.5rem;max-height:3.25rem;border-radius:0.25rem}

.np-tips{list-style:none;margin:1rem 0 0;padding:0;display:grid;gap:0.5rem;font-size:0.875rem;color:var(--muted);line-height:1.45}
@media(min-width:620px){.np-tips{grid-template-columns:1fr 1fr}}
.np-tips li{padding:0.5rem 0.625rem;border:1px solid var(--line);border-radius:0.5rem;background:var(--surface)}
.np-tips b{color:var(--ink);display:block}

.sec{font-size:0.8125rem;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:var(--muted);margin:0 0 0.625rem}
.np-panel [hidden]{display:none}
.np-panel .modes{margin-bottom:0.75rem}
.np-panel .field+.field,.np-pair+.field,.np-btns+.field{margin-top:0.875rem}
.np-pair{display:grid;grid-template-columns:1fr 1fr;gap:0.75rem;align-items:end;margin-top:0.5rem}
.np-pair .field{display:flex;flex-direction:column;justify-content:flex-end}
.np-pair select{width:100%}
.np-whole{width:100%}
.np-pair+.field{margin-top:0.875rem}
.np-btns{display:grid;grid-template-columns:1fr 1fr;gap:0.5rem;margin-top:0.75rem}
.np-btns .btn{padding:0 0.5rem}
.btn[aria-pressed="true"]{border-color:var(--accent);background:var(--accent-soft)}
.btn:disabled{opacity:.5;cursor:default;filter:none}
.np-opt{font-size:0.875rem}
.np-out{display:flex;align-items:center;gap:0.5rem;margin:0.5rem 0.125rem;font-size:0.875rem;color:var(--muted);line-height:1.45}
.np-out b{font-family:var(--mono);color:var(--ink)}
.np-sw{flex:none;width:1.5rem;height:1.5rem;border-radius:0.3125rem;border:1px solid var(--line-2);background:var(--surface-2)}
.note{font-size:0.8125rem;color:var(--muted);margin:0.875rem 0.125rem 0;line-height:1.5}
.note b{color:var(--ink)}
.np-busy{margin:0.75rem 0.125rem 0;font-size:0.8125rem;color:var(--accent);font-weight:600}
.modes button:focus-visible,.np-frames button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

.explainer .np-steps,.explainer .np-cannot{color:var(--muted);font-size:0.9375rem;margin:0 0 0.75rem;padding-left:1.25rem}
.explainer .np-steps li,.explainer .np-cannot li{margin:0 0 0.5rem}
.explainer .np-steps b,.explainer .np-cannot b{color:var(--ink)}
.explainer table{max-width:none}
@media(max-width:480px){.explainer table{display:block;overflow-x:auto}}

/* live camera: the open row becomes 2 x 2; the live panel reuses the stage and button looks */
.np-live-dot{width:0.625rem;height:0.625rem;border-radius:50%;background:var(--bad);flex:none}
.np-live[hidden]{display:none}
.np-livestage{position:relative}
.np-livestage canvas{touch-action:manipulation}
.np-live.tapping .np-livestage canvas{cursor:crosshair;outline:2px dashed var(--accent);outline-offset:2px}
.np-livebtns{display:grid;grid-template-columns:1fr 1fr;gap:0.5rem;margin-top:0.75rem}
.np-livebtns .btn{padding:0 0.5rem}
.np-livebtns [hidden]{display:none}
.is-live #work{display:none}
/* the light box is always plain white, in light and dark theme alike: its job is to be a light source */
.np-lightbox{position:fixed;inset:0;z-index:1000;background:#fff;display:flex;align-items:flex-start;justify-content:center;padding:1rem;cursor:pointer}
.np-lightbox[hidden]{display:none}
.np-lightbox p{margin:0;max-width:34rem;font-size:0.875rem;line-height:1.5;color:#5a5f5b;text-align:center}
.np-lightbox:focus{outline:none}
