:root {
  font-family: Inter, Arial, sans-serif;
  color: #111827;
  background: #f5f6f8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

button,
textarea,
select,
input {
  font: inherit;
}

.container {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0 28px;
}

.header {
  margin-bottom: 36px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  color: #6b7280;
}

h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 58px);
  line-height: 1;
  letter-spacing: -.045em;
}

.subtitle {
  max-width: 620px;
  margin: 16px 0 0;
  color: #6b7280;
  font-size: 17px;
  line-height: 1.6;
}

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

.panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 24px;
}

label {
  display: block;
  margin-bottom: 9px;
  font-size: 14px;
  font-weight: 650;
}

textarea,
select {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #fff;
  color: #111827;
  outline: none;
}

textarea {
  min-height: 150px;
  resize: vertical;
  padding: 14px;
  line-height: 1.5;
}

textarea:focus,
select:focus,
input:focus-visible,
button:focus-visible {
  border-color: #111827;
  outline: 3px solid rgba(17, 24, 39, .12);
}

.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 22px;
}

.field.full {
  grid-column: 1 / -1;
}

select {
  height: 46px;
  padding: 0 12px;
}

.color-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

input[type="color"] {
  width: 46px;
  height: 46px;
  padding: 3px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
}

.color-row span {
  font-size: 13px;
  color: #6b7280;
  font-family: monospace;
}

.primary,
.secondary {
  width: 100%;
  min-height: 46px;
  margin-top: 22px;
  border-radius: 12px;
  cursor: pointer;
  transition: opacity .15s ease, transform .15s ease;
}

.primary {
  border: 0;
  background: #111827;
  color: #fff;
}

.secondary {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
}

button:hover:not(:disabled) {
  opacity: .86;
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

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

.preview-panel {
  display: flex;
  flex-direction: column;
}

.preview-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 650;
}

#status {
  color: #6b7280;
  font-weight: 500;
}

.preview {
  min-height: 350px;
  flex: 1;
  display: grid;
  place-items: center;
  padding: 24px;
  border-radius: 14px;
  background: #f8f9fb;
  border: 1px dashed #d1d5db;
}

.preview canvas,
.preview img {
  display: block;
  max-width: 100%;
  height: auto;
}

.empty {
  max-width: 260px;
  text-align: center;
  color: #6b7280;
}

.empty span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: #e5e7eb;
  color: #111827;
  font-weight: 800;
}

.empty p {
  margin: 0;
  line-height: 1.5;
  font-size: 14px;
}

footer {
  padding-top: 28px;
  color: #9ca3af;
  text-align: center;
  font-size: 13px;
}

@media (max-width: 760px) {
  .container {
    padding-top: 40px;
  }

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

  .preview {
    min-height: 280px;
  }
}

@media (max-width: 480px) {
  .fields {
    grid-template-columns: 1fr;
  }

  .field.full {
    grid-column: auto;
  }

  .panel {
    padding: 18px;
  }
}