
.eft31-wrap{
  width:100%;
  padding:20px 0;
  font-family:Arial,sans-serif;
}

.eft31-card{
  max-width:780px;
  margin:auto;
  padding:22px;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:18px;
  box-shadow:0 10px 30px rgba(0,0,0,.07);
  box-sizing:border-box;
}

.eft31-sub{
  color:#64748b;
}

.eft31-templates{
  display:flex;
  gap:10px;
  overflow-x:auto;
  padding:10px 0 15px;
}

.eft31-template-item{
  min-width:105px;
  border:2px solid #ddd;
  border-radius:10px;
  background:#fff;
  padding:5px;
  cursor:pointer;
}

.eft31-template-item.active{
  border-color:#16a34a;
}

.eft31-template-item img{
  width:92px;
  height:92px;
  object-fit:contain;
  display:block;
  background:#eee;
  border-radius:6px;
}

.eft31-template-item span{
  display:block;
  font-size:12px;
  font-weight:bold;
  margin-top:5px;
}

.eft31-mobile-upload{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin:14px 0;
}

.eft31-upload,
.eft31-btn,
.eft31-layer{
  min-height:48px;
  border:0;
  border-radius:10px;
  padding:0 15px;
  font-weight:bold;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
}

.eft31-upload input{
  display:none;
}

.eft31-gallery{
  background:#0f172a;
  color:#fff;
}

.eft31-camera{
  background:#2563eb;
  color:#fff;
}

.eft31-toolbar,.eft31-actions,.eft31-layer-tabs{
  display:flex;
  gap:9px;
  flex-wrap:wrap;
  margin:12px 0;
}

.eft31-btn{
  background:#e2e8f0;
}

.eft31-btn:disabled{
  opacity:.45;
  cursor:not-allowed;
}

.eft31-layer{
  background:#f1f5f9;
  border:2px solid transparent;
}

.eft31-layer.active{
  border-color:#2563eb;
  background:#dbeafe;
}

.eft31-primary{
  background:#16a34a;
  color:#fff;
}

.eft31-wa{
  background:#25d366;
  color:#fff;
}

.eft31-stage{
  position:relative;
  max-width:660px;
  margin:auto;
  overflow:hidden;
  border-radius:14px;
  background:#eee;
}

.eft31-stage canvas{
  width:100%;
  height:auto;
  display:block;
  touch-action:none;
}

#eft31-empty{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  color:#475569;
  padding:20px;
  pointer-events:none;
  box-sizing:border-box;
}

#eft31-empty[hidden]{
  display:none;
}

.eft31-panel{
  border-top:1px solid #e5e7eb;
  padding:14px 0;
}

.eft31-panel.active-panel{
  background:#f8fafc;
  padding:14px;
  border-radius:10px;
}

.eft31-panel h3{
  margin:0 0 10px;
}

.eft31-panel label{
  display:grid;
  grid-template-columns:160px 1fr;
  gap:10px;
  align-items:center;
  margin:9px 0;
  font-weight:bold;
}

.eft31-panel input[type=range]{
  width:100%;
}

.eft31-hint{
  font-size:13px;
  color:#475569;
  background:#f8fafc;
  border-radius:10px;
  padding:12px;
}

@media(max-width:600px){
  .eft31-card{
    padding:13px;
  }

  .eft31-mobile-upload{
    grid-template-columns:1fr;
  }

  .eft31-upload{
    width:100%;
    min-height:54px;
    font-size:16px;
  }

  .eft31-panel label{
    grid-template-columns:1fr;
  }

  .eft31-layer{
    flex:1;
  }

  .eft31-actions .eft31-btn{
    width:100%;
    min-height:52px;
  }
}
