* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f5f7fb;
  color: #1f2937;
}

.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}

.panel {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  margin-bottom: 20px;
}

.subtitle,
.status {
  color: #4b5563;
}

form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0;
}

button {
  border: 0;
  border-radius: 10px;
  background: #2563eb;
  color: #ffffff;
  padding: 10px 18px;
  cursor: pointer;
}

button:disabled {
  background: #93c5fd;
  cursor: wait;
}

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

.image-stage {
  position: relative;
  min-height: 360px;
  border: 1px solid #dbe2ea;
  border-radius: 12px;
  overflow: hidden;
  background: #eef2f7;
}

#preview-image {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
}

.overlay {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.summary-item {
  margin-bottom: 12px;
}

.table-like {
  display: grid;
  gap: 10px;
}

.table-row {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  background: #f9fafb;
}

.json-output {
  overflow: auto;
  background: #0f172a;
  color: #e2e8f0;
  padding: 16px;
  border-radius: 12px;
  min-height: 240px;
}

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