:root {
  color: #17202a;
  background: #f3f5f7;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  background: #f3f5f7;
}

button, input { font: inherit; }

.shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
}

.tool {
  width: min(100%, 560px);
  padding: 30px;
  background: #ffffff;
  border: 1px solid #dfe4e8;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(23, 32, 42, 0.08);
}

.eyebrow {
  color: #a3382d;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 8px 0 10px;
  font-size: clamp(25px, 7vw, 34px);
  line-height: 1.15;
  letter-spacing: 0;
}

.lead {
  margin: 0 0 24px;
  color: #56616c;
  font-size: 16px;
  line-height: 1.5;
}

#fileInput {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.picker {
  min-height: 142px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 22px;
  border: 2px dashed #aeb8c1;
  border-radius: 8px;
  background: #fafbfc;
  cursor: pointer;
  text-align: center;
  transition: border-color 150ms ease, background 150ms ease;
}

.picker:hover,
.picker:focus-within,
.picker.is-dragging {
  border-color: #a3382d;
  background: #fff8f6;
}

.picker-title { font-size: 18px; font-weight: 700; }
.picker-hint { color: #69747e; font-size: 14px; }

.file-row {
  min-height: 66px;
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #dfe4e8;
  border-radius: 6px;
  background: #ffffff;
}

.file-copy { min-width: 0; flex: 1; display: grid; gap: 4px; }
.file-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-copy span { color: #69747e; font-size: 14px; }

.clear {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #56616c;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.clear:hover { background: #f0f2f4; color: #17202a; }

.upload {
  width: 100%;
  min-height: 50px;
  margin-top: 16px;
  border: 0;
  border-radius: 6px;
  background: #17202a;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.upload:hover:not(:disabled) { background: #293643; }
.upload:disabled { background: #c9cfd4; cursor: not-allowed; }

.progress-wrap {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 48px;
  align-items: center;
  gap: 12px;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 5px;
  background: #e5e9ec;
}

.progress-fill {
  width: 0;
  height: 100%;
  background: #2f7d4a;
  transition: width 120ms linear;
}

#progressText { color: #56616c; font-variant-numeric: tabular-nums; text-align: right; }

.status {
  min-height: 24px;
  margin: 16px 0 0;
  color: #56616c;
  line-height: 1.45;
}

.status.error { color: #a3382d; }
.status.success { color: #21683b; font-weight: 650; }

@media (max-width: 520px) {
  .shell { align-items: start; padding-left: 12px; padding-right: 12px; }
  .tool { padding: 22px 18px; }
  .picker { min-height: 132px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
