:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #203b31;
  background: #f2f3ed;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 620px;
  padding: 36px;
  border: 1px solid #dce2d8;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 16px 48px #203b3108;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 5vw, 1.875rem);
  font-weight: 650;
  letter-spacing: -0.04em;
}

.description {
  margin: 0 0 32px;
  color: #66736c;
  line-height: 1.6;
}

label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.9rem;
  font-weight: 600;
}

input[type="file"] {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 8px;
  border: 1px solid #cdd8cf;
  border-radius: 10px;
  color: #4a5e53;
  background: #fafbf8;
  font: inherit;
  font-size: 0.875rem;
}

input::file-selector-button {
  margin-right: 12px;
  padding: 10px 12px;
  border: 0;
  border-radius: 6px;
  color: #244c3c;
  background: #e6eee5;
  font: inherit;
  cursor: pointer;
}

.hint {
  margin: 10px 0 24px;
  color: #66736c;
  font-size: 0.8rem;
}

button {
  width: 100%;
  min-height: 48px;
  padding: 12px 20px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: #285640;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: #1c4230;
}

button:disabled {
  opacity: 0.65;
  cursor: wait;
}

[hidden] { display: none !important; }

.results { border-top: 1px solid #dce2d8; margin-top: 24px; padding-top: 24px; }
.results h2 { margin: 0 0 12px; font-size: 1.25rem; }
.stem-list { list-style: none; margin: 0; padding: 0; }
.stem-list li { margin-top: 20px; }
.stem-list li > div { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; }
.stem-list audio { display: block; width: 100%; margin-top: 10px; }
a { color: #285640; text-underline-offset: 3px; }
a:focus-visible { outline: 3px solid #88b89a; outline-offset: 4px; }
.extra-files { margin: 24px 0 0; font-size: 0.85rem; line-height: 1.8; }
.transcription-results { margin: 24px 0 28px; }
.transcription-results h3 { margin: 0 0 10px; font-size: 1.1rem; }
.transcription-results textarea {
  display: block;
  width: 100%;
  min-height: 240px;
  padding: 12px;
  resize: vertical;
  overflow: auto;
  border: 1px solid #cdd8cf;
  border-radius: 10px;
  background: #fafbf8;
  color: #203b31;
  font: 0.8rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.download-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  margin-top: 12px;
  padding: 10px 18px;
  border-radius: 10px;
  background: #285640;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.download-button:hover { background: #1c4230; }

input:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 3px solid #88b89a;
  outline-offset: 4px;
}

.status {
  min-height: 2.8em;
  margin: 16px 0 0;
  color: #285640;
  font-size: 0.875rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.status[data-state="error"] {
  color: #b42318;
}

@media (max-width: 480px) {
  body {
    padding: 16px;
  }

  .card {
    padding: 28px 22px;
  }
}
