* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f4f6f8;
  color: #17202a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0;
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 24px;
}

.panel,
.resultPanel {
  background: #ffffff;
  border: 1px solid #dce3ea;
  border-radius: 8px;
  padding: 24px;
}

h1,
h2 {
  margin: 0 0 20px;
  font-size: 22px;
  line-height: 1.25;
}

h2 {
  font-size: 18px;
}

.form {
  display: grid;
  gap: 16px;
}

.uploadBox {
  min-height: 120px;
  border: 1px dashed #8ca0b3;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #fbfcfd;
  cursor: pointer;
}

.uploadBox input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.uploadBox span {
  color: #345;
  font-size: 15px;
}

.preview {
  display: none;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border: 1px solid #dce3ea;
  border-radius: 8px;
  background: #fff;
}

.preview.isVisible {
  display: block;
}

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

button {
  height: 42px;
  border: 0;
  border-radius: 6px;
  background: #1264a3;
  color: #ffffff;
  font-size: 15px;
  cursor: pointer;
}

#storeButton {
  background: #0f766e;
}

button:disabled {
  background: #8ca0b3;
  cursor: wait;
}

.status {
  min-height: 22px;
  margin-top: 16px;
  color: #506171;
  font-size: 14px;
}

pre {
  min-height: 360px;
  max-height: calc(100vh - 170px);
  margin: 0;
  overflow: auto;
  padding: 16px;
  border-radius: 8px;
  background: #111827;
  color: #d1fae5;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 780px) {
  .page {
    grid-template-columns: 1fr;
    padding: 24px 0;
  }
}
