:root {
  color-scheme: light;
  --bg: #f6f8f7;
  --text: #14211f;
  --muted: #5d6f6b;
  --line: #d9e1de;
  --accent: #0f766e;
  --accent-strong: #0a5d57;
  --danger: #b42318;
  --panel: #ffffff;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 20px;
}

.panel {
  min-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}

.heading {
  display: grid;
  gap: 8px;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 9vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  font-size: 1.25rem;
}

.intro,
.notice {
  color: var(--muted);
  line-height: 1.55;
}

.uploader {
  display: grid;
  gap: 14px;
}

.dropzone {
  min-height: 220px;
  border: 2px dashed var(--line);
  border-radius: 8px;
  background: var(--panel);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.dropzone.isOver,
.dropzone:focus-within {
  border-color: var(--accent);
  background: #eef7f5;
}

.dropIcon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: white;
  font-size: 2rem;
  line-height: 1;
}

.dropTitle {
  font-weight: 800;
  font-size: 1.25rem;
}

.dropHint {
  color: var(--muted);
}

input[type="file"] {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.fileMeta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

#fileName {
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.primary {
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.primary:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

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

.progressWrap,
.result {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  display: grid;
  gap: 12px;
}

.progressTop,
.stats {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

#statusText,
.stats {
  color: var(--muted);
}

progress {
  width: 100%;
  height: 16px;
  accent-color: var(--accent);
}

.result a {
  color: var(--accent-strong);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.notice {
  font-size: 0.95rem;
}

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

@media (max-width: 540px) {
  .shell {
    padding: 16px;
  }

  .panel {
    min-height: calc(100vh - 32px);
  }

  .dropzone {
    min-height: 190px;
    padding: 22px;
  }

  .fileMeta,
  .progressTop,
  .stats {
    flex-direction: column;
    align-items: flex-start;
  }
}
