/* Nonogram portals — additions to style.css (loaded after it, portal pages only, so the sudoku
   pages stay byte-identical). Only the tokens already defined in style.css; the drawing uses
   currentColor, so screen and paper share one rule set and no new colour literal appears. */

.dot.nono-easy { background: var(--sd-level-sehr-leicht); }
.dot.nono-medium { background: var(--sd-level-mittel); }
.dot.nono-hard { background: var(--sd-level-schwer); }

/* Tool: controls left, preview right (stacked on narrow screens). */
.nono-top { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: flex-start; }
.nono-controls { flex: 1 1 420px; min-width: 0; }
.nono-tool .preview { flex: 0 1 240px; margin-top: 4px; }
.nono-tool .preview-box { max-width: 240px; }
.nono-tool .row .btn { align-self: flex-end; }
.nono-status { font-weight: 700; margin: 0 0 12px; }

/* Gallery of puzzle cards: empty grid with clues, never the picture. */
.nono-gallery-h { margin-top: 28px; }
.nono-hint { color: var(--sd-muted); font-size: var(--sd-fs-sm); margin: 0 0 12px; }
.nono-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }
.nono-card {
  position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 6px;
  padding: 8px; margin: 0; cursor: pointer; text-align: center;
  font: var(--sd-fs-xs)/1.3 var(--sd-font); color: var(--sd-text);
  background: var(--sd-paper); border: 1px solid var(--sd-field-line); border-radius: var(--sd-radius);
}
.nono-card[hidden] { display: none; }
.nono-card:hover { background: var(--sd-surface-2); }
.nono-card:focus-visible { outline: 3px solid var(--sd-gold-dark); outline-offset: 2px; }
.nono-card[aria-pressed="true"] { border-color: var(--sd-gold-line); background: var(--sd-gold-soft); box-shadow: 0 0 0 2px var(--sd-gold); }
.nono-badge {
  position: absolute; top: 4px; right: 4px; min-width: 24px; height: 24px; padding: 0 6px;
  border-radius: var(--sd-radius-pill); background: var(--sd-gold); color: var(--sd-gold-ink);
  font: 700 var(--sd-fs-xs)/24px var(--sd-font);
}
.nono-badge:empty { display: none; }
.nono-thumb { display: block; background: var(--sd-paper); }
.nono-thumb .nono { width: 100%; height: auto; }
.nono-cap { margin-top: auto; }
.nono-empty { grid-column: 1 / -1; color: var(--sd-muted); }
.nono-empty[hidden] { display: none; }

/* Motif of the week. */
.nono-week { margin: 16px 0; max-width: 420px; }
.nono-week .cap { font-weight: 700; margin-bottom: 6px; }
.nono-week-grid { background: var(--sd-paper); }
.nono-week-grid .nono { width: 100%; height: auto; }

/* The drawing (screen thumbnails, preview and print). Units are cells. */
.nono { display: block; color: inherit; }
.nono .bg { fill: var(--sd-paper); }
.nono .on { fill: currentColor; }
.nono line { stroke: currentColor; stroke-linecap: square; }
.nono .g { stroke-width: .03; }
.nono .g5 { stroke-width: .08; }
.nono .band { stroke-width: .02; stroke-opacity: .3; }
.nono .band5 { stroke-width: .05; stroke-opacity: .6; }
.nono .frame { fill: none; stroke: currentColor; stroke-width: .1; }
.nono text { font-family: var(--sd-font); font-size: .6px; text-anchor: middle; dominant-baseline: central; fill: currentColor; }

/* Sheets: style.css lays out .sheet/.cells; the size of each drawing is set in mm by the script. */
.nono-sheet .cells { align-content: space-evenly; }
.nono-sheet.per-4 .cells { grid-template-columns: 1fr 1fr; }
.nono-sheet figure { display: flex; flex-direction: column; align-items: center; }

@media (max-width: 600px) {
  .nono-gallery { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
  .nono-card { padding: 6px; gap: 4px; }
  .nono-tool .preview { flex-basis: 100%; }
  .nono-tool .preview-box { max-width: 200px; }
}
