.mto-tools{
  width:100%;
}

.mto-tool + .mto-tool{
  margin-top:14px;
}

/* Document assistant: only the compact launcher is styled before the tool is opened. */
.mda-wrap{
  width:100%;
  max-width:990px;
  margin:0 auto;
  color:#000000;
  font-size:16px;
  line-height:1.4;
}

.mda-wrap [hidden]{
  display:none !important;
}

.mda-wrap *{
  box-sizing:border-box;
}

.mda-wrap button{
  font:inherit;
}

.mda-compact-box{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:10px;
  background:linear-gradient(180deg,#ffffff 0%,#f8f8f8 100%);
  border:1px solid #e1e1e1;
  border-radius:8px;
}

.mda-compact-text strong{
  display:block;
  font-size:16px;
  font-weight:500;
  color:#000000;
  text-align:left;
  line-height:1.4;
}

.mda-compact-text p{
  margin:0;
  color:#555555;
  font-size:14px;
  text-align:left;
  line-height:1.4;
}

.mda-open-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:5px 14px;
  border:1px solid #e1e1e1;
  border-radius:6px;
  background:#ffffff;
  color:#00467b;
  font-size:16px!important;
  font-weight:500!important;
  line-height:1.4;
  text-decoration:none;
  cursor:pointer;
  transition:color .15s ease,border-color .15s ease,background-color .15s ease;
}

.mda-open-btn:hover,
.mda-open-btn:focus,
.mda-open-btn:active{
  color:#000000;
  border-color:#d7d7d7;
  background:#f5f5f5;
}

/* Language game launcher: kept identical to the original 1.0.42 loader styles. */
.mlg-wrap{
  width:100%;
  max-width:990px;
  margin:0 auto;
  color:#000000;
  font-size:16px;
  line-height:1.4;
}

.mlg-wrap *{
  box-sizing:border-box;
}

.mlg-wrap [hidden]{
  display:none !important;
}

.mlg-wrap button,
.mlg-wrap select{
  font:inherit;
}

.mlg-compact-box{
  background: linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%);
  border:1px solid #e1e1e1;
  border-radius:8px;
}

.mlg-panel{
  background:#ffffff;
  border:1px solid #e1e1e1;
  border-radius:8px;
}

.mlg-compact-box{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:10px;
}

.mlg-compact-text strong{
  display:block;
  color:#000000;
  font-size:16px;
  font-weight:500;
  text-align:left;
  line-height:1.4;
}

.mlg-compact-text span{
  display:block;
  color:#555555;
  font-size:14px;
  line-height:1.4;
  text-align:left;
}

.mlg-start-controls{
  display:flex;
  align-items:flex-end;
  gap:8px;
  flex:0 0 auto;
}

.mlg-level-select{
  max-width:210px;
  height:40px;
  padding:5px 10px;
  background:#ffffff;
  border:1px solid #e1e1e1;
  border-radius:6px;
  color:#000000;
  font-size:16px;
  line-height:1.4;
  outline:none;
}

.mlg-category-select{
  max-width:265px;
  height:40px;
  padding:5px 10px;
  background:#ffffff;
  border:1px solid #e1e1e1;
  border-radius:6px;
  color:#000000;
  font-size:16px;
  line-height:1.4;
  outline:none;
}

.mlg-lang-select{
  max-width:165px;
  height:40px;
  padding:5px 10px;
  background:#ffffff;
  border:1px solid #e1e1e1;
  border-radius:6px;
  color:#000000;
  font-size:16px;
  line-height:1.4;
  outline:none;
}

.mlg-lang-select:focus{
  border-color:#d6d6d6;
  box-shadow:0 0 0 2px rgba(0,70,123,.08);
}

.mlg-open-btn,
.mlg-loader-message button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:5px 14px;
  background:#ffffff;
  border:1px solid #e1e1e1;
  border-radius:6px;
  color:#00467b;
  font-size:16px!important;
  line-height:1.4;
  font-weight:500!important;
  cursor:pointer;
  text-decoration:none;
  outline:none;
}

.mlg-open-btn:hover,
.mlg-open-btn:focus,
.mlg-open-btn:active,
.mlg-loader-message button:hover,
.mlg-loader-message button:focus,
.mlg-loader-message button:active{
  color:#000000;
  background:#f5f5f5;
  border-color:#d6d6d6;
  outline:none;
}

.mlg-panel{
  padding:14px;
}

.mlg-loader-message{
  color:#555555;
  font-size:16px;
  line-height:1.4;
}

.mlg-loader-message.is-error{
  color:#b42318;
}

.mlg-mistakes-open-btn{
  display:inline-block;
  margin:4px 0 0 0;
  padding:0;
  background:transparent;
  border:0;
  color:#00467b;
  font-size:14px!important;
  line-height:1.4;
  font-weight:500!important;
  text-align:left;
  text-decoration:underline;
  text-underline-offset:2px;
  cursor:pointer;
}

.mlg-mistakes-open-btn:hover,
.mlg-mistakes-open-btn:focus,
.mlg-mistakes-open-btn:active{
  color:#000000;
  background:transparent;
  outline:none;
}

@media (max-width:780px){
  .mda-wrap,
  .mlg-wrap{
    width:calc(100vw - 10px);
    max-width:calc(100vw - 10px);
    margin-left:50%;
    transform:translateX(-50%);
  }

  .mda-compact-box,
  .mlg-compact-box{
    flex-direction:column;
    align-items:stretch;
    gap:8px;
    padding:10px;
  }

  .mda-open-btn{
    width:auto;
    max-width:100%;
  }

  .mlg-start-controls{
    flex-direction:column;
    align-items:stretch;
    width:100%;
  }

  .mlg-lang-select,
  .mlg-level-select,
  .mlg-category-select,
  .mlg-open-btn{
    width:100%;
    max-width:none;
    box-sizing:border-box;
  }
}
