:root {
  --bg: #f4f7f2;
  --card: #ffffff;
  --text: #0e1a12;
  --muted: #4c5b52;
  --accent: #156f52;
  --accent-soft: #d9efe5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top right, #dcecdf, var(--bg) 40%);
  color: var(--text);
  font-family: "Segoe UI", Tahoma, sans-serif;
}

.container {
  width: min(960px, 92vw);
  margin: 40px auto;
}

.card {
  background: var(--card);
  border: 1px solid #dbe7de;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 12px 30px rgba(20, 70, 50, 0.08);
}

h1 {
  margin-top: 0;
  margin-bottom: 10px;
  font-style: italic;
}

.sub {
  margin-top: 0;
  color: var(--muted);
}

form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  align-items: flex-end;
}

.upload-field {
  flex: 1;
  min-width: 220px;
}

.upload-note {
  display: inline-block;
  margin: 0 0 6px 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.run-today {
  display: block;
  margin: 0 0 8px 2px;
}

input[type="file"] {
  width: 100%;
  padding: 11px;
  border: 1px solid #c8d8cc;
  border-radius: 10px;
  background: #f9fcfa;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 12px 20px;
  background: var(--accent);
  color: white;
  font-size: 15px;
  cursor: pointer;
}

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

.waiting {
  display: none;
  margin-top: 18px;
  padding: 14px;
  border-radius: 12px;
  background: var(--accent-soft);
  align-items: center;
  gap: 10px;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid #89bca8;
  border-top-color: #0e6f4d;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error {
  display: none;
  margin-top: 16px;
  color: #9d2020;
}

.results {
  display: none;
  margin-top: 24px;
  gap: 16px;
}

.col {
  flex: 1;
}

.label {
  margin-bottom: 8px;
  font-weight: 600;
}

.img-wrap {
  border: 1px solid #d3e2d7;
  border-radius: 12px;
  overflow: hidden;
  background: #ecf4ef;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

@media (min-width: 760px) {
  .results {
    display: none;
    flex-direction: row;
  }
}

@media (max-width: 759px) {
  .results {
    display: none;
    flex-direction: column;
  }
}

.download-wrap {
  display: none;
  margin-top: 14px;
  justify-content: center;
}

.download-link {
  display: inline-block;
  border: 0;
  border-radius: 10px;
  padding: 12px 20px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.download-link:hover {
  opacity: 0.9;
}
