:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f7f8fb;
  color: #16181d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input,
textarea {
  font: inherit;
}

.shell {
  display: grid;
  grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
  min-height: 100vh;
}

.capture {
  background: #ffffff;
  border-right: 1px solid #dfe3ea;
  padding: 22px;
}

.result {
  padding: 22px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

h1 {
  font-size: 24px;
  line-height: 1.1;
  margin: 0 0 6px;
}

h2 {
  font-size: 22px;
  line-height: 1.15;
  margin: 0;
}

p {
  margin: 0;
  color: #667085;
}

.dropzone {
  display: grid;
  place-items: center;
  min-height: 240px;
  border: 1px dashed #98a2b3;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  cursor: pointer;
  text-align: center;
  padding: 24px;
}

.file-input {
  position: fixed;
  left: -100vw;
  top: auto;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.drop-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #e8f1ff;
  color: #175cd3;
  font-size: 34px;
  line-height: 1;
  margin-bottom: 12px;
}

.drop-title {
  display: block;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.drop-sub {
  display: block;
  color: #667085;
  font-size: 14px;
}

.pick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: 300px;
  margin-top: 18px;
}

.picker {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #15171c;
  font-weight: 750;
  cursor: pointer;
}

.primary-picker {
  background: #175cd3;
  border-color: #175cd3;
  color: white;
}

.preview-wrap {
  margin-top: 16px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #dfe3ea;
  background: #111827;
}

.preview-wrap img {
  display: block;
  width: 100%;
  max-height: 48vh;
  object-fit: contain;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

button {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #15171c;
  min-height: 42px;
  padding: 0 14px;
  cursor: pointer;
}

.ghost {
  min-height: 36px;
}

button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.primary {
  background: #175cd3;
  border-color: #175cd3;
  color: white;
}

.result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  max-width: 920px;
}

.eyebrow {
  color: #667085;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.total-pill {
  min-width: 108px;
  border: 1px solid #b7c8e9;
  border-radius: 8px;
  background: #eef5ff;
  color: #174ea6;
  font-weight: 800;
  padding: 10px 12px;
  text-align: right;
}

.tabs {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid #dfe3ea;
  border-radius: 8px;
  background: #ffffff;
  margin-bottom: 18px;
}

.tab {
  min-height: 34px;
  border: 0;
  background: transparent;
}

.tab.active {
  background: #e8f1ff;
  color: #174ea6;
}

.warning {
  max-width: 920px;
  border: 1px solid #f6c56f;
  border-radius: 8px;
  background: #fff7e6;
  color: #8a4b00;
  font-weight: 700;
  margin-bottom: 16px;
  padding: 12px 14px;
}

.panel {
  display: none;
  max-width: 920px;
}

.panel.active {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: #475467;
  font-size: 13px;
  font-weight: 650;
}

input,
textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #15171c;
  min-height: 42px;
  padding: 10px 12px;
}

.short-textarea {
  min-height: 88px;
}

textarea {
  min-height: 55vh;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 14px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px 42px;
  gap: 10px;
  margin-bottom: 10px;
}

#pushStatus {
  margin-top: 18px;
  white-space: pre-wrap;
  color: #475467;
  max-width: 920px;
}

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

  .capture {
    border-right: 0;
    border-bottom: 1px solid #dfe3ea;
  }

  .result-head {
    align-items: stretch;
  }

  .grid-2,
  .grid-3,
  .actions,
  .pick-actions,
  .item-row {
    grid-template-columns: 1fr;
  }
}
