:root {
  --bg: #0f1115;
  --card: #171a21;
  --line: #262b36;
  --text: #e8eaf0;
  --muted: #9aa3b2;
  --accent: #4f8cff;
  --accent-press: #3f76e0;
  --error: #ff6b6b;
  --ok: #57d38c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1200px 600px at 50% -10%, #1b2230, var(--bg));
  color: var(--text);
  font: 16px/1.5 system-ui, "Segoe UI", Roboto, sans-serif;
  display: flex;
  justify-content: center;
  padding: 32px 16px;
}

.shell { width: 100%; max-width: 640px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
}

h1 { font-size: 22px; margin: 0 0 4px; }
.muted { color: var(--muted); margin: 0 0 18px; }

.topbar { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.account { display: flex; align-items: center; gap: 10px; }
.account .muted { margin: 0; font-size: 14px; }

label { display: block; margin-bottom: 14px; }
label > span { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
label.row { display: flex; align-items: center; gap: 8px; }
label.row span { margin: 0; }

input[type=text], input[type=password], textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0f1218;
  color: var(--text);
  font: inherit;
  resize: vertical;
}

textarea:focus-visible, input:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.counter { text-align: right; font-size: 12px; color: var(--muted); margin: -8px 0 16px; }

fieldset { border: 1px solid var(--line); border-radius: 12px; margin: 0 0 20px; padding: 12px 14px 14px; }
legend { font-size: 14px; color: var(--muted); padding: 0 6px; }
fieldset .muted { margin: 0; }

.voices { display: flex; flex-wrap: wrap; gap: 8px; }
.voice { position: relative; }
.voice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.voice span {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #0f1218;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: .15s;
}
.voice input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.voice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

button {
  font: inherit;
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: .15s;
}
button.primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 18px;
  width: 100%;
}
button.primary:hover:not(:disabled) { background: var(--accent-press); }
button.primary:disabled { opacity: .65; cursor: progress; }
button.big { padding: 15px 18px; font-size: 17px; }
button.link { background: none; border: none; color: var(--accent); padding: 0; font-size: 14px; }

.spinner {
  display: none;
  width: 18px;
  height: 18px;
  margin-right: 10px;
  vertical-align: -4px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
button.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.status { min-height: 22px; margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.status.ok { color: var(--ok); }
.error { color: var(--error); font-size: 14px; }
code { background: #0f1218; padding: 1px 5px; border-radius: 5px; }

audio { width: 100%; margin-top: 16px; }
