.app {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
  color: #0f172a;
  background: radial-gradient(1200px 600px at 20% 0%, #eef2ff 0%, #ffffff 60%);
  min-height: 100vh;
}

body {
  margin: 0;
}

.header {
  padding: 24px 20px 12px;
  max-width: 1120px;
  margin: 0 auto;
}

.title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.subtitle {
  margin-top: 6px;
  font-size: 13px;
  color: #475569;
}

.grid {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 20px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.card {
  background: #ffffffcc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.06);
  backdrop-filter: blur(8px);
}

.card h2 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
}

.drop {
  position: relative;
  border: 1.5px dashed #94a3b8;
  border-radius: 12px;
  padding: 18px;
  background: #f8fafc;
  cursor: pointer;
}

.drop.dragover {
  border-color: #4f46e5;
  background: #eef2ff;
}

.file {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropBig {
  font-weight: 700;
}

.dropSmall {
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
}

.row {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
}

.btn.primary {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.status {
  margin-top: 10px;
}

.statusText {
  font-size: 12px;
  color: #334155;
}

.progress {
  margin-top: 8px;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.progressBar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4f46e5, #06b6d4);
  border-radius: 999px;
  transition: width 160ms ease;
}

.controls {
  display: grid;
  gap: 10px;
}

.control .label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #334155;
  margin-bottom: 6px;
}

.value {
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}

.control input[type="range"] {
  width: 100%;
}

.control.check {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: #334155;
}

.hint {
  margin-top: 10px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

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

.previewBox {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.previewTitle {
  padding: 8px 10px;
  font-size: 12px;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.imgPreview {
  width: 100%;
  height: 320px;
  object-fit: contain;
  display: block;
  background: repeating-conic-gradient(#f8fafc 0% 25%, #ffffff 0% 50%) 50% / 18px 18px;
}

.svgPreview {
  width: 100%;
  height: 320px;
  overflow: auto;
  background: repeating-conic-gradient(#f8fafc 0% 25%, #ffffff 0% 50%) 50% / 18px 18px;
}

.svgPreview svg {
  width: 100%;
  height: 100%;
  display: block;
}

.logDetails {
  margin-top: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #0b1020;
}

.logSummary {
  padding: 10px 12px;
  cursor: pointer;
  color: #e2e8f0;
  font-size: 12px;
  background: linear-gradient(180deg, #111a33, #0b1020);
}

.logBox {
  margin: 0;
  padding: 12px;
  max-height: 320px;
  overflow: auto;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.45;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 980px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .imgPreview,
  .svgPreview {
    height: 280px;
  }
}

