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

body {
  width: 320px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  color: #f1f1f1;
  background: #0f0f0f;
  padding: 16px;
}

header {
  margin-bottom: 16px;
}

header h1 {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.subtitle {
  font-size: 12px;
  color: #aaa;
  margin-top: 2px;
}

section {
  margin-bottom: 14px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: #ccc;
}

.field label span {
  float: right;
  color: #888;
}

select,
input[type="range"] {
  width: 100%;
}

select {
  padding: 8px;
  border: 1px solid #333;
  border-radius: 6px;
  background: #212121;
  color: #f1f1f1;
  font-size: 13px;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #ff0000;
  cursor: pointer;
}

input[type="range"] {
  accent-color: #ff0000;
  cursor: pointer;
}

.actions {
  margin-top: 8px;
}

button {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: #cc0000;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

button:hover {
  background: #ff0000;
}

footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #333;
}

.footer-note {
  margin-top: 6px;
  color: #888;
}

footer p {
  font-size: 11px;
  color: #777;
  line-height: 1.4;
}

.speed-presets {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.speed-preset {
  flex: 1;
  padding: 6px 0;
  border: 1px solid #444;
  border-radius: 6px;
  background: #212121;
  color: #ddd;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.speed-preset:hover {
  background: #2a2a2a;
  border-color: #666;
}

.speed-preset.active {
  background: #3a1515;
  border-color: #cc0000;
  color: #fff;
}

.voice-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 4px;
}

.voice-preset {
  flex: 1 1 calc(50% - 6px);
  min-width: 0;
  padding: 6px 4px;
  border: 1px solid #444;
  border-radius: 6px;
  background: #212121;
  color: #ddd;
  font-size: 10px;
  line-height: 1.25;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.voice-preset:hover {
  background: #2a2a2a;
  border-color: #666;
}

.voice-preset.active {
  background: #3a1515;
  border-color: #cc0000;
  color: #fff;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  color: #ccc;
}

.radio-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
  color: #ddd;
  cursor: pointer;
}

.radio-row input {
  accent-color: #ff0000;
}

.catchup-section {
  margin-bottom: 10px;
}

#min-video-field {
  margin-top: -4px;
}

#max-sync-field {
  margin-top: -4px;
}

.field-hint a {
  color: #ff6b6b;
  text-decoration: none;
}

.field-hint a:hover {
  text-decoration: underline;
}

.field-hint {
  font-size: 10px;
  color: #888;
  line-height: 1.35;
  margin: 4px 0 0;
}

.voice-hint {
  font-size: 11px;
  line-height: 1.4;
  margin-bottom: 8px;
  min-height: 16px;
}

.voice-hint.ok {
  color: #2ecc71;
}

.voice-hint.warn {
  color: #ffb347;
}

.voice-hint.error {
  color: #ff6b6b;
}
