.dxmt-front-wrap{
  --dxmt-ink:#18211d;
  --dxmt-muted:#65726b;
  --dxmt-line:#d9d2c6;
  --dxmt-panel:#fffdf8;
  --dxmt-field:#fffaf2;
  --dxmt-soft:#f5eee4;
  --dxmt-accent:#936735;
  --dxmt-accent-dark:#68461f;
  --dxmt-focus:rgba(147,103,53,.28);
  --dxmt-danger:#b42318;
  max-width:760px;
  margin:36px auto;
  color:var(--dxmt-ink);
}
.dxmt-front-layout{
  display:grid;
  grid-template-columns:1fr;
  gap:18px;
}
.dxmt-front-form,
.dxmt-front-preview-panel{
  border:1px solid var(--dxmt-line);
  border-radius:24px;
  background:
    linear-gradient(180deg,rgba(255,255,255,.92),rgba(255,253,248,.98)),
    var(--dxmt-panel);
  box-shadow:0 18px 50px rgba(44,31,14,.09);
}
.dxmt-front-form{
  padding:28px;
}
.dxmt-template-fields[hidden]{
  display:none !important;
}
.dxmt-row{
  margin-bottom:18px;
}
.dxmt-row label{
  display:block;
  margin-bottom:8px;
  font-size:14px;
  font-weight:750;
  letter-spacing:.01em;
}
.dxmt-row input,
.dxmt-row select{
  width:100%;
  min-height:50px;
  padding:0 14px;
  border:1px solid #d2c9ba;
  border-radius:14px;
  background:var(--dxmt-field);
  color:var(--dxmt-ink);
  box-sizing:border-box;
  font-size:16px;
  line-height:1.35;
  transition:border-color .18s ease,box-shadow .18s ease,background-color .18s ease;
}
.dxmt-row select{
  appearance:none;
  padding-right:44px;
  background-image:
    linear-gradient(45deg,transparent 50%,var(--dxmt-accent-dark) 50%),
    linear-gradient(135deg,var(--dxmt-accent-dark) 50%,transparent 50%);
  background-position:
    calc(100% - 22px) 22px,
    calc(100% - 16px) 22px;
  background-size:6px 6px,6px 6px;
  background-repeat:no-repeat;
}
.dxmt-row input:hover,
.dxmt-row select:hover{
  border-color:#b99b74;
  background:#fffdf8;
}
.dxmt-row input:focus,
.dxmt-row select:focus{
  border-color:var(--dxmt-accent);
  box-shadow:0 0 0 4px var(--dxmt-focus);
  background:#fff;
  outline:0;
}
.dxmt-row select:disabled,
.dxmt-row input:disabled{
  opacity:.68;
  cursor:not-allowed;
}
.dxmt-field-hint{
  margin:8px 0 0;
  color:var(--dxmt-muted);
  font-size:13px;
  line-height:1.45;
}
.dxmt-template-select-row{
  padding-top:18px;
  margin-top:2px;
  border-top:1px solid rgba(217,210,198,.75);
}
.dxmt-front-form button{
  width:100%;
  min-height:52px;
  border:0;
  border-radius:999px;
  background:linear-gradient(135deg,var(--dxmt-ink),#0a0f0c);
  color:#fff;
  font-weight:850;
  letter-spacing:.045em;
  text-transform:uppercase;
  cursor:pointer;
  box-shadow:0 14px 28px rgba(24,33,29,.2);
  transition:opacity .18s ease,transform .18s ease,box-shadow .18s ease;
}
.dxmt-front-form button:hover{
  transform:translateY(-1px);
  box-shadow:0 18px 34px rgba(24,33,29,.24);
}
.dxmt-front-form button:focus-visible,
.dxmt-front-view-full:focus-visible,
.dxmt-front-download:focus-visible{
  outline:3px solid var(--dxmt-focus);
  outline-offset:3px;
}
.dxmt-front-form button:disabled{
  opacity:.7;
  cursor:wait;
  transform:none;
}
.dxmt-front-msg{
  min-height:0;
  margin-top:12px;
  color:var(--dxmt-danger);
  line-height:1.5;
}
.dxmt-front-msg:empty{
  display:none;
}
.dxmt-front-preview-panel{
  padding:22px;
}
.dxmt-front-result-placeholder{
  min-height:420px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  color:var(--dxmt-muted);
  border:1px dashed #d6c8b5;
  border-radius:20px;
  background:
    radial-gradient(circle at top left,rgba(147,103,53,.13),transparent 34%),
    linear-gradient(135deg,#fffaf1,var(--dxmt-soft));
  padding:26px;
}
.dxmt-front-result{
  margin-top:0;
}
.dxmt-front-result[hidden],
.dxmt-front-result-placeholder[hidden]{
  display:none !important;
}
.dxmt-front-result-image{
  display:block;
  width:100%;
  height:auto;
  border:1px solid var(--dxmt-line);
  border-radius:20px;
  background:#fff;
}
.dxmt-front-result-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:14px;
}
.dxmt-front-view-full,
.dxmt-front-download{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:0 17px;
  border-radius:999px;
  background:var(--dxmt-soft);
  color:var(--dxmt-accent-dark);
  font-weight:750;
  text-decoration:none;
}
.dxmt-front-view-full:hover,
.dxmt-front-download:hover{
  color:var(--dxmt-ink);
  background:#eadcca;
}
@media (max-width:780px){
  .dxmt-front-wrap{
    max-width:none;
    margin:22px auto;
  }
  .dxmt-front-form,
  .dxmt-front-preview-panel{
    border-radius:20px;
  }
  .dxmt-front-form{
    padding:22px;
  }
  .dxmt-front-result-placeholder{
    min-height:300px;
  }
}
@media (max-width:520px){
  .dxmt-front-form,
  .dxmt-front-preview-panel{
    padding:18px;
  }
  .dxmt-row input,
  .dxmt-row select,
  .dxmt-front-form button{
    min-height:48px;
  }
}
