.mm-app{
  margin:20px 0 30px 0;
  padding:20px;
  background:#f5f5f5;
  border:1px solid #dddddd;
  box-sizing:border-box;
}

.mm-controls{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  align-items:flex-end;
  margin-bottom:14px;
}

.mm-field{
  min-width:180px;
  flex:1 1 180px;
}

.mm-field label{
  display:block;
  margin:0 0 6px 0;
  font-weight:bold;
  color:#222;
}

.mm-field select{
  width:100%;
  height:40px;
  padding:6px 10px;
  border:1px solid #cfcfcf;
  background:#ffffff;
  box-sizing:border-box;
  color:#222;
}

.mm-field select:focus{
  outline:none;
  border-color:#9f9f9f;
  box-shadow:0 0 0 2px rgba(0,0,0,0.06);
}

.mm-actions{
  display:flex;
  align-items:flex-end;
}

.mm-btn{
  height:40px;
  padding:0 16px;
  border:1px solid #2f6fb5;
  background:#2f6fb5;
  color:#fff;
  cursor:pointer;
  font-weight:bold;
  white-space:nowrap;
}

.mm-btn:hover{
  background:#255d9a;
  border-color:#255d9a;
}

.mm-topbar{
  display:flex;
  flex-wrap:wrap;
  gap:12px 20px;
  justify-content:space-between;
  align-items:flex-start;
  margin-bottom:14px;
  padding:12px 14px;
  background:#ffffff;
  border:1px solid #dddddd;
}

.mm-help,
.mm-counter{
  line-height:1.55;
  color:#222;
}

.mm-visitor-note{
  margin:0 0 16px 0;
  padding:12px 14px;
  background:#fff8cc;
  border:1px solid #e6d97a;
  line-height:1.6;
  font-size:15px;
  color:#5a4b00;
}
.mm-success{
  margin:18px 0 14px 0;
  padding:16px 18px;
  background:#fff6cc;
  border:1px solid #f2d675;
  border-radius:6px;
  text-align:center;
  box-shadow:0 1px 2px rgba(0,0,0,0.05);
}

.mm-success-title{
  font-size:22px;
  font-weight:700;
  color:#8a6d00;
  margin-bottom:6px;
}

.mm-success-text{
  font-size:15px;
  color:#6b5a00;
}
.mm-main-layout{
  display:flex;
  align-items:flex-start;
  gap:20px;
}

.mm-grid-col{
  flex:1 1 auto;
  min-width:0;
}

.mm-words-col{
  flex:0 0 260px;
}

.mm-grid-wrap{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}

.mm-grid{
  display:grid;
  gap:4px;
  justify-content:flex-start;
  user-select:none;
  touch-action:none;
  min-width:max-content;
}

.mm-cell{
  width:38px;
  height:38px;
  border:1px solid #cfcfcf;
  background:#ffffff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:bold;
  font-size:18px;
  line-height:1;
  cursor:pointer;
  box-sizing:border-box;
  padding:0;
  color:#222;
}

.mm-cell.is-active{
  background:#e8e8e8;
  border-color:#9f9f9f;
}

.mm-cell.is-found{
  background:#2f6fb5;
  color:#ffffff;
  border-color:#2f6fb5;
}

.mm-words-wrap{
  padding:14px;
  background:#ffffff;
  border:1px solid #dddddd;
}

.mm-words-title{
  margin:0 0 12px 0;
  font-size:20px;
  color:#222;
  text-align:center;
}

.mm-words-list{
  margin:0;
  padding-left:18px;
}

.mm-words-list li{
  margin:0 0 8px 0;
  line-height:1.5;
  word-break:break-word;
  color:#222;
}

.mm-words-list li.is-found{
  text-decoration:line-through;
  color:#7a7a7a;
}

.mm-message{
  margin-top:18px;
  min-height:24px;
  font-weight:bold;
  color:#2f6fb5;
}

@media (max-width:980px){
  .mm-main-layout{
    gap:16px;
  }

  .mm-words-col{
    flex:0 0 220px;
  }
}

@media (max-width:760px){
  .mm-app{
    padding:14px;
  }

  .mm-controls{
    gap:10px;
  }

  .mm-field{
    min-width:100%;
    flex:1 1 100%;
  }

  .mm-actions{
    width:100%;
  }

  .mm-btn{
    width:100%;
  }

  .mm-topbar{
    display:block;
  }

  .mm-counter{
    margin-top:8px;
  }

  .mm-main-layout{
    display:block;
  }

  .mm-words-col{
    margin-top:16px;
  }

  .mm-cell{
    width:30px;
    height:30px;
    font-size:15px;
  }

  .mm-words-title{
    font-size:18px;
  }

  .mm-success{
    padding:14px 12px;
  }

  .mm-success-title{
    font-size:24px;
  }

  .mm-success-text{
    font-size:16px;
  }
}

@media (max-width:420px){
  .mm-cell{
    width:26px;
    height:26px;
    font-size:13px;
  }
}