:root {
  --bg: #f4f5f7;
  --ink: #1f2430;
  --grey: #6b7280;
  --card-bg: #ffffff;
  --border: #e2e4e9;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --radius: 16px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  min-height: 100vh;
  color: var(--ink);
  display: flex;
  justify-content: center;
}

.wrap {
  width: 100%;
  max-width: 560px;
  padding: 40px 20px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

header {
  text-align: center;
  margin-bottom: 28px;
}

h1 {
  font-weight: 700;
  font-size: 1.9rem;
  margin: 0 0 6px;
}

.subtitle {
  color: var(--grey);
  margin: 0;
  font-size: 1rem;
}

.card {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field-label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 6px;
  color: var(--ink);
}

textarea, select {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
}

textarea {
  resize: vertical;
  min-height: 90px;
}

textarea:focus, select:focus, .voice-option:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.counter {
  text-align: right;
  font-size: 0.82rem;
  color: var(--grey);
  margin-top: -10px;
}

.row {
  display: flex;
  gap: 12px;
}

.field {
  flex: 1;
}

.voice-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.voice-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.voice-option:hover {
  border-color: var(--accent);
}

.voice-option.selected {
  border-color: var(--accent);
  background: #eff4ff;
  font-weight: 600;
}

.voice-empty {
  font-size: 0.85rem;
  color: var(--grey);
  margin: 0;
}

.pronounce-btn {
  font-family: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: background 0.12s ease, opacity 0.12s ease;
}

.pronounce-btn:hover:not(:disabled) {
  background: var(--accent-dark);
}

.pronounce-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

footer {
  margin-top: 32px;
  font-weight: 500;
  color: var(--grey);
  font-size: 0.88rem;
}