/* Rectangles board. Loaded automatically for the registered game "rectangles" (assets/board-<slug>.css). Presentation only: animation never decides state. */
:root{--rectangles:#d9e4d6;--rc-paper:#fffdf7;--rc-fill:#eef3ea;--rc-line:#2a2a2a;--rc-pv:#f1e3b8;--rc-bad:#9b2d20}
.rectangles-color{background:var(--rectangles);--puzzle-accent:var(--rectangles)}
.puzzle-clean.rectangles-color{background:transparent}
.kh-summary.rectangles-color{background:var(--puzzle-accent)}
.rc-meta b{font-variant-numeric:tabular-nums}
.rc-stage{display:flex;justify-content:center;margin:0 auto 10px;width:100%}
.rc-board{--rows:6;--cols:6;display:grid;grid-template-rows:repeat(var(--rows),minmax(0,1fr));width:100%;max-width:calc(var(--cols) * 72px);aspect-ratio:calc(var(--cols) / var(--rows));box-sizing:border-box;padding:3px;background:var(--ink);border-radius:10px;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent}
.rc-row{display:grid;grid-template-columns:repeat(var(--cols),minmax(0,1fr));min-height:0}
.rc-cell{position:relative;display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;padding:0;margin:0;border:0;border-radius:0;background:var(--rc-paper);box-shadow:inset 0 0 0 1px rgba(0,0,0,.28);color:var(--ink);font:inherit;cursor:pointer;touch-action:none}
.rc-cell:focus-visible{outline:3px solid var(--ink);outline-offset:-3px;z-index:4}
.rc-n{font-size:clamp(18px,6.4vw,28px);line-height:1;font-weight:800;font-variant-numeric:tabular-nums;pointer-events:none}
.rc-cell.is-cov{background:var(--rc-fill);box-shadow:none}
.rc-cell.is-cov.eT{box-shadow:inset 0 3px 0 var(--rc-line)}
.rc-cell.is-cov.eB{box-shadow:inset 0 -3px 0 var(--rc-line)}
.rc-cell.is-cov.eL{box-shadow:inset 3px 0 0 var(--rc-line)}
.rc-cell.is-cov.eR{box-shadow:inset -3px 0 0 var(--rc-line)}
.rc-cell.is-cov.eT.eB{box-shadow:inset 0 3px 0 var(--rc-line),inset 0 -3px 0 var(--rc-line)}
.rc-cell.is-cov.eT.eL{box-shadow:inset 0 3px 0 var(--rc-line),inset 3px 0 0 var(--rc-line)}
.rc-cell.is-cov.eT.eR{box-shadow:inset 0 3px 0 var(--rc-line),inset -3px 0 0 var(--rc-line)}
.rc-cell.is-cov.eB.eL{box-shadow:inset 0 -3px 0 var(--rc-line),inset 3px 0 0 var(--rc-line)}
.rc-cell.is-cov.eB.eR{box-shadow:inset 0 -3px 0 var(--rc-line),inset -3px 0 0 var(--rc-line)}
.rc-cell.is-cov.eL.eR{box-shadow:inset 3px 0 0 var(--rc-line),inset -3px 0 0 var(--rc-line)}
.rc-cell.is-cov.eT.eB.eL{box-shadow:inset 0 3px 0 var(--rc-line),inset 0 -3px 0 var(--rc-line),inset 3px 0 0 var(--rc-line)}
.rc-cell.is-cov.eT.eB.eR{box-shadow:inset 0 3px 0 var(--rc-line),inset 0 -3px 0 var(--rc-line),inset -3px 0 0 var(--rc-line)}
.rc-cell.is-cov.eT.eL.eR{box-shadow:inset 0 3px 0 var(--rc-line),inset 3px 0 0 var(--rc-line),inset -3px 0 0 var(--rc-line)}
.rc-cell.is-cov.eB.eL.eR{box-shadow:inset 0 -3px 0 var(--rc-line),inset 3px 0 0 var(--rc-line),inset -3px 0 0 var(--rc-line)}
.rc-cell.is-cov.eT.eB.eL.eR{box-shadow:inset 0 0 0 3px var(--rc-line)}
/* Solved-number tick: drawn with borders (no font glyph), so it is centred on its own box, never clipped, crisp at any pixel ratio and scales with the cell. */
.rc-cell{--tk:clamp(11px,3.6vw,16px)}
.rc-cell.clue-done::after{content:"";position:absolute;top:calc(var(--tk) * .26);right:calc(var(--tk) * .42);width:calc(var(--tk) * .36);height:calc(var(--tk) * .66);box-sizing:border-box;border:solid var(--ink);border-width:0 max(2px,calc(var(--tk) * .15)) max(2px,calc(var(--tk) * .15)) 0;transform:rotate(45deg);transform-origin:60% 60%;opacity:.8;pointer-events:none}
.rc-cell.is-sel{background:repeating-linear-gradient(135deg,var(--rc-fill) 0 6px,#dfe7da 6px 12px);outline:3px dashed var(--ink);outline-offset:-5px}
.rc-cell.is-pv{background:var(--rc-pv);box-shadow:none}
.rc-cell.is-pv.pT{box-shadow:inset 0 3px 0 var(--ink)}.rc-cell.is-pv.pB{box-shadow:inset 0 -3px 0 var(--ink)}.rc-cell.is-pv.pL{box-shadow:inset 3px 0 0 var(--ink)}.rc-cell.is-pv.pR{box-shadow:inset -3px 0 0 var(--ink)}
.rc-cell.is-pv.pT.pL{box-shadow:inset 0 3px 0 var(--ink),inset 3px 0 0 var(--ink)}.rc-cell.is-pv.pT.pR{box-shadow:inset 0 3px 0 var(--ink),inset -3px 0 0 var(--ink)}
.rc-cell.is-pv.pB.pL{box-shadow:inset 0 -3px 0 var(--ink),inset 3px 0 0 var(--ink)}.rc-cell.is-pv.pB.pR{box-shadow:inset 0 -3px 0 var(--ink),inset -3px 0 0 var(--ink)}
.rc-cell.is-pv.pT.pB{box-shadow:inset 0 3px 0 var(--ink),inset 0 -3px 0 var(--ink)}.rc-cell.is-pv.pL.pR{box-shadow:inset 3px 0 0 var(--ink),inset -3px 0 0 var(--ink)}
.rc-cell.is-pv.pT.pB.pL{box-shadow:inset 0 3px 0 var(--ink),inset 0 -3px 0 var(--ink),inset 3px 0 0 var(--ink)}.rc-cell.is-pv.pT.pB.pR{box-shadow:inset 0 3px 0 var(--ink),inset 0 -3px 0 var(--ink),inset -3px 0 0 var(--ink)}
.rc-cell.is-pv.pT.pL.pR{box-shadow:inset 0 3px 0 var(--ink),inset 3px 0 0 var(--ink),inset -3px 0 0 var(--ink)}.rc-cell.is-pv.pB.pL.pR{box-shadow:inset 0 -3px 0 var(--ink),inset 3px 0 0 var(--ink),inset -3px 0 0 var(--ink)}
.rc-cell.is-pv.pT.pB.pL.pR{box-shadow:inset 0 0 0 3px var(--ink)}
.rc-cell.is-pv.is-bad{background:repeating-linear-gradient(45deg,#f6d9d3 0 5px,#fffdf7 5px 10px)}
.rc-cell.is-pv.is-bad::before{content:"✕";position:absolute;left:3px;top:1px;font-size:12px;line-height:1;font-weight:800;color:var(--rc-bad)}
.rc-cell.is-anchor{outline:3px solid var(--ink);outline-offset:-4px;background:var(--rc-pv)}
.rc-cell.is-anchor::before{content:"◤";position:absolute;left:3px;top:1px;font-size:10px;line-height:1}
.rc-cell.is-reach{background-image:radial-gradient(rgba(0,0,0,.25) 1.2px,transparent 1.4px);background-size:8px 8px}
.rc-cell.is-reach.hT{border-top:2px dotted var(--ink)}.rc-cell.is-reach.hB{border-bottom:2px dotted var(--ink)}.rc-cell.is-reach.hL{border-left:2px dotted var(--ink)}.rc-cell.is-reach.hR{border-right:2px dotted var(--ink)}
.rc-cell.is-new{animation:rc-pop .24s ease-out}
.rc-cell.rc-shake{animation:rc-shake .3s}
.rc-cell.kh-hint-mark{outline:3px solid var(--ink);outline-offset:-3px;animation:kh-hint-glow 1.6s ease-in-out 2;z-index:3}
.rc-note{text-align:center;min-height:2.6em;margin:0 0 8px;color:var(--muted);font-size:15px;line-height:1.3}
.rc-note.rc-bad{color:var(--rc-bad);font-weight:600}
.rc-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;max-width:420px;margin:0 auto 8px}
.rc-actions button{min-height:48px;min-width:0;border-radius:12px;touch-action:manipulation;font-size:16px}
.rc-tools{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin-bottom:8px}
.rc-tools button{min-height:44px;min-width:0;touch-action:manipulation}
.rc-tools .kh-hint-mark,.rc-actions .kh-hint-mark{border-radius:12px}
@keyframes rc-pop{0%{transform:scale(.9)}100%{transform:scale(1)}}
@keyframes rc-shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-3px)}75%{transform:translateX(3px)}}
@media (prefers-reduced-motion:reduce){.rc-cell.is-new,.rc-cell.rc-shake,.rc-cell.kh-hint-mark{animation:none}}
/* How-to-play miniatures (synthetic boards, never an edition) */
.tt-a-rect{display:flex;flex-direction:column;align-items:center;gap:10px}
.rcm{--cols:4;--rows:3;position:relative;display:grid;grid-template-columns:repeat(var(--cols),40px);grid-template-rows:repeat(var(--rows),40px);gap:0;padding:2px;background:var(--ink);border-radius:8px}
.rcm i{display:flex;align-items:center;justify-content:center;background:var(--rc-paper);box-shadow:inset 0 0 0 1px rgba(0,0,0,.28);font-style:normal;font-weight:800;font-size:18px}
.rcm-r{position:absolute;box-sizing:border-box;left:calc(2px + var(--l) * 40px);top:calc(2px + var(--t) * 40px);width:calc(var(--w) * 40px);height:calc(var(--h) * 40px);border:3px solid var(--rc-line);background:rgba(160,190,150,.22);pointer-events:none}
.rcm-r.bad{border-style:dashed;border-color:var(--rc-bad);background:rgba(155,45,32,.12)}
/* the longest game name must fit a 320 px phone without widening the page */
.game-heading h1{overflow-wrap:anywhere}
@media (max-width:359px){.game-heading h1{font-size:clamp(30px,11.5vw,44px)}}

/* pencil outlines: dotted edges (a sketch), distinct from the solid edges of a placed rectangle and the dashed edges of a proposal */
.rc-cell.has-pencil{background-image:linear-gradient(rgba(255,255,255,0),rgba(255,255,255,0))}
.rc-cell.nT{box-shadow:inset 0 3px 0 -1px transparent;border-top:3px dotted var(--ink)}
.rc-cell.nB{border-bottom:3px dotted var(--ink)}
.rc-cell.nL{border-left:3px dotted var(--ink)}
.rc-cell.nR{border-right:3px dotted var(--ink)}
