* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #eef1f5;
  color: #1e2430;
  font-family: Arial, Helvetica, sans-serif;
}

.app {
  display: grid;
  grid-template-columns: minmax(320px, 440px) minmax(360px, 1fr);
  gap: 24px;
  min-height: 100vh;
  padding: 24px;
}

.controls,
.preview {
  background: #fff;
  border: 1px solid #d9dee8;
  border-radius: 8px;
  padding: 20px;
}

h1 {
  margin: 0 0 8px;
  font-size: 24px;
}

p {
  margin: 0 0 20px;
  color: #687386;
  line-height: 1.5;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: #3d4656;
}

.wide {
  grid-column: 1 / -1;
}

input,
select {
  width: 100%;
  height: 40px;
  border: 1px solid #c9d0dc;
  border-radius: 6px;
  padding: 0 11px;
  font: inherit;
  font-weight: 400;
  color: #1f2632;
  background: #fff;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

button {
  height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  background: #1069e8;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button:first-child {
  background: #334155;
}

.preview {
  display: grid;
  place-items: start center;
  overflow: auto;
}

canvas {
  width: min(100%, 360px);
  height: auto;
  border: 1px solid #d7dce6;
  background: #f7f7fb;
}

@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}
