:root {
  --bg: #0d1117;
  --card: #161b22;
  --border: #2d333b;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #3fb950;
  --accent-2: #58a6ff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 -apple-system, "Segoe UI", Roboto, sans-serif;
}
main { max-width: 760px; margin: 0 auto; padding: 24px 16px 64px; }
header h1 { margin: 0 0 4px; font-size: 1.9rem; }
.sub { color: var(--muted); margin: 0 0 20px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
}
label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
textarea, select {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  resize: vertical;
}
.row { display: flex; gap: 12px; align-items: end; margin-top: 12px; flex-wrap: wrap; }
.field { flex: 1; min-width: 180px; }
.field.slim { flex: 0 0 160px; }
input[type=range] { width: 100%; }

button.primary {
  background: var(--accent);
  color: #04110a;
  border: 0;
  border-radius: 8px;
  padding: 11px 22px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
button.primary:disabled { opacity: .5; cursor: wait; }

#progress-wrap { margin-top: 14px; }
.progress-label { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-bottom: 4px; }
.bar { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; }
#progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .2s; }

.tffa { margin-top: 16px; text-align: center; }
#tffa-ms { font-size: 2.6rem; font-weight: 700; color: var(--accent); }
.tffa-label { display: block; color: var(--muted); font-size: .85rem; }
.tffa-note { color: var(--muted); font-size: .78rem; margin: 4px 0 0; }

audio { width: 100%; margin-top: 16px; }
.status { color: var(--muted); font-size: .85rem; min-height: 1.2em; margin: 8px 0 0; }

.how h2 { margin: 0 0 10px; font-size: 1.1rem; }
.how ul { margin: 0 0 12px; padding-left: 20px; }
.how li { margin-bottom: 6px; }
.attrib { color: var(--muted); font-size: .8rem; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
