:root {
  color-scheme: dark;
  font-family: Segoe UI, system-ui, sans-serif;
  background: #151711;
  color: #f5f1e8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input {
  font: inherit;
}

.app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  min-height: 100vh;
  background: #151711;
}

.preview {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 18px;
  background: #080906;
}

.preview img {
  max-width: 100%;
  max-height: calc(100vh - 36px);
  object-fit: contain;
}

.preview p {
  color: #bfc6b4;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  border-left: 1px solid #34372c;
  background: #20231a;
}

header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

h1 {
  margin: 0;
  font-size: 28px;
}

output {
  color: #c4cbb8;
  font-size: 13px;
  text-align: right;
}

form,
fieldset,
.results {
  display: grid;
  gap: 10px;
}

.fileDrop,
fieldset,
.jsonBox {
  border: 1px solid #3c4233;
  border-radius: 6px;
}

.fileDrop {
  display: grid;
  gap: 10px;
  padding: 14px;
}

fieldset {
  margin: 0;
  padding: 14px;
}

legend {
  color: #ccd3bf;
  padding: 0 6px;
}

fieldset label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
}

button {
  min-height: 44px;
  border: 1px solid #535a45;
  border-radius: 6px;
  background: #e0f05d;
  color: #151711;
  cursor: pointer;
  font-weight: 700;
}

button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.result {
  padding: 10px 12px;
  border-left: 4px solid var(--accent);
  background: #2a2e22;
}

.insight {
  background: #24311f;
}

.result strong {
  display: block;
  overflow-wrap: anywhere;
}

.result span {
  color: #c4cbb8;
  font-size: 12px;
}

.jsonBox {
  padding: 10px 12px;
}

.jsonBox pre {
  overflow: auto;
  max-height: 260px;
  margin: 10px 0 0;
  color: #d9ded1;
}

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

  .preview {
    min-height: 55vh;
  }

  .panel {
    border-left: 0;
    border-top: 1px solid #34372c;
  }
}
