/* Symmetry game (/games/symmetry/, public/games/symmetry.js). Uses the tokens in style.css and the shell classes in
   games.css. The picture's side of the grid is shaded, the side to colour is white; the mirror line is a thick dark
   line with a white edge so it shows on every colour. Colours are Okabe–Ito (colour-blind safe) and each has its own
   pattern: plain blue, orange stripes, green dots, purple checks. Larger print (.gm-big) and Big screen (.gm-huge)
   make the grid and the buttons bigger. */
.sy { display: grid; justify-items: center; gap: 10px; padding: 10px 6px 16px; text-align: center; }
.sy p { margin: 0; }
.sy-ask { font-size: var(--t-md); max-width: 34rem; }
.sy-pal { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.sy-pick { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 6px 12px; font-weight: 800; }
.sy-pick[aria-pressed="true"] { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #1d1d3b; }
.sy-sw { display: inline-block; width: 26px; height: 26px; border: 2px solid #1d1d3b; border-radius: 4px; }
.sy-rub { background: #fff; position: relative; }
.sy-rub::after { content: ''; position: absolute; inset: 3px; background: linear-gradient(45deg, transparent 45%, #1d1d3b 45% 55%, transparent 55%); }

.sy-wrap { position: relative; width: min(100%, 30rem); }
.sy-make .sy-wrap { width: min(100%, 34rem); }
.gm-big .sy-wrap { width: min(100%, 38rem); }
.sy-grid { display: grid; border: 2px solid #1d1d3b; background: #fff; touch-action: none; user-select: none; -webkit-user-select: none; }
.sy-row { display: flex; }
.sy-c { flex: 1 1 0; aspect-ratio: 1; border: 1px solid #b9bed0; background-color: #fff; cursor: pointer; min-width: 0; }
.sy-c.sy-given { background-color: #dfe6ef; cursor: default; }
.sy-c.sy-line { background: repeating-linear-gradient(-45deg, #eef0f4 0 4px, #dfe3ea 4px 8px); cursor: default; }
.sy-c:focus { outline: none; }
.sy-c:focus-visible { outline: 4px solid #1d1d3b; outline-offset: -4px; box-shadow: inset 0 0 0 6px #fff; position: relative; z-index: 1; }
.sy-k0 { background: #0072b2 !important; }
.sy-k1 { background: repeating-linear-gradient(45deg, #e69f00 0 5px, #9a6a00 5px 8px) !important; }
.sy-k2 { background: radial-gradient(circle, #00513c 0 26%, transparent 29%) 0 0 / 9px 9px, #009e73 !important; }
.sy-k3 { background: conic-gradient(#cc79a7 25%, #7d3d67 0 50%, #cc79a7 0 75%, #7d3d67 0) 0 0 / 12px 12px !important; }
.sy-c.sy-x { outline: 4px dashed #1d1d3b; outline-offset: -5px; box-shadow: inset 0 0 0 7px #fff; }
.sy-lines { position: absolute; inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); pointer-events: none; overflow: visible; }
.sy-halo { stroke: #fff; stroke-width: 9px; stroke-linecap: square; }
.sy-mirror { stroke: #1d1d3b; stroke-width: 5px; stroke-linecap: square; }
.sy-solved .sy-grid { border-color: #00704f; box-shadow: 0 0 0 4px #b8ecd9; }
.sy-shown .sy-c { border-color: transparent; }
.sy-shown .sy-lines { display: none; }
.sy-go { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.sy-go .primary { min-height: 52px; min-width: 9rem; font-size: var(--t-lg); }
.sy-go .alt { min-height: 52px; }
.sy-fb { min-height: 1.6em; max-width: 34rem; font-size: var(--t-md); font-weight: 600; }
.sy-fb button { margin: 6px 0 0 6px; min-height: 44px; }
.sy-end { padding: 28px 12px; }
.sy-score { font-size: var(--t-lg); font-weight: 800; }
.sy-prog { margin: 6px 0 0; font-size: var(--t-sm); color: var(--muted); text-align: center; }
.sy-drawing .sy-count { display: none; }
.gm-huge .sy-grid { border-width: 4px; border-color: #000; }
.gm-huge .sy-c { border-color: #555; }
.gm-huge .sy-c.sy-given { background-color: #c9d2de; }
.gm-huge .sy-pick { font-size: 1.4rem; min-height: 64px; }
.gm-huge .sy-sw { width: 34px; height: 34px; }
.gm-huge .sy-mirror { stroke: #000; stroke-width: 7px; }
.gm-huge .sy-halo { stroke-width: 12px; }
@media print {
  .sy-c, .sy-k0, .sy-k1, .sy-k2, .sy-k3 { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sy-printing body * { visibility: hidden; }
  .sy-printing .sy-wrap, .sy-printing .sy-wrap * { visibility: visible; }
  .sy-printing .sy-wrap { position: absolute; left: 0; top: 0; width: 100%; }
}
/* Only the settings for the way you are playing are shown (Level for "Mirror it", Mirror and Grid for drawing), and
   long option names never push the page sideways on a phone. */
.gm[data-game="symmetry"] .gm-sel { max-width: 100%; }
.gm[data-game="symmetry"] .gm-sel select { min-width: 0; }
.gm[data-game="symmetry"] .gm-sel:has(select:disabled) { display: none; }
