/* Mastermind: a wooden board of rows, the code under a lid, big colour keys. */
.mm { max-width: 520px; margin: 0 auto; }
.mm-code { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 12px 12px 0 0; background: #5a3b22; color: #f4e9d8; }
.mm-code__label { font-weight: 700; font-size: 16px; }
.mm-holes { display: grid; grid-template-columns: repeat(var(--holes), 36px); gap: 8px; }
.mm-peg { display: block; width: 36px; height: 36px; border-radius: 50%; background: var(--peg); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .22), 0 1px 2px rgba(0, 0, 0, .35); }
.mm-peg[style*="#fbfbf7"] { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12), 0 0 0 1px #b8b2a6; }
.mm-peg--empty { background: #6b4a2e; box-shadow: inset 0 3px 5px rgba(0, 0, 0, .45); width: 20px; height: 20px; margin: 8px; }
.mm-peg--hidden { display: grid; place-items: center; background: #3e2716; color: #c9b08c; font-weight: 800; box-shadow: none; border-radius: 8px; }
.mm-rows { list-style: none; margin: 0; padding: 6px 14px 10px; background: #8a5c34; display: flex; flex-direction: column-reverse; gap: 4px; }
.mm-row { display: grid; grid-template-columns: 26px auto 1fr; align-items: center; gap: 12px; min-height: 48px; padding: 2px 6px; border-radius: 10px; }
.mm-no { font-size: 14px; font-weight: 700; color: #f1dfc2; text-align: right; }
.mm-row--later { opacity: .55; }
.mm-row--now { background: #b27c49; box-shadow: 0 0 0 3px #f2c318; }
.mm-hole { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; }
.mm-hole .mm-peg--empty { background: #5a3b22; }
.mm-hole:focus-visible, .mm-colour:focus-visible { outline: 3px solid #f2c318; outline-offset: 2px; }
.mm-check { width: 100%; max-width: 320px; }
.mm-keys { justify-self: start; display: grid; grid-template-columns: repeat(3, 14px); gap: 4px; }
.mm-key { width: 14px; height: 14px; border-radius: 50%; }
.mm-key--black { background: #111; }
.mm-key--white { background: #fff; box-shadow: 0 0 0 1px #9a8f80; }
.mm-key--none { background: #6b4a2e; box-shadow: inset 0 2px 3px rgba(0, 0, 0, .4); width: 8px; height: 8px; margin: 3px; }
.mm-palette { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14px; border-radius: 0 0 12px 12px; background: #eef4f0; }
.mm-colours { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.mm-colour { padding: 4px; border: 2px solid transparent; border-radius: 50%; background: #fff; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mm-colour .mm-peg { width: 44px; height: 44px; }
.mm-colour:active { border-color: #2f5d45; }
@media (max-width: 420px) {
  .mm-rows { padding: 6px 8px 10px; }
  .mm-row { grid-template-columns: 20px auto 1fr; gap: 8px; }
  .mm-holes { grid-template-columns: repeat(var(--holes), 30px); gap: 6px; }
  .mm-peg { width: 30px; height: 30px; }
  .mm-peg--empty { width: 16px; height: 16px; margin: 7px; }
  .mm-keys { grid-template-columns: repeat(3, 11px); gap: 3px; }
  .mm-key { width: 11px; height: 11px; }
  .mm-colour .mm-peg { width: 40px; height: 40px; }
}

/* A checked row the row being filled does not agree with, after "Controleer". */
.mm-row.is-clash { background: #fde8e6; box-shadow: 0 0 0 3px #d92d20; }
.mm-row.is-clash .mm-no { color: #7a271a; }

/* Larger text: bigger pegs and colour keys. */
.sp--large .mm { max-width: 580px; }
.sp--large .mm-holes { grid-template-columns: repeat(var(--holes), 42px); }
.sp--large .mm-peg { width: 42px; height: 42px; }
.sp--large .mm-peg--empty { width: 22px; height: 22px; margin: 10px; }
.sp--large .mm-colour .mm-peg { width: 52px; height: 52px; }
.sp--large .mm-no, .sp--large .mm-code__label { font-size: 18px; }
.sp--large .mm-key { width: 17px; height: 17px; }
.sp--large .mm-keys { grid-template-columns: repeat(3, 17px); }
@media (max-width: 420px) {
  .sp--large .mm-holes { grid-template-columns: repeat(var(--holes), 36px); gap: 5px; }
  .sp--large .mm-peg { width: 36px; height: 36px; }
  .sp--large .mm-peg--empty { width: 18px; height: 18px; margin: 9px; }
  .sp--large .mm-colour .mm-peg { width: 46px; height: 46px; }
  .sp--large .mm-keys { grid-template-columns: repeat(3, 13px); gap: 3px; }
  .sp--large .mm-key { width: 13px; height: 13px; }
}

/* Colours with a sign (the setting "Kleuren met een teken"): every colour also gets its own symbol. */
.sp--symbols .mm-peg:not(.mm-peg--empty):not(.mm-peg--hidden) { display: grid; place-items: center; font: 700 18px/1 system-ui, sans-serif; }
.sp--symbols .mm-peg--red::after { content: '▲'; color: #fff; }
.sp--symbols .mm-peg--blue::after { content: '■'; color: #fff; }
.sp--symbols .mm-peg--green::after { content: '●'; color: #fff; }
.sp--symbols .mm-peg--yellow::after { content: '★'; color: #000; }
.sp--symbols .mm-peg--black::after { content: '✚'; color: #fff; }
.sp--symbols .mm-peg--white::after { content: '○'; color: #000; }
.sp--symbols .mm-peg--orange::after { content: '◆'; color: #000; }
.sp--symbols .mm-peg--brown::after { content: '✖'; color: #fff; }
.sp--contrast .mm-key--white { box-shadow: 0 0 0 2px #000; }
.sp--contrast .mm-no { color: #fff; }
.sp--contrast .mm-row--now { box-shadow: 0 0 0 4px #fde047; }
