:root {
  color-scheme: light;
  --bg: #f4f2ed;
  --ink: #171717;
  --muted: #68635c;
  --line: #d8d2c7;
  --panel: #fffdf8;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --accent-soft: #d9f1ec;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.13), transparent 42%),
    linear-gradient(225deg, rgba(99, 102, 241, 0.12), transparent 40%),
    var(--bg);
  color: var(--ink);
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.panel {
  width: min(100%, 620px);
  padding: clamp(24px, 5vw, 44px);
  background: var(--panel);
  border: 1px solid rgba(23, 23, 23, 0.08);
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(23, 23, 23, 0.12);
}

.brand {
  width: fit-content;
  margin-bottom: 18px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 7vw, 62px);
  line-height: 0.95;
  letter-spacing: 0;
}

.lead {
  margin: 16px 0 28px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.dropzone {
  position: relative;
  display: grid;
  min-height: 190px;
  place-items: center;
  border: 2px dashed var(--line);
  border-radius: 8px;
  background: #faf7f0;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.dropzone.is-hovering {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.dropzone input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.drop-content {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 24px;
  text-align: center;
  pointer-events: none;
}

.icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 30px;
  line-height: 1;
}

.drop-content strong {
  font-size: 20px;
}

.drop-content span:last-child {
  max-width: 100%;
  color: var(--muted);
  overflow-wrap: anywhere;
}

button,
.download {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
}

button {
  cursor: pointer;
}

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

.primary {
  width: 100%;
  margin-top: 18px;
  background: var(--accent);
  color: white;
}

.primary:not(:disabled):hover {
  background: var(--accent-strong);
}

.status {
  min-height: 24px;
  margin-top: 16px;
  color: var(--muted);
  font-weight: 650;
}

.status.is-error {
  color: var(--danger);
}

.progress-wrap {
  margin-top: 12px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.progress-meta span:last-child {
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.progress-track {
  height: 12px;
  overflow: hidden;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 999px;
  background: #e8e2d8;
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #2563eb);
  transition: width 140ms linear;
}

.result {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.result-head button {
  min-height: 40px;
  padding: 0 14px;
  background: var(--ink);
  color: white;
}

.link-list {
  display: grid;
  gap: 12px;
}

.link-row {
  display: grid;
  gap: 7px;
}

input[type="text"] {
  min-width: 0;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
}

.download {
  min-height: auto;
  color: var(--accent-strong);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

@media (max-width: 520px) {
  .shell {
    padding: 14px;
  }

  .panel {
    padding: 22px;
  }

  .result-head {
    align-items: stretch;
    flex-direction: column;
  }
}
