:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1f2937;
  background: #f3f4f6;
}

body {
  margin: 0;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px;
}

.narrow {
  max-width: 560px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.card {
  background: white;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
  margin: 18px 0;
}

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

label {
  display: block;
  font-weight: 650;
  margin: 12px 0;
}

input,
textarea,
select {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  margin-top: 6px;
  font: inherit;
}

textarea {
  min-height: 70px;
}

button,
.bigbutton {
  display: inline-block;
  background: #111827;
  color: white;
  border: 0;
  border-radius: 14px;
  padding: 14px 18px;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

button[disabled] {
  opacity: .5;
  cursor: wait;
}

.secondary {
  background: #2563eb;
}

.hidden {
  display: none;
}

.summary {
  color: #4b5563;
  margin: 10px 0;
}

.preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.preview img,
.preview video {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  background: #e5e7eb;
}

.error {
  color: #b91c1c;
  font-weight: 700;
}

.success {
  color: #047857;
  font-weight: 700;
}

.center {
  text-align: center;
}

.qr {
  width: 220px;
  max-width: 80%;
  padding: 10px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
}

.small {
  font-size: .9rem;
  word-break: break-word;
  color: #4b5563;
}

#progressBox {
  margin: 18px 0;
  padding: 16px;
  border-radius: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

#progressBox h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

progress {
  width: 100%;
  height: 18px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  appearance: none;
}

progress::-webkit-progress-bar {
  background: #e5e7eb;
  border-radius: 999px;
}

progress::-webkit-progress-value {
  background: linear-gradient(90deg, #2563eb, #047857);
  border-radius: 999px;
}

progress::-moz-progress-bar {
  background: linear-gradient(90deg, #2563eb, #047857);
  border-radius: 999px;
}

#progressText {
  margin: 10px 0 4px;
  font-weight: 700;
  color: #111827;
}

#progressDetails {
  margin: 0;
  color: #4b5563;
}

#result ul {
  padding-left: 0;
  list-style: none;
}

#result li {
  margin: 6px 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f9fafb;
}

#result li.success {
  background: #ecfdf5;
}

#result li.error {
  background: #fef2f2;
}

#result li.small {
  background: #f3f4f6;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: top;
}

@media (max-width: 720px) {
  .container {
    padding: 14px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: block;
  }

  .card {
    padding: 16px;
    border-radius: 16px;
  }

  button,
  .bigbutton {
    width: 100%;
    text-align: center;
  }

  table {
    font-size: .85rem;
  }

  th:nth-child(4),
  td:nth-child(4),
  th:nth-child(7),
  td:nth-child(7) {
    display: none;
  }
}