/* ow.css — page layer for /open-when-letters/. The shell (header, modes, chips, buttons, fields,
   explainer, footer) is /assets/polyatic.css; this adds the cutting-mat stage with the finished set
   lying on it (paper-white in both themes), the page previews and the form details. */
.ow-noscript{margin:1rem;padding:.875rem 1rem;border:1px solid var(--line);border-left:.25rem solid var(--accent);border-radius:.625rem;background:var(--surface)}
.ow-head h1{margin-bottom:.25rem}
.ow-head .sub{margin-bottom:.625rem}

/* ---------- the stage ---------- */
.duo.ow-duo>.pane-result{position:static}
@media (min-width:920px){
  .duo.ow-duo{grid-template-columns:minmax(22rem,1fr) minmax(0,1fr)}
  .duo.ow-duo>.pane-result{position:sticky;top:1rem}
}
.ow-stage{background:radial-gradient(110% 70% at 70% 0%,rgba(255,200,170,.13),transparent 60%),linear-gradient(180deg,var(--mat),var(--mat-2));
  color:var(--mat-ink);border-radius:var(--r);padding:.5rem .625rem .75rem;box-shadow:var(--shadow);min-width:0}
.ow-fan{display:block;width:100%;max-width:30rem;height:auto;margin:0 auto}
.ow-nav{display:flex;align-items:center;justify-content:center;gap:.625rem;margin:.25rem 0 0}
.ow-step{flex:0 0 auto;width:2.5rem;height:2.25rem;border:1px solid rgba(255,255,255,.3);background:transparent;color:var(--mat-ink);border-radius:.4375rem;font:inherit;font-size:1.25rem;line-height:1;cursor:pointer}
.ow-step:hover{border-color:rgba(255,255,255,.7)}
.ow-step:disabled{opacity:.35;cursor:default}
.ow-pos{flex:1 1 auto;min-width:0;text-align:center;font-size:.875rem;font-weight:600;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ow-posn{display:block;font-family:var(--mono);font-size:.6875rem;font-weight:400;color:var(--mat-muted);font-variant-numeric:tabular-nums}
.ow-actions{display:flex;gap:.375rem;margin:.5rem 0 0}
.ow-actions .btn{flex:1 1 3rem;padding:0 .5rem;white-space:nowrap}
.ow-actions .btn.ow-main{flex:3 1 10rem;font-size:.9375rem}
.ow-stage .btn.ghost{color:var(--mat-ink);border-color:rgba(255,255,255,.4);background:transparent}
.ow-stage .btn:disabled{opacity:.55;cursor:default}
.ow-step:focus-visible,.ow-stage .btn:focus-visible{outline:2px solid var(--signal);outline-offset:2px}
.ow-status{margin:.5rem 0 0;font-size:.8125rem;line-height:1.45;color:var(--mat-muted)}
.ow-status b{color:var(--mat-ink)}
.ow-warn{color:#ffd2a8;font-weight:600}
.ow-msg{margin:.25rem 0 0;font-size:.875rem;font-weight:600;color:var(--mat-ink)}
.ow-msg:empty{display:none}
/* the printed pages: envelope sheet and its letter side by side, the band under them */
.ow-pages{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.625rem;margin:.75rem 0 0;padding:.625rem 0 0;border-top:1px solid rgba(255,255,255,.16)}
.ow-fig{margin:0;min-width:0;display:flex;flex-direction:column}
.ow-fig canvas{display:block;width:100%;height:auto;border-radius:.125rem;box-shadow:0 .375rem 1rem rgba(0,0,0,.35),0 1px 2px rgba(0,0,0,.3)}
.ow-fig figcaption{margin-top:.3rem;font-family:var(--mono);font-size:.6875rem;letter-spacing:.02em;color:var(--mat-muted);text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ow-band{grid-column:1/-1}

/* ---------- the form ---------- */
.ow-form-h{margin:0 0 .75rem;font-size:1.1875rem}
.ow-form .modes{margin-bottom:.75rem}
.modes.ow-for button{flex:1 1 auto;white-space:nowrap;padding:.5rem .625rem}
.ow-row{display:flex;justify-content:space-between;align-items:baseline;gap:.5rem;margin:.25rem 0 .375rem}
.ow-k{font-size:.8125rem;font-weight:600;color:var(--ink-2)}
.ow-count{font-family:var(--mono);font-size:.8125rem;font-weight:600;color:var(--accent);font-variant-numeric:tabular-nums}
.ow-chips{gap:.375rem}
.ow-chips .chip{padding:.4375rem .625rem;font-size:.8125rem;text-align:left}
.ow-chips .chip:disabled{opacity:.45;cursor:default}
.ow-add{display:flex;gap:.5rem;align-items:flex-end;margin:.75rem 0 1rem}
.ow-lab{display:flex;flex-direction:column;gap:.3125rem;margin:0 0 .75rem;font-size:.8125rem;font-weight:600;color:var(--ink-2);min-width:0;flex:1 1 auto}
.ow-add .ow-lab{margin:0}
.ow-add .btn{flex:0 0 auto}
.ow-form textarea{font-family:var(--sans);font-size:1rem;line-height:1.5;min-height:12rem}
.ow-note{margin:.375rem 0 0;font-size:.8125rem;line-height:1.45;color:var(--muted)}
.ow-tools{display:flex;flex-wrap:wrap;gap:1rem;margin:.375rem 0 1rem}
.ow-link{border:0;background:none;padding:0;font:inherit;font-size:.8125rem;font-weight:600;color:var(--accent);text-decoration:underline;text-underline-offset:2px;cursor:pointer}
.ow-link[hidden]{display:none}
.ow-link:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.ow-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.625rem}
.ow-designs{display:flex;flex-wrap:wrap;gap:.375rem;margin:0 0 .75rem}
.ow-design{display:inline-flex;align-items:center;gap:.375rem;padding:.375rem .5rem;border:1px solid var(--line);border-radius:.5rem;background:var(--surface);color:var(--ink-2);font:inherit;font-size:.8125rem;cursor:pointer}
.ow-design.active{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent);color:var(--ink)}
.ow-design:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.ow-sw{width:1rem;height:1rem;border-radius:.25rem;border:2px solid;flex:0 0 auto}
.ow-draft{margin:.375rem 0 0;font-size:.8125rem;color:var(--muted);line-height:1.45}
.ow-ideas{columns:2 15rem;column-gap:2rem;padding-left:1.1rem}
.ow-ideas li{break-inside:avoid;margin:0 0 .25rem}
@media (prefers-reduced-motion:reduce){.ow-design,.ow-step{transition:none}}
.ow-gap{margin-top:1rem}
