/* Mastermind — page-specific styles */

.mm-board {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-width: 26rem;
  margin: 0 auto 1rem;
}

.mm-row {
  display: grid;
  grid-template-columns: 1.5rem 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--color-bg);
}

.mm-row.is-active {
  background: #fff;
  border: 2px dashed var(--color-sky);
}

.mm-row-num {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-align: right;
}

.mm-pegs {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
}

.mm-peg {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  display: block;
  box-shadow: inset 0 -3px 6px rgba(0, 0, 0, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.mm-peg.is-empty {
  background: #ece4d8;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.12);
  border-color: transparent;
}

.mm-peg.is-big {
  width: 2.2rem;
  height: 2.2rem;
}

.mm-slot {
  padding: 0;
  border: 3px solid transparent;
  background: none;
  border-radius: 50%;
  cursor: pointer;
  line-height: 0;
}

.mm-slot.is-active {
  border-color: var(--color-coral);
}

/* Clue dots */
.mm-clues {
  display: grid;
  grid-template-columns: repeat(3, 0.6rem);
  gap: 0.2rem;
  min-width: 2.6rem;
}

.mm-clue {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: #ded5c8;
}

.mm-clue.is-exact { background: #2d3436; }
.mm-clue.is-colour { background: #ffffff; border: 2px solid #b3a894; }

/* Palette */
.mm-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.mm-colour {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.6);
  cursor: pointer;
  box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.18), var(--shadow-soft);
  transition: transform 0.12s;
}

.mm-colour:hover:not(:disabled),
.mm-colour:focus-visible:not(:disabled) {
  transform: translateY(-3px) scale(1.06);
  outline: none;
}

.mm-colour.is-selected {
  border-color: var(--color-text);
}

/* Revealed code */
.mm-secret {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: var(--color-sun);
  border-radius: var(--radius-sm);
}

.mm-secret-label {
  font-family: var(--font-display);
  font-weight: 600;
  margin-right: 0.25rem;
}

@media (max-width: 640px) {
  .mm-peg { width: 1.6rem; height: 1.6rem; }
  .mm-colour { width: 2.2rem; height: 2.2rem; }
}
