/* Has to work on a 240px-wide flip phone screen and on a desktop. */
:root {
  --bg: #fdfcf8;
  --text: #1c1b18;
  --muted: #6b675e;
  --line: #c9c4b8;
  --accent: #1f5f8b;
  --accent-text: #ffffff;
  --recording: #b3261e;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17181a;
    --text: #ece9e2;
    --muted: #a39f95;
    --line: #4a4a48;
    --accent: #7fb6dd;
    --accent-text: #10202c;
    --recording: #f2867e;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 12px;
  background: var(--bg);
  color: var(--text);
  font: 18px/1.4 system-ui, sans-serif;
}

main { max-width: 28rem; margin: 0 auto; }

h1 { font-size: 1.2rem; margin: 0 0 8px; }
p { margin: 0 0 12px; }
#prompt { font-size: 1.2rem; font-weight: 600; }

button, input, textarea {
  font: inherit;
  width: 100%;
  margin: 0 0 12px;
  padding: 10px;
  border-radius: 8px;
  border: 2px solid var(--line);
  background: var(--bg);
  color: var(--text);
}

button {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
}
button:focus, input:focus, textarea:focus { outline: 3px solid var(--text); outline-offset: 1px; }
button:disabled { opacity: 0.5; }

button.big { padding: 22px 10px; font-size: 1.3rem; }
button.recording { background: var(--recording); border-color: var(--recording); }
#discard, #retry { background: var(--bg); color: var(--text); border-color: var(--line); }

#code { font-size: 1.5rem; letter-spacing: 0.1em; text-align: center; }

.status { min-height: 1.4em; font-weight: 600; }
.small { color: var(--muted); font-size: 0.8rem; margin-top: 12px; }

[hidden] { display: none; }
