:root {
  color-scheme: light;
  --ink: #202124;
  --muted: #667085;
  --line: #d0d5dd;
  --surface: #ffffff;
  --soft: #f4f7fb;
  --accent: #0f8b8d;
  --accent-dark: #0a6c6e;
  --warn: #b54708;
  --shadow: 0 18px 50px rgba(20, 29, 43, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #eef6f8 0%, #f9fbf5 54%, #fff7f1 100%);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

.app {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto;
  align-items: start;
}

.panel,
.preview-card {
  background: var(--surface);
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: 18px;
  letter-spacing: 0;
}

.intro p:last-child {
  margin-bottom: 24px;
  color: var(--muted);
  line-height: 1.55;
}

.drop-zone {
  display: grid;
  place-items: center;
  min-height: 210px;
  padding: 24px;
  border: 2px dashed var(--line);
  border-radius: 8px;
  background: var(--soft);
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.drop-zone:hover,
.drop-zone.is-over {
  border-color: var(--accent);
  background: #ecfaf9;
  transform: translateY(-1px);
}

.drop-zone input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.drop-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 34px;
  line-height: 1;
}

.drop-zone strong {
  display: block;
  font-size: 20px;
}

.drop-zone small {
  color: var(--muted);
}

.settings {
  display: grid;
  gap: 10px;
  margin: 22px 0;
}

.settings label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 44px;
  color: #344054;
  font-size: 14px;
}

.settings input {
  width: 82px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  text-align: right;
}

.download-btn {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.download-btn:hover:not(:disabled) {
  background: var(--accent-dark);
}

.download-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.status {
  min-height: 42px;
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.status.warn {
  color: var(--warn);
}

.preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.preview-card {
  padding: 18px;
}

.preview-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    linear-gradient(45deg, #e5e7eb 25%, transparent 25%),
    linear-gradient(-45deg, #e5e7eb 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e5e7eb 75%),
    linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

dl {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
}

dl div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #edf0f3;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

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

  .app {
    margin: 16px auto;
  }
}
