* { box-sizing: border-box; margin: 0; }

:root {
  --green-deep: #0f2c1c;
  --card: #14331f;
  --card-border: #235c38;
  --accent: #2e9e5b;
  --accent-strong: #37b96b;
  --text: #eaf4ec;
  --muted: #9ec3aa;
  --sand: #e8d8a8;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(180deg, #0b2115 0%, #0f2c1c 100%);
  color: var(--text);
  min-height: 100dvh;
  padding: 1rem;
}

main { max-width: 640px; margin: 0 auto; display: grid; gap: 1rem; }

.brand { display: flex; align-items: center; gap: .75rem; padding: .25rem 0; }
.brand .flag { font-size: 2rem; }
h1 { font-size: 1.3rem; }
.tagline { color: var(--muted); font-size: .85rem; }
h2 { font-size: 1rem; color: var(--sand); }

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1.1rem;
  display: grid;
  gap: .85rem;
}

form { display: grid; gap: .85rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
@media (max-width: 480px) { .grid-2 { grid-template-columns: 1fr; } }

.field { display: grid; gap: .3rem; }
label { font-size: .85rem; color: var(--muted); }
.optional { color: #6f9b7f; }
small { color: #6f9b7f; font-size: .72rem; line-height: 1.35; }

input[type="text"], input[type="email"], input[type="date"], textarea {
  font: inherit;
  background: #0e2717;
  color: var(--text);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: .7rem .8rem;
  width: 100%;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
textarea { resize: vertical; }

button {
  font: inherit;
  border: 0;
  border-radius: 10px;
  padding: .9rem 1.25rem;
  cursor: pointer;
  touch-action: manipulation;
}

.audio-controls { display: grid; gap: .6rem; }

#record-btn {
  background: var(--accent);
  color: #fff;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  width: 100%;
}
#record-btn .dot { width: .75rem; height: .75rem; border-radius: 50%; background: #fff; }
#record-btn.recording { background: #dc2626; }
#record-btn.recording .dot { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

.or { text-align: center; color: var(--muted); font-size: .8rem; }

.upload-label {
  display: block;
  text-align: center;
  background: #0e2717;
  border: 1px dashed var(--card-border);
  border-radius: 10px;
  padding: .8rem;
  color: var(--muted);
  cursor: pointer;
  font-size: .9rem;
}
.upload-label input { display: none; }

.audio-status { text-align: center; color: var(--muted); font-size: .85rem; }
.audio-status.ok { color: #86efac; }

.primary {
  background: var(--accent-strong);
  color: #fff;
  font-size: 1.1rem;
  width: 100%;
}
.primary:disabled { opacity: .45; cursor: default; }

.secondary {
  background: #1d4a2d;
  color: var(--text);
  padding: .6rem .9rem;
  font-size: .9rem;
}

.timer { text-align: center; font-variant-numeric: tabular-nums; color: var(--muted); }

.steps { list-style: none; display: grid; gap: .4rem; padding: 0; }
.steps li {
  padding: .5rem .75rem .5rem 2rem;
  border-radius: 8px;
  background: #0e2717;
  color: var(--muted);
  font-size: .9rem;
  position: relative;
}
.steps li::before {
  content: "○";
  position: absolute; left: .7rem;
  color: var(--muted);
}
.steps li.active { color: var(--text); background: #143c22; }
.steps li.active::before { content: "◐"; color: var(--sand); }
.steps li.done { color: #86efac; }
.steps li.done::before { content: "●"; color: var(--accent-strong); }

.status {
  text-align: center;
  padding: .55rem;
  border-radius: 8px;
  background: #10301c;
  font-size: .95rem;
}
.status.failed { background: #3b1519; color: #fca5a5; }
.status.complete { background: #14321f; color: #86efac; }

.meta { color: var(--muted); font-size: .82rem; line-height: 1.4; }

pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .85rem;
  line-height: 1.55;
  background: #0c2414;
  border-radius: 8px;
  padding: .8rem;
  max-height: 60dvh;
  overflow-y: auto;
}
