/* cw.css — page layer for /crossword-maker/. The shell (header, controls, buttons, explainer,
   footer) is /assets/polyatic.css; this file adds the cutting-mat stage with the printed grid
   on it, as on /word-search-maker/. The paper is white in both themes: it is an object on the mat. */
.cw-noscript{margin:1rem;padding:.875rem 1rem;border:1px solid var(--line);border-left:.25rem solid var(--accent);border-radius:.625rem;background:var(--surface)}
.cw-head h1{margin-bottom:.25rem}
.cw-head .sub{margin-bottom:.875rem}

/* ---------- the stage ---------- */
.duo.cw-duo>.pane-result{position:static}
.cw-stage{background:radial-gradient(120% 80% at 50% 0%,rgba(255,196,120,.16),transparent 60%),linear-gradient(180deg,var(--mat),var(--mat-2));
  color:var(--mat-ink);border-radius:var(--r);padding:.75rem .875rem 1rem;box-shadow:var(--shadow);min-width:0}
.cw-stage-h{font-family:var(--mono);font-size:.6875rem;font-weight:500;text-transform:uppercase;letter-spacing:.07em;color:var(--mat-muted);margin:0 0 .5rem;text-align:center}
.cw-paper{max-width:30rem;margin:0 auto;padding:.625rem .5rem .75rem;background:#fff;border-radius:3px;
  box-shadow:0 1px 0 rgba(0,0,0,.1),0 18px 40px -16px rgba(0,0,0,.6)}
.cw-title{margin:0 0 .5rem;text-align:center;font-family:"Times New Roman",Times,"Liberation Serif",serif;font-weight:700;font-size:1.3125rem;line-height:1.2;color:#1b1d1c;overflow-wrap:anywhere}
.cw-paper canvas{display:block;margin:0 auto;max-width:100%}
.cw-summary{margin:.625rem 0;text-align:center;font-size:.875rem;color:var(--mat-ink)}
.cw-summary b{color:#fff}
.cw-notes{max-width:30rem;margin:0 auto .625rem}
.cw-notes:empty{display:none}
.cw-note{margin:0 0 .5rem;padding:.625rem .75rem;border-radius:.5rem;font-size:.8125rem;line-height:1.45;background:rgba(255,190,90,.14);border-left:.1875rem solid #f2c94c}
.cw-note p{margin:0 0 .5rem}
.cw-note b{color:#fff}
.cw-note .btn{margin-right:.375rem}
.cw-small{min-height:2.25rem;padding:.375rem .875rem;font-size:.8125rem}
.cw-dl{display:flex;flex-wrap:wrap;gap:.5rem;max-width:30rem;margin:0 auto}
.cw-dl .btn{flex:1 1 7rem}
.cw-dl #pdfBtn{flex-basis:100%}
.cw-dl #pdfBtn small{font-weight:500;opacity:.8;margin-left:.375rem}
.cw-dl .btn:disabled{opacity:.6;cursor:progress}
.cw-stage .btn.ghost{color:var(--mat-ink);border-color:rgba(255,255,255,.4);background:transparent}
.cw-stage .btn.ghost[aria-pressed="true"]{background:var(--mat-ink);color:var(--mat);border-color:var(--mat-ink)}
.cw-msg{margin:.5rem 0 0;text-align:center;font-size:.8125rem;color:var(--mat-muted)}
.cw-msg:empty{display:none}

/* the clue lists, readable on screen (the PDF sets its own) */
.cw-clues{display:grid;gap:.25rem 1.25rem;max-width:30rem;margin:1rem auto 0}
@media(min-width:560px){.cw-clues{grid-template-columns:1fr 1fr}}
.cw-clues h3{margin:.25rem 0 .375rem;font-size:.9375rem;color:var(--mat-ink);border-bottom:1px solid rgba(255,255,255,.2);padding-bottom:.25rem}
.cw-clues h3[hidden]{display:none}
.cw-cluelist{list-style:none;margin:0 0 .75rem;padding:0;font-size:.875rem;line-height:1.4}
.cw-cluelist li{display:grid;grid-template-columns:1.75rem minmax(0,1fr);gap:0 .25rem;padding:.1875rem 0}
.cw-cluelist b{text-align:right;padding-right:.25rem;font-variant-numeric:tabular-nums}
.cw-cluelist em{grid-column:2;font-style:normal;font-family:var(--mono);font-size:.8125rem;letter-spacing:.06em;color:var(--signal)}

/* ---------- the form ---------- */
.cw-form-h{margin:0 0 .75rem;font-size:1.1875rem}
.cw-hint{margin:.375rem 0 0;font-size:.8125rem;color:var(--muted);line-height:1.45}
.cw-warn{color:var(--warn)}
.cw-form textarea{min-height:14rem;resize:vertical;line-height:1.45}
.cw-row{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem .75rem}
.cw-row .cw-hint{margin:0}

@media(min-width:920px){
  .duo.cw-duo{grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);grid-template-areas:none}
  .duo.cw-duo>.pane-result,.duo.cw-duo>.pane-main{grid-area:auto}
}

/* ---------- Name art: the mode switch and the poster on the mat ---------- */
.cw-duo[hidden]{display:none}
.cw-modes{max-width:30rem;margin:0 0 .875rem}
.cw-modes button{display:flex;flex-direction:column;align-items:center;gap:.0625rem;line-height:1.2}
.cw-modes button small{font-weight:500;font-size:.6875rem;opacity:.75}
.cw-pick{margin-bottom:0}
.cw-pick button{flex:1 1 30%;min-height:2.5rem}
.cw-poster{display:flex;justify-content:center;margin:0 auto .625rem}
.cw-poster canvas{display:block;max-width:100%;border-radius:2px;box-shadow:0 1px 0 rgba(0,0,0,.12),0 18px 40px -16px rgba(0,0,0,.65)}
#posterPdfBtn{flex-basis:100%}
#posterPdfBtn small{font-weight:500;opacity:.8;margin-left:.375rem}
